patch-2.0.4 linux/arch/ppc/kernel/setup.c
Next file: linux/arch/ppc/kernel/signal.c
Previous file: linux/arch/ppc/kernel/ramdisk_drvr.c
Back to the patch index
Back to the overall index
- Lines: 121
- Date:
Mon Jul 8 11:27:43 1996
- Orig file:
v2.0.3/linux/arch/ppc/kernel/setup.c
- Orig date:
Tue May 28 08:09:55 1996
diff -u --recursive --new-file v2.0.3/linux/arch/ppc/kernel/setup.c linux/arch/ppc/kernel/setup.c
@@ -21,6 +21,7 @@
#include <linux/user.h>
#include <linux/a.out.h>
#include <linux/tty.h>
+#include <linux/major.h>
#define SIO_CONFIG_RA 0x398
#define SIO_CONFIG_RD 0x399
@@ -35,26 +36,33 @@
extern int root_mountflags;
unsigned char aux_device_present;
+#ifdef CONFIG_BLK_DEV_RAM
+extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */
+extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */
+extern int rd_image_start; /* starting block # of image */
+#endif
/*
* The format of "screen_info" is strange, and due to early
* i386-setup code. This is just enough to make the console
* code think we're on a EGA+ colour display.
*/
+ /* this is changed only in minor ways from the original
+ -- Cort
+ */
struct screen_info screen_info = {
- 0, 0, /* orig-x, orig-y */
- 0, 0, /* unused */
+ 0, 25, /* orig-x, orig-y */
+ { 0, 0 }, /* unused */
0, /* orig-video-page */
0, /* orig-video-mode */
80, /* orig-video-cols */
- 0, /* unused [short] */
- 0, /* ega_bx */
- 0, /* unused [short] */
+ 0,0,0, /* ega_ax, ega_bx, ega_cx */
25, /* orig-video-lines */
- 0, /* isVGA */
- 16 /* video points */
+ 1, /* orig-video-isVGA */
+ 16 /* orig-video-points */
};
+
unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end)
{
return memory_start;
@@ -64,8 +72,9 @@
{
unsigned char dram_size = inb(0x0804);
unsigned long total;
-_printk("DRAM Size = %x\n", dram_size);
-_printk("Config registers = %x/%x/%x/%x\n", inb(0x0800), inb(0x0801), inb(0x0802), inb(0x0803));
+ extern BAT BAT2;
+printk("DRAM Size = %x\n", dram_size);
+printk("Config registers = %x/%x/%x/%x\n", inb(0x0800), inb(0x0801), inb(0x0802), inb(0x0803));
switch (dram_size & 0x07)
{
case 0:
@@ -132,6 +141,16 @@
Hash_size = HASH_TABLE_SIZE_128K;
Hash_mask = HASH_TABLE_MASK_128K;
}
+ switch(total)
+ {
+ case 0x01000000:
+/* BAT2[0][1] = BL_16M;*/
+ break;
+ default:
+ printk("WARNING: setup.c: find_end_of_memory() unknown total ram size %x\n", total);
+ break;
+ }
+
Hash = (PTE *)((total-Hash_size)+KERNELBASE);
bzero(Hash, Hash_size);
return ((unsigned long)Hash);
@@ -156,18 +175,32 @@
outb(reg, SIO_CONFIG_RD);
outb(reg, SIO_CONFIG_RD); /* Have to write twice to change! */
ROOT_DEV = to_kdev_t(DEFAULT_ROOT_DEVICE);
+ /*ROOT_DEV = MKDEV(UNNAMED_MAJOR, 255);*/ /* nfs */
aux_device_present = 0xaa;
+ /*nfsaddrs=myip:serverip:gateip:netmaskip:clientname*/
+ strcpy(cmd_line,
+ "nfsaddrs=129.138.6.13:129.138.6.90:129.138.6.1:255.255.255.0:pandora");
+ /* strcpy(cmd_line,"root=/dev/sda1");*/
*cmdline_p = cmd_line;
*memory_start_p = (unsigned long) &_end;
*memory_end_p = (unsigned long *)end_of_DRAM;
size_memory = *memory_end_p - KERNELBASE; /* Relative size of memory */
+
+#ifdef CONFIG_BLK_DEV_RAM
+ rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
+ rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0);
+ rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0);
+ rd_prompt = 0;
+ rd_doload = 0;
+ rd_image_start = 0;
+#endif
}
asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on)
{
return -EIO;
}
-
+#if 0
extern char builtin_ramdisk_image;
extern long builtin_ramdisk_size;
@@ -182,7 +215,7 @@
root_mountflags |= MS_RDONLY;
}
}
-
+#endif
#define MAJOR(n) (((n)&0xFF00)>>8)
#define MINOR(n) ((n)&0x00FF)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov