diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h index 7c47074aa1..f18ad62308 100644 --- a/payloads/libpayload/include/sysinfo.h +++ b/payloads/libpayload/include/sysinfo.h @@ -45,6 +45,10 @@ #include +#if CONFIG(LP_GPL) +#include +#endif + /* * This is a collection of information and pointers gathered * mostly from the coreboot table. @@ -174,6 +178,8 @@ struct sysinfo_t { uintptr_t pvmfw; uint32_t pvmfw_size; enum boot_mode_t boot_mode; + + uintptr_t memory_info; }; extern struct sysinfo_t lib_sysinfo; diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c index 11703ee178..b1be37c19e 100644 --- a/payloads/libpayload/libc/coreboot.c +++ b/payloads/libpayload/libc/coreboot.c @@ -273,6 +273,9 @@ static void cb_parse_cbmem_entry(void *ptr, struct sysinfo_t *info) info->pvmfw = cbmem_entry->address; info->pvmfw_size = cbmem_entry->entry_size; break; + case CBMEM_ID_MEMINFO: + info->memory_info = cbmem_entry->address; + break; default: break; }