From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/10] x86: Permit bootstage and timer data to be used prior to relocation
Date: Sat, 15 Dec 2012 09:15:21 +1100 [thread overview]
Message-ID: <50CBA4F9.2010102@gmail.com> (raw)
In-Reply-To: <1355519594-5694-3-git-send-email-sjg@chromium.org>
Hi Simon,
On 15/12/12 08:13, Simon Glass wrote:
> It is useful to be able to access the timer before U-Boot has relocated
> so that we can fully support bootstage.
>
> Move the relevant variables to the data region to support this.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> arch/x86/cpu/coreboot/coreboot.c | 4 ++--
> arch/x86/cpu/interrupts.c | 2 +-
> arch/x86/lib/timer.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/cpu/coreboot/coreboot.c b/arch/x86/cpu/coreboot/coreboot.c
> index 9c9431e..22474f5 100644
> --- a/arch/x86/cpu/coreboot/coreboot.c
> +++ b/arch/x86/cpu/coreboot/coreboot.c
> @@ -68,8 +68,8 @@ int board_early_init_r(void)
> void show_boot_progress(int val)
> {
> #if MIN_PORT80_KCLOCKS_DELAY
> - static uint32_t prev_stamp;
> - static uint32_t base;
> + static uint32_t prev_stamp __attribute__((section(".data")));
> + static uint32_t base __attribute__((section(".data")));
NAK
This may work for coreboot where SDRAM is already initialised and you've
loaded U-Boot into RAM, but it will not work when U-Boot is in Flash as all
sections (including .data) are read-only until after relocation.
The stack and Global Data are the only guaranteed read/write locations
prior to relocation
Regards,
Graeme
next prev parent reply other threads:[~2012-12-14 22:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 21:13 [U-Boot] [PATCH 01/10] x86: Add function to get top of usable ram Simon Glass
2012-12-14 21:13 ` [U-Boot] [PATCH 02/10] x86: Add basic cache operations Simon Glass
2012-12-14 21:13 ` [U-Boot] [PATCH 03/10] x86: Permit bootstage and timer data to be used prior to relocation Simon Glass
2012-12-14 22:15 ` Graeme Russ [this message]
2012-12-14 22:35 ` Simon Glass
2012-12-19 1:32 ` Simon Glass
2012-12-19 21:39 ` Graeme Russ
2012-12-19 22:01 ` Simon Glass
2012-12-14 21:13 ` [U-Boot] [PATCH 04/10] x86: Add an __end symbol to signal the end of the U-Boot binary Simon Glass
2012-12-14 21:13 ` [U-Boot] [PATCH 05/10] x86: Rearrange the output input to remove BSS Simon Glass
2012-12-14 21:13 ` [U-Boot] [PATCH 06/10] x86: Support relocation of FDT on start-up Simon Glass
2012-12-14 21:13 ` [U-Boot] [PATCH 07/10] x86: Add error checking to x86 relocation code Simon Glass
2012-12-14 21:13 ` [U-Boot] [PATCH 08/10] x86: Adjust link device tree include file Simon Glass
2012-12-14 21:13 ` [U-Boot] [PATCH 09/10] x86: Enable CONFIG_OF_CONTROL on coreboot Simon Glass
2012-12-14 21:13 ` [U-Boot] [PATCH 10/10] x86: Remove real mode code for coreboot 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=50CBA4F9.2010102@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