public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] board_f for x86
Date: Wed, 25 Feb 2015 11:06:56 +0000	[thread overview]
Message-ID: <1424862416.2556.24.camel@synopsys.com> (raw)

Hi Simon,

I'm currently reworking start-up code for ARC with intention to leave as
little of assembly code as possible. On that way I decided to use the
same approach as x86 does.

In particular I mean:

 * Use of sequence "copy_uboot_to_ram", "clear_bss" &
"do_elf_reloc_fixups".

 * Use of "board_init_f_r_trampoline" for final fix-ups after relocation
(basically I do new stack-pointers setup and that's it)

 * Use of "board_init_f_r" with "init_sequence_f_r"

I may post patches that implement those changes for ARC if of any
interest.

During this development I faced a number of questions I'd like to
discuss.

 [1] Comment to "init_sequence_f_r" says:
 --->8---
 The '_f_r' sequence must, as a minimum, copy U-Boot to RAM (if
 supported).  It _should_, if possible, copy global data to RAM and
 initialise the CPU caches (to speed up the relocation process)
 --->8--- 

And indeed we have "init_cache_f_r" in that sequence, but what looks
strange to me - isn't it too late for caches to be enabled (in terms of
relocation speed-up)? Because relocation (both copying and fixups)
happens in the end of "init_sequence_f" before jump_to_copy() where for
x86 we call board_init_f_r_trampoline() -> board_init_f_r().

So probably we need to move cache_enable() before copy_uboot_to_ram in
"init_sequence_f"?

 [2] Why "board_init_f_mem" is placed in #else /* CONFIG_X86 */? I would
say that this function is orthogonal to a particular architecture. 

-Alexey

             reply	other threads:[~2015-02-25 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 11:06 Alexey Brodkin [this message]
2015-03-02 16:02 ` [U-Boot] board_f for x86 Simon Glass

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=1424862416.2556.24.camel@synopsys.com \
    --to=alexey.brodkin@synopsys.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