summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/include/coreboot_tables.h1
-rw-r--r--payloads/libpayload/include/sysinfo.h3
-rw-r--r--payloads/libpayload/libc/coreboot.c9
3 files changed, 13 insertions, 0 deletions
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;
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index 03778b6d2a..e14b144ee4 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -239,6 +239,12 @@ static void cb_parse_vpd(void *ptr, struct sysinfo_t *info)
info->chromeos_vpd = phys_to_virt(cbmem->cbmem_tab);
}
+static void cb_parse_fmap_cache(void *ptr, struct sysinfo_t *info)
+{
+ struct cb_cbmem_tab *const cbmem = (struct cb_cbmem_tab *)ptr;
+ info->fmap_cache = phys_to_virt(cbmem->cbmem_tab);
+}
+
#if CONFIG(LP_TIMER_RDTSC)
static void cb_parse_tsc_info(void *ptr, struct sysinfo_t *info)
{
@@ -412,6 +418,9 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_VPD:
cb_parse_vpd(ptr, info);
break;
+ case CB_TAG_FMAP:
+ cb_parse_fmap_cache(ptr, info);
+ break;
default:
cb_parse_arch_specific(rec, info);
break;