From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC][PATCH 0/3] New i386 board (includes code relocation)
Date: Mon, 29 Sep 2008 23:01:13 +1000 [thread overview]
Message-ID: <48E0D199.6010404@gmail.com> (raw)
Hi All,
I have managed to get the initial port of U-Boot to my custom sc520
(x86) based board built and running and even managed (I think) to get
the fundamentals of the code relocation working (really happy about
that) and I would like some feedback on my mods - specifically the
relocation methodology I am using does not, I think, quite fit that
used on other boards.
When the i386 code was originally written, start.S calls
start_i386boot (). Other boards seem to call board_init_f () which
calls relocate_code () which performs the actual relocation and calls
board_init_r (). Whats more, I have defined CFG_RELOC_ADDR which
specifies the destination in RAM of the relocated code whereas other
boards seem to dynamically calculate the relocation address based on
stack, data, bss etc segment sizes. My relocation code performs the
code relocation before the first C function is called rather than
between board_init_f and board_init_r.
Q. Should I spend a some more time and implement board_init_f /
relocate_code / board_init_r as per other boards or is the approach
I have taken acceptable?
I am concerned about the size of the relocation copy - If you take a
look at /board/eNET/u-boot.lds
. = 0x38040000; /* Where bootcode in the flash is mapped */
.text : { *(.text); }
. = ALIGN(4);
.rodata : { *(.rodata) *(.rodata.str1.1) *(.rodata.str1.32) }
_i386boot_text_size = SIZEOF(.text) + SIZEOF(.rodata);
I only copy _i386boot_text_size bytes (adjusted up to the nearest
4-byte boundary.
Q. Will _i386boot_text_size take into account the . = ALIGN(4)
between .text and .rodata or should I add some further adjustments?
Finally a quick warning about [PATCH 3/3] - I've broken a cardinal
rule and combined implementing a new feature with removing an old
(test printf()'s)
Regards,
Graeme
next reply other threads:[~2008-09-29 13:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-29 13:01 Graeme Russ [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-09-29 13:03 [U-Boot] [RFC][PATCH 0/3] New i386 board (includes code relocation) Graeme Russ
2008-10-27 23:26 ` Wolfgang Denk
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=48E0D199.6010404@gmail.com \
--to=graeme.russ@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox