summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/ipxe/smbios.h17
-rw-r--r--src/interface/smbios/smbios_settings.c12
2 files changed, 29 insertions, 0 deletions
diff --git a/src/include/ipxe/smbios.h b/src/include/ipxe/smbios.h
index 1a34ac04c..ef5892a21 100644
--- a/src/include/ipxe/smbios.h
+++ b/src/include/ipxe/smbios.h
@@ -116,6 +116,23 @@ struct smbios_system_information {
/** SMBIOS system information structure type */
#define SMBIOS_TYPE_SYSTEM_INFORMATION 1
+/** SMBIOS base board information structure */
+struct smbios_base_board_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;
+} __attribute__ (( packed ));
+
+/** SMBIOS base board information structure type */
+#define SMBIOS_TYPE_BASE_BOARD_INFORMATION 2
+
/** SMBIOS enclosure information structure */
struct smbios_enclosure_information {
/** SMBIOS structure header */
diff --git a/src/interface/smbios/smbios_settings.c b/src/interface/smbios/smbios_settings.c
index 5dcf00201..83e4320e9 100644
--- a/src/interface/smbios/smbios_settings.c
+++ b/src/interface/smbios/smbios_settings.c
@@ -241,3 +241,15 @@ const struct setting asset_setting __setting ( SETTING_HOST_EXTRA, asset ) = {
.type = &setting_type_string,
.scope = &smbios_settings_scope,
};
+
+/** Board serial number setting (may differ from chassis serial number) */
+const struct setting board_serial_setting __setting ( SETTING_HOST_EXTRA,
+ board_serial ) = {
+ .name = "board-serial",
+ .description = "Base board serial",
+ .tag = SMBIOS_STRING_TAG ( SMBIOS_TYPE_BASE_BOARD_INFORMATION,
+ struct smbios_base_board_information,
+ serial ),
+ .type = &setting_type_string,
+ .scope = &smbios_settings_scope,
+};