From: Txema Lopez <tlopez@aotek.es>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Fixup relocation patch.
Date: Tue, 13 Feb 2007 10:25:12 +0100 [thread overview]
Message-ID: <45D183F8.8050707@aotek.es> (raw)
Hi all,
This is a patch to make relocation simpler and more reliable. It's for a
1.1.6 U-Boot version.
The FIXUP section in U-Boot is empty so when U-Boot is relocated from
flash to sdram these lines in the file start.S have no effect:
/*
* Now adjust the fixups and the pointers to the fixups
* in case we need to move ourselves again.
*/
2: li r0,__fixup_entries at sectoff@l
lwz r3,GOT(_FIXUP_TABLE_)
cmpwi r0,0
mtctr r0
addi r3,r3,-4
beq 4f
3: lwzu r4,4(r3)
lwzux r0,r4,r11
add r0,r0,r11
stw r10,0(r3)
stw r0,0(r4)
bdnz 3b
4:
Because of it, in some places of U-Boot the relocation must be done
manually: i.e malloc_bin_reloc().
I submit the patch only for the Lite5200 boards and the rest of boards
will be not affected. If someone want to use or test the fixup
relocation for his board only has to do two changes:
- cleanup the fixup section from the text section in the u-boot.lds
file.
- define CFG_FIXUP_RELOCATION in the board configuration file.
I'm not sure if this patch could work for not PowerPC based
architectures. By example, taking a look in the U-Boot starting files
for mips and bf533 cpu's, it seems that only the GOT section is
relocated in ram, so the patch probably won't work.
Signed-off-by: Jose Maria Lopez <tlopez@aotek.es>
CHANGELOG
* Make relocation simpler and more reliable for Lite5200 boards:
Patch by Jose Maria Lopez, 13 February 2007
Best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixup.patch
Type: text/x-patch
Size: 6074 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070213/330e7104/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tlopez.vcf
Type: text/x-vcard
Size: 324 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070213/330e7104/attachment.vcf
next reply other threads:[~2007-02-13 9:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-13 9:25 Txema Lopez [this message]
2007-02-13 15:06 ` [U-Boot-Users] [PATCH] Fixup relocation patch Grant Likely
2007-02-13 16:25 ` Joakim Tjernlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45D183F8.8050707@aotek.es \
--to=tlopez@aotek.es \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.