[U-Boot] [PATCH] powerpc/mpc85xx: Use GOT when loading IVORs post-relocation

York Sun yorksun at freescale.com
Tue May 5 18:26:31 CEST 2015



On 04/23/2015 08:48 PM, Xie Shaohui-B21989 wrote:
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Friday, April 24, 2015 9:02 AM
>> To: u-boot at lists.denx.de; Sun York-R58495
>> Cc: Wood Scott-B07421; Alexander Graf; Xie Shaohui-B21989
>> Subject: [PATCH] powerpc/mpc85xx: Use GOT when loading IVORs post-
>> relocation
>>
>> Commit 96d2bb952bb ("powerpc/mpc85xx: Don't relocate exception vectors")
>> simplified IVOR initialization a bit too much, failing to use the post-
>> relocation offset.  This doesn't cause a problem with normal NOR boot, in
>> which both the pre-relocation and post-relocation addresses are 64 KiB
>> aligned.  However, if TEXT_BASE is only 4 KiB aligned, such as for
>> NAND/SD/etc. boot on some targets, as well as the QEMU target, the post-
>> relocation address will not be the same in the lower 16 bits, as
>> reserve_uboot() ensures that the relocation address is always 64 KiB
>> aligned even if the pre-relocation address was not.
>>
>> Use the GOT to get the proper post-relocation offsets.
>>
>> Fixes: 96d2bb952bb ("powerpc/mpc85xx: Don't relocate exception vectors")
>> Signed-off-by: Scott Wood <scottwood at freescale.com>
>> Cc: Alexander Graf <agraf at suse.de>
>> Cc: Shaohui Xie <Shaohui.Xie at freescale.com>
>> ---
>>  arch/powerpc/cpu/mpc85xx/start.S | 35 ++++++++++++++++++++--------------
>> -
>>  1 file changed, 20 insertions(+), 15 deletions(-)
>>
> 
> Tested-by: Shaohui Xie <Shaohui.Xie at freescale.com>
> 
Applied to u-boot-mpc85xx master branch. Awaiting upstream.

York


More information about the U-Boot mailing list