From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Tue, 7 Jul 2020 21:33:05 -0600 Subject: [PATCH v1 37/43] x86: Store the coreboot table address in global_data In-Reply-To: References: <20200615035738.248710-18-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On Wed, 1 Jul 2020 at 09:16, Wolfgang Wallner wrote: > > Hi Simon, > > -----"Simon Glass" schrieb: ----- > > Betreff: [PATCH v1 37/43] x86: Store the coreboot table address in global_data > > > > At present this information is used to locate and parse the tables but is > > not stored. Store it so that we can display it to the user, e.g. with the > > 'bdinfo' command. > > > > Signed-off-by: Simon Glass > > --- > > > > arch/x86/cpu/coreboot/tables.c | 8 +++++++- > > arch/x86/cpu/i386/cpu.c | 7 ++++++- > > arch/x86/include/asm/global_data.h | 1 + > > 3 files changed, 14 insertions(+), 2 deletions(-) > > > > diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c > > index a5d31d1dea..1594b4a8b2 100644 > > --- a/arch/x86/cpu/coreboot/tables.c > > +++ b/arch/x86/cpu/coreboot/tables.c > > @@ -10,6 +10,8 @@ > > #include > > #include > > > > +DECLARE_GLOBAL_DATA_PTR; > > + > > /* > > * 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 > > @@ -243,6 +245,10 @@ int get_coreboot_info(struct sysinfo_t *info) > > if (addr < 0) > > return addr; > > ret = cb_parse_header((void *)addr, 0x1000, info); > > + if (!ret) > > + return -ENOENT; > > + gd->arch.coreboot_table = addr; > > + gd->flags |= GD_FLG_SKIP_LL_INIT; > > Why is GD_FLG_SKIP_LL_INIT now set in get_coreboot_info()? I found that we need to set it both when running the actual coreboot build and when running a bare-metal board. So this is the best place to do it. Regards, Simon