summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/include
diff options
context:
space:
mode:
authorMichael Brown2007-11-21 02:58:27 +0100
committerMichael Brown2007-11-21 02:58:27 +0100
commit68c438954de2b7c0d65557c437a36084d64d05c9 (patch)
treea619c9ea0cbc150ae2b5f5ded69cb564ac86a81b /src/arch/i386/include
parentReplace "Etherboot" strings with "gPXE". (diff)
downloadipxe-68c438954de2b7c0d65557c437a36084d64d05c9.tar.gz
ipxe-68c438954de2b7c0d65557c437a36084d64d05c9.tar.xz
ipxe-68c438954de2b7c0d65557c437a36084d64d05c9.zip
Update SMBIOS internal API to be easier to use, and not to require
potentially exorbitant amounts of stack space.
Diffstat (limited to 'src/arch/i386/include')
-rw-r--r--src/arch/i386/include/smbios.h39
1 files changed, 38 insertions, 1 deletions
diff --git a/src/arch/i386/include/smbios.h b/src/arch/i386/include/smbios.h
index 5b35ade1..a0a7a222 100644
--- a/src/arch/i386/include/smbios.h
+++ b/src/arch/i386/include/smbios.h
@@ -6,6 +6,43 @@
* System Management BIOS
*/
-extern int find_smbios_serial ( void *data, size_t len );
+#include <stdint.h>
+
+/** An SMBIOS structure header */
+struct smbios_header {
+ /** Type */
+ uint8_t type;
+ /** Length */
+ uint8_t length;
+ /** Handle */
+ uint16_t handle;
+} __attribute__ (( packed ));
+
+/** SMBIOS system information structure */
+struct smbios_system_information {
+ /** SMBIOS structure header */
+ struct smbios_header header;
+ /** Manufacturer string */
+ uint8_t manufacturer;
+ /** Product string */
+ uint8_t product;
+ /** Version string */
+ uint8_t version;
+ /** Serial number string */
+ uint8_t serial;
+ /** UUID */
+ uint8_t uuid[16];
+} __attribute__ (( packed ));
+
+/** SMBIOS system information structure type */
+#define SMBIOS_TYPE_SYSTEM_INFORMATION 1
+
+struct smbios_strings;
+extern int find_smbios_structure ( unsigned int type,
+ void *structure, size_t length,
+ struct smbios_strings *strings );
+extern int find_smbios_string ( struct smbios_strings *strings,
+ unsigned int index,
+ char *buffer, size_t length );
#endif /* _SMBIOS_H */