From d62a5012d6e5904279eb56507bc2a021d2acce77 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Mon, 28 Jun 2021 17:18:06 +0200 Subject: SMBIOS: Introduce `smbios_carve_table` function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Factor out some boilerplate code into a helper `smbios_carve_table` function, which zeroes out the table memory and fills in the header fields common to all tables. Change-Id: Iece2f64f9151d3c79813f6264dfb3a92d98c2035 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/55907 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Michał Żygowski --- src/include/smbios.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include') diff --git a/src/include/smbios.h b/src/include/smbios.h index 1e307c8324..83900990b9 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); +void *smbios_carve_table(unsigned long start, u8 type, u8 length, u16 handle); + /* Used by mainboard to add an on-board device */ enum misc_slot_type; enum misc_slot_length; -- cgit v1.2.3