From 3d4923d85ab07f8ea2b30018763c6bef269e5796 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Fri, 27 Sep 2019 00:02:25 -0700 Subject: libpayload: Add fmap_cache to sysinfo_t Now that FMAP is cached in CBMEM and its pointer is added to coreboot table for quick lookup, this change adds a new member "fmap_cache" to sysinfo_t that can be used by payloads to get to FMAP cache. BUG=b:141723751 Change-Id: If894c20c2de89a9d8564561bc7780c86f3f4135a Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/c/coreboot/+/35640 Tested-by: build bot (Jenkins) Reviewed-by: Shelley Chen Reviewed-by: Patrick Rudolph Reviewed-by: Arthur Heymans Reviewed-by: Paul Menzel Reviewed-by: Aaron Durbin --- payloads/libpayload/include/coreboot_tables.h | 1 + payloads/libpayload/include/sysinfo.h | 3 +++ 2 files changed, 4 insertions(+) (limited to 'payloads/libpayload/include') diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h index bf2cf022d1..c24d6acfd6 100644 --- a/payloads/libpayload/include/coreboot_tables.h +++ b/payloads/libpayload/include/coreboot_tables.h @@ -78,6 +78,7 @@ enum { CB_TAG_VBOOT_WORKBUF = 0x0034, CB_TAG_MMC_INFO = 0x0035, CB_TAG_TCPA_LOG = 0x0036, + CB_TAG_FMAP = 0x0037, CB_TAG_CMOS_OPTION_TABLE = 0x00c8, CB_TAG_OPTION = 0x00c9, CB_TAG_OPTION_ENUM = 0x00ca, diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h index 50f0e3962c..c05be7c159 100644 --- a/payloads/libpayload/include/sysinfo.h +++ b/payloads/libpayload/include/sysinfo.h @@ -128,6 +128,9 @@ struct sysinfo_t { uint32_t mtc_size; void *chromeos_vpd; int mmc_early_wake_status; + + /* Pointer to FMAP cache in CBMEM */ + void *fmap_cache; }; extern struct sysinfo_t lib_sysinfo; -- cgit v1.2.3