[coreboot-gerrit] Patch set updated for coreboot: 82ba9bf libpayload: Parse CBMEM ACPI GNVS pointer
Aaron Durbin (adurbin@google.com)
gerrit at coreboot.org
Thu Jan 30 03:30:20 CET 2014
Aaron Durbin (adurbin at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5016
-gerrit
commit 82ba9bf6f2e76faf2345c8140e3b71a0160f9ccd
Author: Duncan Laurie <dlaurie at chromium.org>
Date: Thu Dec 12 10:43:58 2013 -0800
libpayload: Parse CBMEM ACPI GNVS pointer
Pull the ACPI GNVS pointer from CBMEM and expose it in
the sysinfo structure for use by payloads.
BUG=chrome-os-partner:24380
BRANCH=none
TEST=build and boot rambi with emmc in ACPI mode
Change-Id: I47c358f33c464a4a01080268fb553705218c940c
Signed-off-by: Duncan Laurie <dlaurie at chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/179900
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
payloads/libpayload/arch/x86/coreboot.c | 9 +++++++++
payloads/libpayload/include/coreboot_tables.h | 1 +
payloads/libpayload/include/sysinfo.h | 1 +
3 files changed, 11 insertions(+)
diff --git a/payloads/libpayload/arch/x86/coreboot.c b/payloads/libpayload/arch/x86/coreboot.c
index bd10b22..12d3a12 100644
--- a/payloads/libpayload/arch/x86/coreboot.c
+++ b/payloads/libpayload/arch/x86/coreboot.c
@@ -136,6 +136,12 @@ static void cb_parse_mrc_cache(unsigned char *ptr, struct sysinfo_t *info)
}
#ifdef CONFIG_NVRAM
+static void cb_parse_acpi_gnvs(unsigned char *ptr, struct sysinfo_t *info)
+{
+ struct cb_cbmem_tab *const cbmem = (struct cb_cbmem_tab *)ptr;
+ info->acpi_gnvs = phys_to_virt(cbmem->cbmem_tab);
+}
+
static void cb_parse_optiontable(void *ptr, struct sysinfo_t *info)
{
/* ptr points to a coreboot table entry and is already virtual */
@@ -288,6 +294,9 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_MRC_CACHE:
cb_parse_mrc_cache(ptr, info);
break;
+ case CB_TAG_ACPI_GNVS:
+ cb_parse_acpi_gnvs(ptr, info);
+ break;
case CB_TAG_X86_ROM_MTRR:
cb_parse_x86_rom_var_mtrr(ptr, info);
break;
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h
index 26838e8..911157b 100644
--- a/payloads/libpayload/include/coreboot_tables.h
+++ b/payloads/libpayload/include/coreboot_tables.h
@@ -195,6 +195,7 @@ struct cb_vdat {
#define CB_TAG_TIMESTAMPS 0x0016
#define CB_TAG_CBMEM_CONSOLE 0x0017
#define CB_TAG_MRC_CACHE 0x0018
+#define CB_TAG_ACPI_GNVS 0x0024
struct cb_cbmem_tab {
uint32_t tag;
uint32_t size;
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index a66c1e7..e2ceffc 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -107,6 +107,7 @@ struct sysinfo_t {
void *tstamp_table;
void *cbmem_cons;
void *mrc_cache;
+ void *acpi_gnvs;
};
extern struct sysinfo_t lib_sysinfo;
More information about the coreboot-gerrit
mailing list