diff options
-rw-r--r-- | arch/mips/kernel/setup.c | 31 | ||||
-rw-r--r-- | arch/mips/lib/Makefile | 4 | ||||
-rw-r--r-- | arch/mips/lib/tags.c | 75 | ||||
-rw-r--r-- | include/asm-mips/bootinfo.h | 125 |
4 files changed, 6 insertions, 229 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 809838458..038e64205 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -1,4 +1,4 @@ -/* $Id: setup.c,v 1.12 1998/08/18 20:45:06 ralf Exp $ +/* $Id: setup.c,v 1.9 1998/08/25 09:14:40 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -76,7 +76,6 @@ int EISA_bus = 0; * information is being use to continue the screen output just below * the BIOS printed text and with the same text resolution. */ -struct drive_info_struct drive_info = DEFAULT_DRIVE_INFO; struct screen_info screen_info = DEFAULT_SCREEN_INFO; #ifdef CONFIG_BLK_DEV_FD @@ -102,10 +101,8 @@ unsigned long mips_cputype = CPU_UNKNOWN; unsigned long mips_machtype = MACH_UNKNOWN; unsigned long mips_machgroup = MACH_GROUP_UNKNOWN; unsigned long mips_tlb_entries = 48; /* Guess which CPU I've got :) */ -unsigned long mips_vram_base = KSEG0; unsigned char aux_device_present; -extern int root_mountflags; extern int _end; extern char empty_zero_page[PAGE_SIZE]; @@ -125,6 +122,7 @@ extern char empty_zero_page[PAGE_SIZE]; static char command_line[CL_SIZE] = { 0, }; char saved_command_line[CL_SIZE]; +extern char arcs_cmdline[CL_SIZE]; /* * The board specific setup routine sets irq_setup to point to a board @@ -153,7 +151,6 @@ __initfunc(void setup_arch(char **cmdline_p, unsigned long * memory_start_p, unsigned long * memory_end_p)) { unsigned long memory_end; - tag* atag; void cobalt_setup(void); void decstation_setup(void); void deskstation_setup(void); @@ -161,18 +158,6 @@ __initfunc(void setup_arch(char **cmdline_p, void sni_rm200_pci_setup(void); void sgi_setup(void); - /* Perhaps a lot of tags are not getting 'snarfed' - */ - /* please help yourself */ - - atag = bi_TagFind(tag_machtype); - memcpy(&mips_machtype, TAGVALPTR(atag), atag->size); - - atag = bi_TagFind(tag_machgroup); - memcpy(&mips_machgroup, TAGVALPTR(atag), atag->size); - - atag = bi_TagFind(tag_vram_base); - memcpy(&mips_vram_base, TAGVALPTR(atag), atag->size); - /* Save defaults for configuration-dependent routines. */ irq_setup = default_irq_setup; @@ -212,9 +197,6 @@ __initfunc(void setup_arch(char **cmdline_p, panic("Unsupported architecture"); } - atag = bi_TagFind(tag_drive_info); - memcpy(&drive_info, TAGVALPTR(atag), atag->size); - memory_end = mips_memory_upper; /* * Due to prefetching and similar mechanism the CPU sometimes @@ -231,14 +213,7 @@ __initfunc(void setup_arch(char **cmdline_p, rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0); #endif - atag = bi_TagFind(tag_mount_root_rdonly); - if (atag) - root_mountflags |= MS_RDONLY; - - atag = bi_TagFind(tag_command_line); - if (atag) - memcpy(&command_line, TAGVALPTR(atag), atag->size); - + strncpy (command_line, arcs_cmdline, CL_SIZE); memcpy(saved_command_line, command_line, CL_SIZE); saved_command_line[CL_SIZE-1] = '\0'; diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile index d6c05d2d1..f5a79996c 100644 --- a/arch/mips/lib/Makefile +++ b/arch/mips/lib/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.6 1998/05/07 23:44:00 ralf Exp $ +# $Id: Makefile,v 1.7 1998/06/30 00:21:54 ralf Exp $ # # Makefile for MIPS-specific library files.. # @@ -11,6 +11,6 @@ L_TARGET = lib.a L_OBJS = csum_partial.o csum_partial_copy.o dump_tlb.o floppy-std.o \ floppy-no.o ide-std.o ide-no.o rtc-std.o rtc-no.o memset.o memcpy.o \ - strlen_user.o strncpy_user.o tags.o watch.o + strlen_user.o strncpy_user.o watch.o include $(TOPDIR)/Rules.make diff --git a/arch/mips/lib/tags.c b/arch/mips/lib/tags.c deleted file mode 100644 index 9a2e3cd73..000000000 --- a/arch/mips/lib/tags.c +++ /dev/null @@ -1,75 +0,0 @@ -/* - * linux/arch/mips/lib/tags.c - * - * Copyright (C) 1996 Stoned Elipot - */ -#include <linux/stddef.h> -#include <linux/kernel.h> -#include <linux/string.h> -#include <asm/addrspace.h> -#include <asm/bootinfo.h> - -/* - * Parse the tags present in upper memory to find out - * a pecular one. - * - * Parameter: type - tag type to find - * - * returns : NULL - failure - * !NULL - pointer on the tag structure found - */ -tag * -bi_TagFind(enum bi_tag type) -{ - tag* t = (tag*)(mips_memory_upper - sizeof(tag)); - - while((t->tag != tag_dummy) && (t->tag != type)) - t = (tag*)(NEXTTAGPTR(t)); - - if (t->tag == tag_dummy) /* tag not found */ - return (tag*)NULL; - - return t; -} - -/* - * Snarf from the tag list in memory end some tags needed - * before the kernel reachs setup_arch() - * - * add yours here if you want to, but *beware*: the kernel var - * that will hold the values you want to snarf have to be - * in .data section of the kernel, so initialized in to whatever - * value in the kernel's sources. - */ -void bi_EarlySnarf(void) -{ - tag* atag; - - /* for wire_mappings() */ - atag = bi_TagFind(tag_machgroup); - if (atag) - memcpy(&mips_machgroup, TAGVALPTR(atag), atag->size); - else { - /* useless for boxes without text video mode but....*/ - panic("machine group not specified by bootloader"); - } - - atag = bi_TagFind(tag_machtype); - if (atag) - memcpy(&mips_machtype, TAGVALPTR(atag), atag->size); - else { - /* useless for boxes without text video mode but....*/ - panic("machine type not specified by bootloader"); - } - - /* for tlbflush() */ - atag = bi_TagFind(tag_tlb_entries); - if (atag) - memcpy(&mips_tlb_entries, TAGVALPTR(atag), atag->size); - else { - /* useless for boxes without text video mode but....*/ - panic("number of TLB entries not specified by bootloader"); - } - - return; -} diff --git a/include/asm-mips/bootinfo.h b/include/asm-mips/bootinfo.h index f41ecd19e..dc2b1c2fa 100644 --- a/include/asm-mips/bootinfo.h +++ b/include/asm-mips/bootinfo.h @@ -1,4 +1,4 @@ -/* $Id: bootinfo.h,v 1.5 1998/08/19 21:58:10 ralf Exp $ +/* $Id: bootinfo.h,v 1.4 1998/08/25 09:21:55 ralf Exp $ * * bootinfo.h -- Definition of the Linux/MIPS boot information structure * @@ -151,126 +151,6 @@ typedef struct mips_arc_DisplayInfo { /* video adapter information */ unsigned short lines; } mips_arc_DisplayInfo; -/* - * New style bootinfo - * - * Add new tags only at the end of the enum; *never* remove any tags - * or you'll break compatibility! - */ -enum bi_tag { - /* - * not a real tag - */ - tag_dummy, - - /* - * machine type - */ - tag_machtype, - - /* - * system CPU & FPU - */ - tag_cputype, - - /* - * Installed RAM - */ - tag_memlower, - tag_memupper, - - /* - * Cache Sizes (0xffffffff = unknown) - */ - tag_icache_size, - tag_icache_linesize, - tag_dcache_size, - tag_dcache_linesize, - tag_scache_size, - tag_scache_linesize, - - /* - * TLB Info - */ - tag_tlb_entries, - - /* - * DMA buffer size (Deskstation only) - */ - tag_dma_cache_size, - tag_dma_cache_base, - - /* - * Ramdisk Info - */ - tag_ramdisk_size, /* ramdisk size in 1024 byte blocks */ - tag_ramdisk_base, /* address of the ram disk in mem */ - - /* - * Boot flags for the kernel - */ - tag_mount_root_rdonly, - tag_drive_info, - - /* - * Video ram info (not in tty.h) - */ - tag_vram_base, /* video ram base address */ - - tag_command_line, /* kernel command line parameters */ - - /* - * machine group - */ - tag_machgroup, - - /* - * info on the display from the ARC BIOS - */ - tag_arcdisplayinfo, - - /* - * tag to pass a complete struct screen_info - */ - tag_screen_info -}; - -/* struct defining a tag */ -typedef struct { - enum bi_tag tag; - unsigned long size; -} tag; - -/* struct to define a tag and it's data */ -typedef struct { - tag t; - void* d; -} tag_def; - -/* macros for parsing tag list */ -#define TAGVALPTR(t) ((void*)(((void*)(t)) - ((t)->size))) -#define NEXTTAGPTR(t) ((void*)(TAGVALPTR(t) - (sizeof(tag)))) - -/* size macros for tag size field */ -#define UCHARSIZE (sizeof(unsigned char)) -#define ULONGSIZE (sizeof(unsigned long)) -#define UINTSIZE (sizeof(unsigned int)) -#define DRVINFOSIZE (sizeof(struct drive_info_struct)) -#define CMDLINESIZE (sizeof(char[CL_SIZE]) - -/* - * For tag readers aka the kernel - */ -tag *bi_TagFind(enum bi_tag type); -void bi_EarlySnarf(void); - -/* For tag creators aka bootloaders */ -/* Now implemented in Milo 0.26 */ -int bi_TagAdd(enum bi_tag type, unsigned long size, void *data); -int bi_TagAddList(tag_def* taglist); -void bi_TagWalk(void); - - #ifdef CONFIG_SGI /* screen info will dissapear... soon */ //#define DEFAULT_SCREEN_INFO {0, 0, 0, 0, 0, 158, 0, 0, 0, 62, 0, 16} @@ -296,9 +176,6 @@ extern unsigned long mips_cputype; extern unsigned long mips_machtype; extern unsigned long mips_machgroup; extern unsigned long mips_tlb_entries; -extern unsigned long mips_vram_base; -extern unsigned long mips_dma_cache_size; -extern unsigned long mips_dma_cache_base; #endif /* _LANGUAGE_ASSEMBLY */ |