Commit 6e1a1942 authored by David S. Miller's avatar David S. Miller

Merge nuts.davemloft.net:/disk1/BK/sparcwork-2.6

into nuts.davemloft.net:/disk1/BK/sparc-2.6
parents 3411df4e 525aa2db
...@@ -50,6 +50,7 @@ bootup_user_stack: ...@@ -50,6 +50,7 @@ bootup_user_stack:
*/ */
.global root_flags, ram_flags, root_dev .global root_flags, ram_flags, root_dev
.global sparc_ramdisk_image, sparc_ramdisk_size .global sparc_ramdisk_image, sparc_ramdisk_size
.global sparc_ramdisk_image64
.ascii "HdrS" .ascii "HdrS"
.word LINUX_VERSION_CODE .word LINUX_VERSION_CODE
...@@ -60,7 +61,7 @@ bootup_user_stack: ...@@ -60,7 +61,7 @@ bootup_user_stack:
* 0x0202 : Supports kernel params string * 0x0202 : Supports kernel params string
* 0x0201 : Supports reboot_command * 0x0201 : Supports reboot_command
*/ */
.half 0x0300 /* HdrS version */ .half 0x0301 /* HdrS version */
root_flags: root_flags:
.half 1 .half 1
...@@ -74,6 +75,8 @@ sparc_ramdisk_size: ...@@ -74,6 +75,8 @@ sparc_ramdisk_size:
.word 0 .word 0
.xword reboot_command .xword reboot_command
.xword bootstr_info .xword bootstr_info
sparc_ramdisk_image64:
.xword 0
.word _end .word _end
/* We must be careful, 32-bit OpenBOOT will get confused if it /* We must be careful, 32-bit OpenBOOT will get confused if it
......
...@@ -68,6 +68,7 @@ unsigned long mmu_context_bmap[CTX_BMAP_SLOTS]; ...@@ -68,6 +68,7 @@ unsigned long mmu_context_bmap[CTX_BMAP_SLOTS];
extern char _start[], _end[]; extern char _start[], _end[];
/* Initial ramdisk setup */ /* Initial ramdisk setup */
extern unsigned long sparc_ramdisk_image64;
extern unsigned int sparc_ramdisk_image; extern unsigned int sparc_ramdisk_image;
extern unsigned int sparc_ramdisk_size; extern unsigned int sparc_ramdisk_size;
...@@ -1279,10 +1280,12 @@ unsigned long __init bootmem_init(unsigned long *pages_avail) ...@@ -1279,10 +1280,12 @@ unsigned long __init bootmem_init(unsigned long *pages_avail)
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
/* Now have to check initial ramdisk, so that bootmap does not overwrite it */ /* Now have to check initial ramdisk, so that bootmap does not overwrite it */
if (sparc_ramdisk_image) { if (sparc_ramdisk_image || sparc_ramdisk_image64) {
if (sparc_ramdisk_image >= (unsigned long)_end - 2 * PAGE_SIZE) unsigned long ramdisk_image = sparc_ramdisk_image ?
sparc_ramdisk_image -= KERNBASE; sparc_ramdisk_image : sparc_ramdisk_image64;
initrd_start = sparc_ramdisk_image + phys_base; if (ramdisk_image >= (unsigned long)_end - 2 * PAGE_SIZE)
ramdisk_image -= KERNBASE;
initrd_start = ramdisk_image + phys_base;
initrd_end = initrd_start + sparc_ramdisk_size; initrd_end = initrd_start + sparc_ramdisk_size;
if (initrd_end > end_of_phys_memory) { if (initrd_end > end_of_phys_memory) {
printk(KERN_CRIT "initrd extends beyond end of memory " printk(KERN_CRIT "initrd extends beyond end of memory "
...@@ -1325,6 +1328,10 @@ unsigned long __init bootmem_init(unsigned long *pages_avail) ...@@ -1325,6 +1328,10 @@ unsigned long __init bootmem_init(unsigned long *pages_avail)
size = initrd_end - initrd_start; size = initrd_end - initrd_start;
/* Resert the initrd image area. */ /* Resert the initrd image area. */
#ifdef CONFIG_DEBUG_BOOTMEM
prom_printf("reserve_bootmem(initrd): base[%llx] size[%lx]\n",
initrd_start, initrd_end);
#endif
reserve_bootmem(initrd_start, size); reserve_bootmem(initrd_start, size);
*pages_avail -= PAGE_ALIGN(size) >> PAGE_SHIFT; *pages_avail -= PAGE_ALIGN(size) >> PAGE_SHIFT;
...@@ -1377,7 +1384,7 @@ void __init paging_init(void) ...@@ -1377,7 +1384,7 @@ void __init paging_init(void)
if ((real_end > ((unsigned long)KERNBASE + 0x400000))) if ((real_end > ((unsigned long)KERNBASE + 0x400000)))
bigkernel = 1; bigkernel = 1;
#ifdef CONFIG_BLK_DEV_INITRD #ifdef CONFIG_BLK_DEV_INITRD
if (sparc_ramdisk_image) if (sparc_ramdisk_image || sparc_ramdisk_image64)
real_end = (PAGE_ALIGN(real_end) + PAGE_ALIGN(sparc_ramdisk_size)); real_end = (PAGE_ALIGN(real_end) + PAGE_ALIGN(sparc_ramdisk_size));
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment