Ravi kumar has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59193 )
Change subject: WIP libpayload: Parse DDR Information through coreboot tables WIP ......................................................................
WIP libpayload: Parse DDR Information through coreboot tables WIP
Signed-off-by: Ravi Kumar Bokka rbokka@codeaurora.org Change-Id: Ieca7e9fc0e1a018fcb2e9315aebee088edac858e --- M payloads/libpayload/include/coreboot_tables.h M payloads/libpayload/include/sysinfo.h M payloads/libpayload/libc/coreboot.c 3 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/59193/1
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h index 914cfa5..2e3a416 100644 --- a/payloads/libpayload/include/coreboot_tables.h +++ b/payloads/libpayload/include/coreboot_tables.h @@ -88,6 +88,7 @@ CB_TAG_OPTION_ENUM = 0x00ca, CB_TAG_OPTION_DEFAULTS = 0x00cb, CB_TAG_OPTION_CHECKSUM = 0x00cc, + CB_TAG_MEM_CHIP_INFO = 0x00ce, /* memchip info */ };
struct cbuint64 { diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h index b34476d..6197fc4 100644 --- a/payloads/libpayload/include/sysinfo.h +++ b/payloads/libpayload/include/sysinfo.h @@ -83,6 +83,7 @@ uintptr_t compiler; uintptr_t linker; uintptr_t assembler; + uintptr_t mem_chip_base;
uintptr_t cb_version;
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c index bd10411..3221416 100644 --- a/payloads/libpayload/libc/coreboot.c +++ b/payloads/libpayload/libc/coreboot.c @@ -128,6 +128,11 @@ info->macs[i] = macs->mac_addrs[i]; }
+static void cb_parse_mem_chip_info(void *ptr, struct sysinfo_t *info) +{ + info->mem_chip_base = get_cbmem_addr(ptr); +} + static void cb_parse_tstamp(unsigned char *ptr, struct sysinfo_t *info) { info->tstamp_table = get_cbmem_addr(ptr); @@ -348,6 +353,9 @@ case CB_TAG_ASSEMBLER: cb_parse_string(ptr, &info->assembler); break; + case CB_TAG_MEM_CHIP_INFO: + cb_parse_mem_chip_info(ptr, info); + break; #if CONFIG(LP_NVRAM) case CB_TAG_CMOS_OPTION_TABLE: cb_parse_optiontable(ptr, info);