Parcourir la 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 il y a 15 ans
Parent
révision
cc4363acca
2 fichiers modifiés avec 27 ajouts et 0 suppressions
  1. 19
    0
      src/include/gpxe/smbios.h
  2. 8
    0
      src/interface/smbios/smbios_settings.c

+ 19
- 0
src/include/gpxe/smbios.h Voir le fichier

@@ -113,6 +113,25 @@ struct smbios_system_information {
113 113
 /** SMBIOS system information structure type */
114 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 136
  * SMBIOS entry point descriptor
118 137
  *

+ 8
- 0
src/interface/smbios/smbios_settings.c Voir le fichier

@@ -198,4 +198,12 @@ struct setting smbios_named_settings[] __setting = {
198 198
 					   serial ),
199 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
 };

Chargement…
Annuler
Enregistrer