Browse Source

[smbios] Add asset tag setting

Add SMBIOS asset tag as a named setting.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
tags/v0.9.8
Timothy Stack 15 years ago
parent
commit
cc4363acca
2 changed files with 27 additions and 0 deletions
  1. 19
    0
      src/include/gpxe/smbios.h
  2. 8
    0
      src/interface/smbios/smbios_settings.c

+ 19
- 0
src/include/gpxe/smbios.h View File

113
 /** SMBIOS system information structure type */
113
 /** SMBIOS system information structure type */
114
 #define SMBIOS_TYPE_SYSTEM_INFORMATION 1
114
 #define SMBIOS_TYPE_SYSTEM_INFORMATION 1
115
 
115
 
116
+/** SMBIOS enclosure information structure */
117
+struct smbios_enclosure_information {
118
+	/** SMBIOS structure header */
119
+	struct smbios_header header;
120
+	/** Manufacturer string */
121
+	uint8_t manufacturer;
122
+	/** Type string */
123
+	uint8_t type;
124
+	/** Version string */
125
+	uint8_t version;
126
+	/** Serial number string */
127
+	uint8_t serial;
128
+	/** Asset tag */
129
+	uint8_t asset_tag;
130
+} __attribute__ (( packed ));
131
+
132
+/** SMBIOS enclosure information structure type */
133
+#define SMBIOS_TYPE_ENCLOSURE_INFORMATION 3
134
+
116
 /**
135
 /**
117
  * SMBIOS entry point descriptor
136
  * SMBIOS entry point descriptor
118
  *
137
  *

+ 8
- 0
src/interface/smbios/smbios_settings.c View File

198
 					   serial ),
198
 					   serial ),
199
 		.type = &setting_type_string,
199
 		.type = &setting_type_string,
200
 	},
200
 	},
201
+	{
202
+		.name = "asset",
203
+		.description = "Asset tag",
204
+		.tag = SMBIOS_STRING_TAG ( SMBIOS_TYPE_ENCLOSURE_INFORMATION,
205
+					   struct smbios_enclosure_information,
206
+					   asset_tag ),
207
+		.type = &setting_type_string,
208
+	},
201
 };
209
 };

Loading…
Cancel
Save