summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-06-28 17:36:53 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-07-01 07:38:00 +0000
commita37701afa373dbe35f307614779f43183fd53151 (patch)
treeff5adc0b147deb933387733c9601703bc16edd58 /src/include
parentb977c1ade30e8d3d3301f186f91c8646675dd889 (diff)
downloadcoreboot-a37701afa373dbe35f307614779f43183fd53151.tar.gz
coreboot-a37701afa373dbe35f307614779f43183fd53151.tar.bz2
coreboot-a37701afa373dbe35f307614779f43183fd53151.zip
SMBIOS: Introduce `smbios_full_table_len` function
Introduce the `smbios_full_table_len` function to consolidate table length calculation. The case where the length of a table equals the length of the structure happens when a table has no strings. Change-Id: Ibc60075e82eb66b5d0b7132b16da000b153413f9 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55909 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/smbios.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/smbios.h b/src/include/smbios.h
index 83900990b9e1..edc56f706d4f 100644
--- a/src/include/smbios.h
+++ b/src/include/smbios.h
@@ -10,6 +10,8 @@ unsigned long smbios_write_tables(unsigned long start);
int smbios_add_string(u8 *start, const char *str);
int smbios_string_table_len(u8 *start);
+struct smbios_header;
+int smbios_full_table_len(struct smbios_header *header, u8 *str_table_start);
void *smbios_carve_table(unsigned long start, u8 type, u8 length, u16 handle);
/* Used by mainboard to add an on-board device */