* [PATCH] Change the default link address for pSeries zImage kernels.
@ 2008-04-25 5:39 Tony Breeds
2008-04-25 6:12 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Tony Breeds @ 2008-04-25 5:39 UTC (permalink / raw)
To: Paul Mackerras, LinuxPPC-dev
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 <tony@bakeyournoodle.com>
---
- 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(-)
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index d6c96d9..b5dfc1f 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -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
diff --git a/arch/powerpc/boot/zImage.coff.lds.S b/arch/powerpc/boot/zImage.coff.lds.S
index fe87a90..856dc78 100644
--- a/arch/powerpc/boot/zImage.coff.lds.S
+++ b/arch/powerpc/boot/zImage.coff.lds.S
@@ -3,7 +3,6 @@ ENTRY(_zimage_start_opd)
EXTERN(_zimage_start_opd)
SECTIONS
{
- . = (5*1024*1024);
_start = .;
.text :
{
diff --git a/arch/powerpc/boot/zImage.lds.S b/arch/powerpc/boot/zImage.lds.S
index f6e380f..0962d62 100644
--- a/arch/powerpc/boot/zImage.lds.S
+++ b/arch/powerpc/boot/zImage.lds.S
@@ -3,7 +3,6 @@ ENTRY(_zimage_start)
EXTERN(_zimage_start)
SECTIONS
{
- . = (4*1024*1024);
_start = .;
.text :
{
--
1.5.5.1
Yours Tony
linux.conf.au http://www.marchsouth.org/
Jan 19 - 24 2009 The Australian Linux Technical Conference!
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Change the default link address for pSeries zImage kernels.
2008-04-25 5:39 [PATCH] Change the default link address for pSeries zImage kernels Tony Breeds
@ 2008-04-25 6:12 ` Benjamin Herrenschmidt
2008-04-25 10:42 ` Josh Boyer
2008-04-28 23:06 ` Tony Breeds
0 siblings, 2 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2008-04-25 6:12 UTC (permalink / raw)
To: Tony Breeds; +Cc: LinuxPPC-dev, Paul Mackerras
On Fri, 2008-04-25 at 15:39 +1000, Tony Breeds wrote:
> 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 <tony@bakeyournoodle.com>
> ---
> - Compile tested for *_defconfig with 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Change the default link address for pSeries zImage kernels.
2008-04-25 6:12 ` Benjamin Herrenschmidt
@ 2008-04-25 10:42 ` Josh Boyer
2008-04-28 23:06 ` Tony Breeds
1 sibling, 0 replies; 4+ messages in thread
From: Josh Boyer @ 2008-04-25 10:42 UTC (permalink / raw)
To: benh; +Cc: LinuxPPC-dev, Paul Mackerras
On Fri, 25 Apr 2008 16:12:50 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Fri, 2008-04-25 at 15:39 +1000, Tony Breeds wrote:
> > 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 <tony@bakeyournoodle.com>
> > ---
> > - Compile tested for *_defconfig with 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+.
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Change the default link address for pSeries zImage kernels.
2008-04-25 6:12 ` Benjamin Herrenschmidt
2008-04-25 10:42 ` Josh Boyer
@ 2008-04-28 23:06 ` Tony Breeds
1 sibling, 0 replies; 4+ messages in thread
From: Tony Breeds @ 2008-04-28 23:06 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: LinuxPPC-dev, Paul Mackerras
On Fri, Apr 25, 2008 at 04:12:50PM +1000, Benjamin Herrenschmidt wrote:
> 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!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-04-28 23:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-25 5:39 [PATCH] Change the default link address for pSeries zImage kernels Tony Breeds
2008-04-25 6:12 ` Benjamin Herrenschmidt
2008-04-25 10:42 ` Josh Boyer
2008-04-28 23:06 ` Tony Breeds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).