summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
authorMichael Brown2013-03-20 01:12:30 +0100
committerMichael Brown2013-03-20 01:12:30 +0100
commit4f742bcd95373425fde52b0d3b354bb020446542 (patch)
treea04bc2e8d2874ca1d4b7b2ac236f6bfb0ed4f47e /src/include/ipxe
parent[int13] Split out ISO9660 and El Torito definitions to separate header files (diff)
downloadipxe-4f742bcd95373425fde52b0d3b354bb020446542.tar.gz
ipxe-4f742bcd95373425fde52b0d3b354bb020446542.tar.xz
ipxe-4f742bcd95373425fde52b0d3b354bb020446542.zip
[smbios] Provide SMBIOS version number via smbios_version()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/smbios.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/ipxe/smbios.h b/src/include/ipxe/smbios.h
index fcf149ea7..0765c4e4a 100644
--- a/src/include/ipxe/smbios.h
+++ b/src/include/ipxe/smbios.h
@@ -148,8 +148,19 @@ struct smbios {
size_t len;
/** Number of SMBIOS structures */
unsigned int count;
+ /** SMBIOS version */
+ uint16_t version;
};
+/**
+ * Calculate SMBIOS version
+ *
+ * @v major Major version
+ * @v minor Minor version
+ * @ret version SMBIOS version
+ */
+#define SMBIOS_VERSION( major, minor ) ( ( (major) << 8 ) | (minor) )
+
extern int find_smbios ( struct smbios *smbios );
extern int find_smbios_structure ( unsigned int type,
struct smbios_structure *structure );
@@ -158,5 +169,6 @@ extern int read_smbios_structure ( struct smbios_structure *structure,
extern int read_smbios_string ( struct smbios_structure *structure,
unsigned int index,
void *data, size_t len );
+extern int smbios_version ( void );
#endif /* _IPXE_SMBIOS_H */