From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] x86: Force the lib_sysinfo structure to be in the .data section
Date: Sat, 03 Dec 2011 08:10:04 +1100 [thread overview]
Message-ID: <4ED93EAC.7040904@gmail.com> (raw)
In-Reply-To: <1322633275-10542-4-git-send-email-gabeblack@chromium.org>
Hi Gabe,
On 30/11/11 17:07, Gabe Black wrote:
> Otherwise it ends up in the .bss section. U-boot assumes that it doesn't
> need to copy it over during relocation, and instead fills that whole
> section with zeroes. If we really were booting from ROM that would be
> appropriate, but we need some information from the coreboot tables (memory
> size) before then and have to fill that structure before relocation. We
> skirt u-boot's assumption by putting this in .data where it assumes there
> is still read only but non-zero data.
>
> Signed-off-by: Gabe Black <gabeblack@chromium.org>
> ---
> arch/x86/cpu/coreboot/sysinfo.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/cpu/coreboot/sysinfo.c b/arch/x86/cpu/coreboot/sysinfo.c
> index 464f8a1..e74fe0a 100644
> --- a/arch/x86/cpu/coreboot/sysinfo.c
> +++ b/arch/x86/cpu/coreboot/sysinfo.c
> @@ -30,4 +30,10 @@
>
> #include <asm/ic/coreboot/sysinfo.h>
>
> -struct sysinfo_t lib_sysinfo;
> +/*
> + * This needs to be in the .data section so that it's copied over during
> + * relocation. By default it's put in the .bss section which is simply filled
> + * with zeroes when transitioning from "ROM", which is really RAM, to other
> + * RAM.
> + */
> +struct sysinfo_t lib_sysinfo __attribute__((section(".data")));
I think this can be logically folded into the first patch
Regards,
Graeme
next prev parent reply other threads:[~2011-12-02 21:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 6:07 [U-Boot] [PATCH 0/4] Add code to read in the coreboot tables and fill in memory info Gabe Black
2011-11-30 6:07 ` [U-Boot] [PATCH 1/4] x86: Import code from coreboot's libpayload to parse the coreboot table Gabe Black
2011-12-02 12:06 ` Graeme Russ
2011-11-30 6:07 ` [U-Boot] [PATCH 2/4] x86: Determine the ram size using the coreboot tables Gabe Black
2011-11-30 6:07 ` [U-Boot] [PATCH 3/4] x86: Force the lib_sysinfo structure to be in the .data section Gabe Black
2011-12-02 21:10 ` Graeme Russ [this message]
2011-12-02 21:16 ` Gabe Black
2011-12-02 21:22 ` Graeme Russ
2011-12-02 21:27 ` Gabe Black
2012-01-08 5:19 ` Mike Frysinger
2011-11-30 6:07 ` [U-Boot] [PATCH 4/4] x86: Add infrastructure to extract an e820 table from the coreboot tables Gabe Black
2011-12-02 21:14 ` Graeme Russ
2011-12-02 21:24 ` Gabe Black
2011-12-02 21:36 ` Graeme Russ
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=4ED93EAC.7040904@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 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.