diff options
author | Tony Breeds <tony@bakeyournoodle.com> | 2008-06-24 00:20:29 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-06-30 21:28:32 -0400 |
commit | 9b09c6d909dfd8de96b99b9b9c808b94b0a71614 (patch) | |
tree | 0796f29964a133130ed39584000b2108497f3d65 /arch/powerpc/boot/oflib.c | |
parent | c230328def963373ec474056f372e1918692c3c8 (diff) |
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 <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/oflib.c')
-rw-r--r-- | arch/powerpc/boot/oflib.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c index 95b8fd69a403..b0ec9cf3eaaf 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) | |||
168 | 168 | ||
169 | void *of_vmlinux_alloc(unsigned long size) | 169 | void *of_vmlinux_alloc(unsigned long size) |
170 | { | 170 | { |
171 | void *p = malloc(size); | 171 | unsigned long start = (unsigned long)_start, end = (unsigned long)_end; |
172 | 172 | void *addr; | |
173 | void *p; | ||
174 | |||
175 | /* With some older POWER4 firmware we need to claim the area the kernel | ||
176 | * will reside in. Newer firmwares don't need this so we just ignore | ||
177 | * the return value. | ||
178 | */ | ||
179 | addr = of_claim(start, end - start, 0); | ||
180 | printf("Trying to claim from 0x%lx to 0x%lx (0x%lx) got %p\r\n", | ||
181 | start, end, end - start, addr); | ||
182 | |||
183 | p = malloc(size); | ||
173 | if (!p) | 184 | if (!p) |
174 | fatal("Can't allocate memory for kernel image!\n\r"); | 185 | fatal("Can't allocate memory for kernel image!\n\r"); |
175 | 186 | ||