]> Pileus Git - ~andy/linux/commit
powerpc/boot: Change the load address for the wrapper to fit the kernel
authorSuzuki Poulose <suzuki@in.ibm.com>
Wed, 14 Dec 2011 22:59:57 +0000 (22:59 +0000)
committerJosh Boyer <jwboyer@gmail.com>
Tue, 20 Dec 2011 15:22:56 +0000 (10:22 -0500)
commitc55aef0e5bc61539ad5c915c1400103f1c79942e
tree1d866c77c2cbf4234687dde2bbbe1dc7ec3f2b3e
parent5b2e478da032b7d443833402fa586f832397f3be
powerpc/boot: Change the load address for the wrapper to fit the kernel

The wrapper code which uncompresses the kernel in case of a 'ppc' boot
is by default loaded at 0x00400000 and the kernel will be uncompressed
to fit the location 0-0x00400000. But with dynamic relocations, the size
of the kernel may exceed 0x00400000(4M). This would cause an overlap
of the uncompressed kernel and the boot wrapper, causing a failure in
boot.

The message looks like :

   zImage starting: loaded at 0x00400000 (sp: 0x0065ffb0)
   Allocating 0x5ce650 bytes for kernel ...
   Insufficient memory for kernel at address 0! (_start=00400000, uncompressed size=00591a20)

This patch shifts the load address of the boot wrapper code to the next
higher MB, according to the size of  the uncompressed vmlinux.

With the patch, we get the following message while building the image :

 WARN: Uncompressed kernel (size 0x5b0344) overlaps the address of the wrapper(0x400000)
 WARN: Fixing the link_address of wrapper to (0x600000)

Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
arch/powerpc/boot/wrapper