diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2020-05-14 15:16:22 +0200 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-05-27 14:40:09 +0800 |
commit | 53942b96586fd0c9b15fb89b7c73dbf4047350df (patch) | |
tree | 439f724bb95992ad691f13405b52ef9b58d03a18 /arch/x86/cpu/coreboot | |
parent | d9e7efe10a8ebf8e2142374be8438540838eb235 (diff) |
x86: coreboot: add SMBIOS cbmem entry parsing
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/coreboot')
-rw-r--r-- | arch/x86/cpu/coreboot/tables.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c index 0f04c4f8e9..a5d31d1dea 100644 --- a/arch/x86/cpu/coreboot/tables.c +++ b/arch/x86/cpu/coreboot/tables.c @@ -69,6 +69,17 @@ static void cb_parse_vbnv(unsigned char *ptr, struct sysinfo_t *info) info->vbnv_size = vbnv->vbnv_size; } +static void cb_parse_cbmem_entry(unsigned char *ptr, struct sysinfo_t *info) +{ + struct cb_cbmem_entry *entry = (struct cb_cbmem_entry *)ptr; + + if (entry->id != CBMEM_ID_SMBIOS) + return; + + info->smbios_start = entry->address; + info->smbios_size = entry->entry_size; +} + static void cb_parse_gpios(unsigned char *ptr, struct sysinfo_t *info) { int i; @@ -206,6 +217,9 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info) case CB_TAG_VBNV: cb_parse_vbnv(ptr, info); break; + case CB_TAG_CBMEM_ENTRY: + cb_parse_cbmem_entry(ptr, info); + break; default: cb_parse_unhandled(rec->tag, ptr); break; |