Commit 525aa2db authored by Peter Jones's avatar Peter Jones Committed by David S. Miller

[SPARC64]: Support 64-bit initrd addresses.

Needs a SILO update too which is forthcoming.
Signed-off-by: default avatarPeter Jones <pjones@redhat.com>
Signed-off-by: default avatarBen Collins <bcollins@debian.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent db578ecc
......@@ -50,6 +50,7 @@ bootup_user_stack:
*/
.global root_flags, ram_flags, root_dev
.global sparc_ramdisk_image, sparc_ramdisk_size
.global sparc_ramdisk_image64
.ascii "HdrS"
.word LINUX_VERSION_CODE
......@@ -60,7 +61,7 @@ bootup_user_stack:
* 0x0202 : Supports kernel params string
* 0x0201 : Supports reboot_command
*/
.half 0x0300 /* HdrS version */
.half 0x0301 /* HdrS version */
root_flags:
.half 1
......@@ -74,6 +75,8 @@ sparc_ramdisk_size:
.word 0
.xword reboot_command
.xword bootstr_info
sparc_ramdisk_image64:
.xword 0
.word _end
/* We must be careful, 32-bit OpenBOOT will get confused if it
......
......@@ -68,6 +68,7 @@ unsigned long mmu_context_bmap[CTX_BMAP_SLOTS];
extern char _start[], _end[];
/* Initial ramdisk setup */
extern unsigned long sparc_ramdisk_image64;
extern unsigned int sparc_ramdisk_image;
extern unsigned int sparc_ramdisk_size;
......@@ -1279,10 +1280,12 @@ unsigned long __init bootmem_init(unsigned long *pages_avail)
#ifdef CONFIG_BLK_DEV_INITRD
/* Now have to check initial ramdisk, so that bootmap does not overwrite it */
if (sparc_ramdisk_image) {
if (sparc_ramdisk_image >= (unsigned long)_end - 2 * PAGE_SIZE)
sparc_ramdisk_image -= KERNBASE;
initrd_start = sparc_ramdisk_image + phys_base;
if (sparc_ramdisk_image || sparc_ramdisk_image64) {
unsigned long ramdisk_image = sparc_ramdisk_image ?
sparc_ramdisk_image : sparc_ramdisk_image64;
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;
if (initrd_end > end_of_phys_memory) {
printk(KERN_CRIT "initrd extends beyond end of memory "
......@@ -1325,6 +1328,10 @@ unsigned long __init bootmem_init(unsigned long *pages_avail)
size = initrd_end - initrd_start;
/* 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);
*pages_avail -= PAGE_ALIGN(size) >> PAGE_SHIFT;
......@@ -1377,7 +1384,7 @@ void __init paging_init(void)
if ((real_end > ((unsigned long)KERNBASE + 0x400000)))
bigkernel = 1;
#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));
#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