From 9b09c6d909dfd8de96b99b9b9c808b94b0a71614 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Tue, 24 Jun 2008 14:20:29 +1000 Subject: powerpc: Change the default link address for pSeries zImage kernels Currently we set the start of the .text section to be 4Mb for pSeries. In situations where the zImage is > 8Mb we'll fail to boot (due to overlapping with OF). Move .text in a zImage from 4MB to 64MB (well past OF). We still will not be able to load large zImage unless we also move OF, to that end, add a note to the zImage ELF to move OF to 32Mb. If this is the very first kernel booted then we'll need to move OF manually by setting real-base. Signed-off-by: Tony Breeds Signed-off-by: Paul Mackerras --- arch/powerpc/boot/oflib.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'arch/powerpc/boot/oflib.c') diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c index 95b8fd6..b0ec9cf 100644 --- a/arch/powerpc/boot/oflib.c +++ b/arch/powerpc/boot/oflib.c @@ -168,8 +168,19 @@ void *of_claim(unsigned long virt, unsigned long size, unsigned long align) void *of_vmlinux_alloc(unsigned long size) { - void *p = malloc(size); - + unsigned long start = (unsigned long)_start, end = (unsigned long)_end; + void *addr; + void *p; + + /* With some older POWER4 firmware we need to claim the area the kernel + * will reside in. Newer firmwares don't need this so we just ignore + * the return value. + */ + addr = of_claim(start, end - start, 0); + printf("Trying to claim from 0x%lx to 0x%lx (0x%lx) got %p\r\n", + start, end, end - start, addr); + + p = malloc(size); if (!p) fatal("Can't allocate memory for kernel image!\n\r"); -- cgit v1.1