The new function will be useful for code that just needs the
address and length of SMBIOS tables.

Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
 src/util.h          | 1 +
 src/fw/biostables.c | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/src/util.h b/src/util.h
index f761271c..2e151752 100644
--- a/src/util.h
+++ b/src/util.h
@@ -88,6 +88,7 @@ u32 find_resume_vector(void);
 void acpi_reboot(void);
 void find_acpi_features(void);
 extern struct smbios_21_entry_point *SMBios21Addr;
+void *smbios_get_tables(u32 *length);
 void copy_smbios_21(void *pos);
 void display_uuid(void);
 void copy_table(void *pos);
diff --git a/src/fw/biostables.c b/src/fw/biostables.c
index 3c30331e..1adc694c 100644
--- a/src/fw/biostables.c
+++ b/src/fw/biostables.c
@@ -315,6 +315,15 @@ copy_smbios_21(void *pos)
     SMBios21Addr = copy_fseg_table("SMBIOS", pos, p->length);
 }
 
+void *smbios_get_tables(u32 *length)
+{
+    if (SMBios21Addr) {
+        *length = SMBios21Addr->structure_table_length;
+        return (void *)SMBios21Addr->structure_table_address;
+    }
+    return NULL;
+}
+
 void
 display_uuid(void)
 {
-- 
2.28.0
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to