diff options
Diffstat (limited to 'arch/sparc/kernel/setup.c')
-rw-r--r-- | arch/sparc/kernel/setup.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index 84190cf5a..d29c1cb66 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c @@ -1,4 +1,4 @@ -/* $Id: setup.c,v 1.103 1998/09/21 05:05:23 jj Exp $ +/* $Id: setup.c,v 1.105 1999/04/13 14:17:08 jj Exp $ * linux/arch/sparc/kernel/setup.c * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -271,8 +271,8 @@ extern unsigned long sun_serial_setup(unsigned long); extern unsigned short root_flags; extern unsigned short root_dev; extern unsigned short ram_flags; -extern unsigned ramdisk_image; -extern unsigned ramdisk_size; +extern unsigned sparc_ramdisk_image; +extern unsigned sparc_ramdisk_size; #define RAMDISK_IMAGE_START_MASK 0x07FF #define RAMDISK_PROMPT_FLAG 0x8000 #define RAMDISK_LOAD_FLAG 0x4000 @@ -285,7 +285,7 @@ enum sparc_cpu sparc_cpu_model; struct tt_entry *sparc_ttable; -static struct pt_regs fake_swapper_regs = { 0, 0, 0, 0, { 0, } }; +struct pt_regs fake_swapper_regs = { 0, 0, 0, 0, { 0, } }; static void prom_cons_write(struct console *con, const char *str, unsigned count) { @@ -375,7 +375,7 @@ __initfunc(void setup_arch(char **cmdline_p, sun4c_probe_vac(); load_mmu(); total = prom_probe_memory(); - *memory_start_p = (((unsigned long) &end)); + *memory_start_p = PAGE_ALIGN(((unsigned long) &end)); if(!packed) { for(i=0; sp_banks[i].num_bytes != 0; i++) { @@ -404,10 +404,10 @@ __initfunc(void setup_arch(char **cmdline_p, rd_doload = ((ram_flags & RAMDISK_LOAD_FLAG) != 0); #endif #ifdef CONFIG_BLK_DEV_INITRD - if (ramdisk_image) { - initrd_start = ramdisk_image; + if (sparc_ramdisk_image) { + initrd_start = sparc_ramdisk_image; if (initrd_start < KERNBASE) initrd_start += KERNBASE; - initrd_end = initrd_start + ramdisk_size; + initrd_end = initrd_start + sparc_ramdisk_size; if (initrd_end > *memory_end_p) { printk(KERN_CRIT "initrd extends beyond end of memory " "(0x%08lx > 0x%08lx)\ndisabling initrd\n", @@ -417,6 +417,14 @@ __initfunc(void setup_arch(char **cmdline_p, if (initrd_start >= *memory_start_p && initrd_start < *memory_start_p + 2 * PAGE_SIZE) { initrd_below_start_ok = 1; *memory_start_p = PAGE_ALIGN (initrd_end); + } else if (initrd_start && sparc_ramdisk_image < KERNBASE) { + switch (sparc_cpu_model) { + case sun4m: + case sun4d: + initrd_start -= KERNBASE; + initrd_end -= KERNBASE; + break; + } } } #endif |