summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/include
diff options
context:
space:
mode:
authorMichael Brown2008-12-05 00:09:48 +0100
committerMichael Brown2008-12-05 00:19:12 +0100
commit29480dd7159190b91cca17298a87425a58826d32 (patch)
tree8fc1e70c689ab20d6ec7e85955a88a03a09354fa /src/arch/i386/include
parent[efi] Allow use of EFI configuration tables (diff)
downloadipxe-29480dd7159190b91cca17298a87425a58826d32.tar.gz
ipxe-29480dd7159190b91cca17298a87425a58826d32.tar.xz
ipxe-29480dd7159190b91cca17298a87425a58826d32.zip
[efi] Use EFI-native mechanism for accessing SMBIOS table
EFI provides a copy of the SMBIOS table accessible via the EFI system table, which we should use instead of manually scanning through the F000:0000 segment.
Diffstat (limited to 'src/arch/i386/include')
-rw-r--r--src/arch/i386/include/bits/errfile.h3
-rw-r--r--src/arch/i386/include/bits/smbios.h12
-rw-r--r--src/arch/i386/include/gpxe/bios_smbios.h16
-rw-r--r--src/arch/i386/include/smbios.h60
4 files changed, 29 insertions, 62 deletions
diff --git a/src/arch/i386/include/bits/errfile.h b/src/arch/i386/include/bits/errfile.h
index 70c78eaf..1723063b 100644
--- a/src/arch/i386/include/bits/errfile.h
+++ b/src/arch/i386/include/bits/errfile.h
@@ -9,10 +9,9 @@
#define ERRFILE_memtop_umalloc ( ERRFILE_ARCH | ERRFILE_CORE | 0x00000000 )
#define ERRFILE_memmap ( ERRFILE_ARCH | ERRFILE_CORE | 0x00010000 )
#define ERRFILE_pnpbios ( ERRFILE_ARCH | ERRFILE_CORE | 0x00020000 )
-#define ERRFILE_smbios ( ERRFILE_ARCH | ERRFILE_CORE | 0x00030000 )
+#define ERRFILE_bios_smbios ( ERRFILE_ARCH | ERRFILE_CORE | 0x00030000 )
#define ERRFILE_biosint ( ERRFILE_ARCH | ERRFILE_CORE | 0x00040000 )
#define ERRFILE_int13 ( ERRFILE_ARCH | ERRFILE_CORE | 0x00050000 )
-#define ERRFILE_smbios_settings ( ERRFILE_ARCH | ERRFILE_CORE | 0x00060000 )
#define ERRFILE_bootsector ( ERRFILE_ARCH | ERRFILE_IMAGE | 0x00000000 )
#define ERRFILE_bzimage ( ERRFILE_ARCH | ERRFILE_IMAGE | 0x00010000 )
diff --git a/src/arch/i386/include/bits/smbios.h b/src/arch/i386/include/bits/smbios.h
new file mode 100644
index 00000000..647ea19e
--- /dev/null
+++ b/src/arch/i386/include/bits/smbios.h
@@ -0,0 +1,12 @@
+#ifndef _BITS_SMBIOS_H
+#define _BITS_SMBIOS_H
+
+/** @file
+ *
+ * i386-specific SMBIOS API implementations
+ *
+ */
+
+#include <gpxe/bios_smbios.h>
+
+#endif /* _BITS_SMBIOS_H */
diff --git a/src/arch/i386/include/gpxe/bios_smbios.h b/src/arch/i386/include/gpxe/bios_smbios.h
new file mode 100644
index 00000000..0a6f277a
--- /dev/null
+++ b/src/arch/i386/include/gpxe/bios_smbios.h
@@ -0,0 +1,16 @@
+#ifndef _GPXE_BIOS_SMBIOS_H
+#define _GPXE_BIOS_SMBIOS_H
+
+/** @file
+ *
+ * Standard PC-BIOS SMBIOS interface
+ *
+ */
+
+#ifdef SMBIOS_PCBIOS
+#define SMBIOS_PREFIX_pcbios
+#else
+#define SMBIOS_PREFIX_pcbios __pcbios_
+#endif
+
+#endif /* _GPXE_BIOS_SMBIOS_H */
diff --git a/src/arch/i386/include/smbios.h b/src/arch/i386/include/smbios.h
deleted file mode 100644
index f2736dc3..00000000
--- a/src/arch/i386/include/smbios.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef _SMBIOS_H
-#define _SMBIOS_H
-
-/** @file
- *
- * System Management BIOS
- */
-
-#include <stdint.h>
-
-/** An SMBIOS structure header */
-struct smbios_header {
- /** Type */
- uint8_t type;
- /** Length */
- uint8_t len;
- /** Handle */
- uint16_t handle;
-} __attribute__ (( packed ));
-
-/** SMBIOS structure descriptor */
-struct smbios_structure {
- /** Copy of SMBIOS structure header */
- struct smbios_header header;
- /** Offset of structure within SMBIOS */
- size_t offset;
- /** Length of strings section */
- size_t strings_len;
-};
-
-/** 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];
- /** Wake-up type */
- uint8_t wakeup;
-} __attribute__ (( packed ));
-
-/** SMBIOS system information structure type */
-#define SMBIOS_TYPE_SYSTEM_INFORMATION 1
-
-extern int find_smbios_structure ( unsigned int type,
- struct smbios_structure *structure );
-extern int read_smbios_structure ( struct smbios_structure *structure,
- void *data, size_t len );
-extern int read_smbios_string ( struct smbios_structure *structure,
- unsigned int index,
- void *data, size_t len );
-
-#endif /* _SMBIOS_H */