diff options
author | Simon Glass <sjg@chromium.org> | 2023-07-25 15:37:06 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2023-08-01 10:08:49 +0800 |
commit | db971a7587d04b3f1cf2e6d452f9e37f50c5b3ed (patch) | |
tree | 79795a577f17829294c18253349f4a56ef9d254e /arch/x86/lib | |
parent | d560f7cae04128061167c1507af08293b666c766 (diff) |
x86: Add a little more info to cbsysinfo
Show the number of records in the table and the total table size in
bytes.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/coreboot/cb_sysinfo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/lib/coreboot/cb_sysinfo.c b/arch/x86/lib/coreboot/cb_sysinfo.c index 42cc3a128d9..dfbc80c430e 100644 --- a/arch/x86/lib/coreboot/cb_sysinfo.c +++ b/arch/x86/lib/coreboot/cb_sysinfo.c @@ -447,6 +447,8 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info) ptr += rec->size; } + info->table_size += (void *)ptr - (void *)header; + info->rec_count += header->table_entries; return 1; } @@ -462,6 +464,8 @@ int get_coreboot_info(struct sysinfo_t *info) addr = locate_coreboot_table(); if (addr < 0) return addr; + info->table_size = 0; + info->rec_count = 0; ret = cb_parse_header((void *)addr, 0x1000, info); if (!ret) return -ENOENT; |