Change the default link address for pSeries zImage kernels.
PATCH 1/1 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 pSeries zImage from 4MB to 64MB (well past OF).
---
- Compile tested for *_defconfig with only pSeries chaning it's link address.
- Boot tested on POWER6
arch/powerpc/boot/wrapper | 14 ++++++++++++-- arch/powerpc/boot/zImage.coff.lds.S | 1 - arch/powerpc/boot/zImage.lds.S | 1 - 3 files changed, 12 insertions(+), 4 deletions(-)
arch/powerpc/boot/wrapper +12 -2
@@ -138,14 +138,20 @@ objflags=-S tmp=$tmpdir/zImage.$$.o ksection=.kernel:vmlinux.strip isection=.kernel:initrd +link_address='0x400000' case "$platform" in -pmac|pseries|chrp) +pseries) + platformo=$object/of.o + link_address='0x4000000' + ;; +pmac|chrp) platformo=$object/of.o ;; coff) platformo=$object/of.o lds=$object/zImage.coff.lds + link_address='0x500000' ;; miboot|uboot) # miboot and U-boot want just the bare bits, not an ELF binary
@@ -190,6 +196,7 @@ ps3) objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data" ksection=.kernel:vmlinux.bin isection=.kernel:initrd + link_address='' ;; ep88xc|ep405|ep8248e) platformo="$object/fixed-head.o $object/$platform.o"
@@ -268,7 +275,10 @@ if [ -n "$dtb" ]; then fi if [ "$platform" != "miboot" ]; then - ${CROSS}ld -m elf32ppc -T $lds -o "$ofile" \ + if [ -n "$link_address" ] ; then + text_start="-Ttext $link_address" + fi + ${CROSS}ld -m elf32ppc -T $lds $text_start -o "$ofile" \ $platformo $tmp $object/wrapper.a rm $tmp fi
arch/powerpc/boot/zImage.coff.lds.S +0 -1
@@ -3,7 +3,6 @@ ENTRY(_zimage_start_opd) EXTERN(_zimage_start_opd) SECTIONS { - . = (5*1024*1024); _start = .; .text : {
arch/powerpc/boot/zImage.lds.S +0 -1
@@ -3,7 +3,6 @@ ENTRY(_zimage_start) EXTERN(_zimage_start) SECTIONS { - . = (4*1024*1024); _start = .; .text : {
Signature · 7 lines
1.5.5.1 Yours Tony linux.conf.au http://www.marchsouth.org/ Jan 19 - 24 2009 The Australian Linux Technical Conference!
Quoted 10 lines · Tony Breeds
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 pSeries zImage from 4MB to 64MB (well past OF).
Signed-off-by Tony Breeds <[email protected]>---
- Compile tested for*_defconfigwith only pSeries chaning it's link address.
- Boot tested on POWER6
Considering how bad OF can be on some machines, I'd like this to be boot-tested on a wider range of machines. Also, it might depend on the OF real-base setting as well...
At least, we should be able to test at ozlabs on cell blades, POWER4 bare metal (ie "SMP mode"), POWER5 and POWER5+.
Cheers,
Ben.
Quoted 13 lines · On Fri, 25 Apr 2008 16:12:50 +1000 Benjamin Herrenschmidt…
Quoted 10 lines · Tony Breeds
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 pSeries zImage from 4MB to 64MB (well past OF).
Signed-off-by Tony Breeds <[email protected]>---
- Compile tested for*_defconfigwith only pSeries chaning it's link address.
- Boot tested on POWER6
Quoted 6 lines
Considering how bad OF can be on some machines, I'd like this to be boot-tested on a wider range of machines. Also, it might depend on the OF real-base setting as well...
At least, we should be able to test at ozlabs on cell blades, POWER4 bare metal (ie "SMP mode"), POWER5 and POWER5+.
And given that all the embedded boards use zImage.lds.S, we should probably test it there. I'll try to test on 4xx for both treeImage and U-Boot today.
josh
Quoted 6 lines · Benjamin Herrenschmidt
Considering how bad OF can be on some machines, I'd like this to be boot-tested on a wider range of machines. Also, it might depend on the OF real-base setting as well...
At least, we should be able to test at ozlabs on cell blades, POWER4 bare metal (ie "SMP mode"), POWER5 and POWER5+.
Hmm okay it fails on POWER4, I'll see what can be done there.
Yours Tony
linux.conf.au http://www.marchsouth.org/
Jan 19 - 24 2009 The Australian Linux Technical Conference!