summaryrefslogtreecommitdiff
path: root/payloads/libpayload/libc/coreboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/libc/coreboot.c')
-rw-r--r--payloads/libpayload/libc/coreboot.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index c6fb57fde9..25812e5a95 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -47,6 +47,12 @@ void *get_cbmem_ptr(unsigned char *ptr)
return phys_to_virt(cbmem->cbmem_tab);
}
+uintptr_t get_cbmem_addr(const void *const cbmem_tab_entry)
+{
+ const struct cb_cbmem_tab *const cbmem = cbmem_tab_entry;
+ return cbmem->cbmem_tab;
+}
+
static void cb_parse_memory(void *ptr, struct sysinfo_t *info)
{
struct cb_memory *mem = ptr;
@@ -135,7 +141,7 @@ static void cb_parse_tstamp(unsigned char *ptr, struct sysinfo_t *info)
static void cb_parse_cbmem_cons(unsigned char *ptr, struct sysinfo_t *info)
{
- info->cbmem_cons = get_cbmem_ptr(ptr);
+ info->cbmem_cons = get_cbmem_addr(ptr);
}
static void cb_parse_acpi_gnvs(unsigned char *ptr, struct sysinfo_t *info)