payloads/edk2: Disable the CPU Timer Lib unless supported
[coreboot.git] / src / include / smbios.h
blob3611eb6c2e750112a949690ed8e6171dfe265dc9
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef SMBIOS_H
4 #define SMBIOS_H
6 #include <types.h>
7 #include <memory_info.h>
9 unsigned long smbios_write_tables(unsigned long start);
10 int smbios_add_string(u8 *start, const char *str);
11 int smbios_string_table_len(u8 *start);
13 struct smbios_header;
14 int smbios_full_table_len(struct smbios_header *header, u8 *str_table_start);
15 void *smbios_carve_table(unsigned long start, u8 type, u8 length, u16 handle);
17 /* Used by mainboard to add an on-board device */
18 enum misc_slot_type;
19 enum misc_slot_length;
20 enum misc_slot_usage;
21 enum slot_data_bus_bandwidth;
22 int smbios_write_type9(unsigned long *current, int *handle,
23 const char *name, const enum misc_slot_type type,
24 const enum slot_data_bus_bandwidth bandwidth,
25 const enum misc_slot_usage usage,
26 const enum misc_slot_length length,
27 const u16 id, u8 slot_char1, u8 slot_char2, u8 bus, u8 dev_func);
28 enum smbios_bmc_interface_type;
29 int smbios_write_type38(unsigned long *current, int *handle,
30 const enum smbios_bmc_interface_type interface_type,
31 const u8 ipmi_rev, const u8 i2c_addr, const u8 nv_addr,
32 const u64 base_addr, const u8 base_modifier,
33 const u8 irq);
34 int smbios_write_type41(unsigned long *current, int *handle,
35 const char *name, u8 instance, u16 segment,
36 u8 bus, u8 device, u8 function, u8 device_type);
37 enum smbios_temp_location;
38 enum smbios_temp_status;
39 int smbios_write_type28(unsigned long *current, int *handle,
40 const char *name,
41 const enum smbios_temp_location location,
42 const enum smbios_temp_status status,
43 u16 max_value, u16 min_value,
44 u16 resolution, u16 tolerance,
45 u16 accuracy,
46 u32 oem,
47 u16 nominal_value);
49 int smbios_write_type43(unsigned long *current, int *handle, const u32 vendor_id,
50 const u8 major_spec_ver, const u8 minor_spec_ver,
51 const u32 fw_ver1, const u32 fw_ver2, const char *description,
52 const u64 characteristics, const u32 oem_defined);
54 struct device;
55 int get_smbios_data(struct device *dev, int *handle, unsigned long *current);
57 const char *smbios_system_manufacturer(void);
58 const char *smbios_system_product_name(void);
59 const char *smbios_system_serial_number(void);
60 const char *smbios_system_version(void);
61 void smbios_system_set_uuid(u8 *uuid);
62 const char *smbios_system_sku(void);
64 unsigned int smbios_cpu_get_max_speed_mhz(void);
65 unsigned int smbios_cpu_get_current_speed_mhz(void);
66 unsigned int smbios_cpu_get_voltage(void);
68 const char *smbios_mainboard_manufacturer(void);
69 const char *smbios_mainboard_product_name(void);
70 const char *smbios_mainboard_serial_number(void);
71 const char *smbios_mainboard_version(void);
73 const char *smbios_mainboard_bios_version(void);
74 const char *smbios_mainboard_asset_tag(void);
75 u8 smbios_mainboard_feature_flags(void);
76 const char *smbios_mainboard_location_in_chassis(void);
77 const char *smbios_chassis_version(void);
78 const char *smbios_chassis_serial_number(void);
79 const char *smbios_processor_serial_number(void);
80 u8 smbios_chassis_power_cords(void);
82 /* This string could be filled late in payload. */
83 void smbios_type0_bios_version(uintptr_t address);
85 void smbios_ec_revision(uint8_t *ec_major_revision, uint8_t *ec_minor_revision);
87 unsigned int smbios_processor_external_clock(void);
88 unsigned int smbios_processor_characteristics(void);
89 struct cpuid_result;
90 unsigned int smbios_processor_family(struct cpuid_result res);
92 unsigned int smbios_cache_error_correction_type(u8 level);
93 unsigned int smbios_cache_sram_type(void);
94 unsigned int smbios_cache_conf_operation_mode(u8 level);
96 /* Used by mainboard to add port information of type 8 */
97 struct port_information;
98 int smbios_write_type8(unsigned long *current, int *handle,
99 const struct port_information *port,
100 size_t num_ports);
102 #define BIOS_CHARACTERISTICS_PCI_SUPPORTED (1 << 7)
103 #define BIOS_CHARACTERISTICS_PC_CARD (1 << 8)
104 #define BIOS_CHARACTERISTICS_PNP (1 << 9)
105 #define BIOS_CHARACTERISTICS_APM (1 << 10)
106 #define BIOS_CHARACTERISTICS_UPGRADEABLE (1 << 11)
107 #define BIOS_CHARACTERISTICS_SHADOW (1 << 12)
108 #define BIOS_CHARACTERISTICS_BOOT_FROM_CD (1 << 15)
109 #define BIOS_CHARACTERISTICS_SELECTABLE_BOOT (1 << 16)
110 #define BIOS_CHARACTERISTICS_BIOS_SOCKETED (1 << 17)
112 #define BIOS_EXT1_CHARACTERISTICS_ACPI (1 << 0)
113 #define BIOS_EXT2_CHARACTERISTICS_TARGET (1 << 2)
115 #define BIOS_MEMORY_ECC_SINGLE_BIT_CORRECTING (1 << 3)
116 #define BIOS_MEMORY_ECC_DOUBLE_BIT_CORRECTING (1 << 4)
117 #define BIOS_MEMORY_ECC_SCRUBBING (1 << 5)
119 #define MEMORY_TYPE_DETAIL_OTHER (1 << 1)
120 #define MEMORY_TYPE_DETAIL_UNKNOWN (1 << 2)
121 #define MEMORY_TYPE_DETAIL_FAST_PAGED (1 << 3)
122 #define MEMORY_TYPE_DETAIL_STATIC_COLUMN (1 << 4)
123 #define MEMORY_TYPE_DETAIL_PSEUDO_STATIC (1 << 5)
124 #define MEMORY_TYPE_DETAIL_RAMBUS (1 << 6)
125 #define MEMORY_TYPE_DETAIL_SYNCHRONOUS (1 << 7)
126 #define MEMORY_TYPE_DETAIL_CMOS (1 << 8)
127 #define MEMORY_TYPE_DETAIL_EDO (1 << 9)
128 #define MEMORY_TYPE_DETAIL_WINDOW_DRAM (1 << 10)
129 #define MEMORY_TYPE_DETAIL_CACHE_DRAM (1 << 11)
130 #define MEMORY_TYPE_DETAIL_NON_VOLATILE (1 << 12)
131 #define MEMORY_TYPE_DETAIL_REGISTERED (1 << 13)
132 #define MEMORY_TYPE_DETAIL_UNBUFFERED (1 << 14)
133 #define MEMORY_TYPE_DETAIL_LRDIMM (1 << 15)
135 #define MEMORY_TECHNOLOGY_OTHER 0x01
136 #define MEMORY_TECHNOLOGY_UNKNOWN 0x02
137 #define MEMORY_TECHNOLOGY_DRAM 0x03
138 #define MEMORY_TECHNOLOGY_NVDIMM_N 0x04
139 #define MEMORY_TECHNOLOGY_NVDIMM_F 0x05
140 #define MEMORY_TECHNOLOGY_NVDIMM_P 0x06
141 #define MEMORY_TECHNOLOGY_INTEL_PERSISTENT 0x07
143 #define MEMORY_OPERATING_MODE_CAP_OTHER (1 << 1)
144 #define MEMORY_OPERATING_MODE_CAP_UNKNOWN (1 << 2)
145 #define MEMORY_OPERATING_MODE_CAP_VOLATILE (1 << 3)
146 #define MEMORY_OPERATING_MODE_CAP_BYTE_ACCESS_PERSISTENT (1 << 4)
147 #define MEMORY_OPERATING_MODE_CAP_BLOCK_ACCESS_PERSISTENT (1 << 5)
149 typedef enum {
150 MEMORY_BUS_WIDTH_8 = 0,
151 MEMORY_BUS_WIDTH_16 = 1,
152 MEMORY_BUS_WIDTH_32 = 2,
153 MEMORY_BUS_WIDTH_64 = 3,
154 MEMORY_BUS_WIDTH_128 = 4,
155 MEMORY_BUS_WIDTH_256 = 5,
156 MEMORY_BUS_WIDTH_512 = 6,
157 MEMORY_BUS_WIDTH_1024 = 7,
158 MEMORY_BUS_WIDTH_MAX = 7,
159 } smbios_memory_bus_width;
161 typedef enum {
162 MEMORY_FORMFACTOR_OTHER = 0x01,
163 MEMORY_FORMFACTOR_UNKNOWN = 0x02,
164 MEMORY_FORMFACTOR_SIMM = 0x03,
165 MEMORY_FORMFACTOR_SIP = 0x04,
166 MEMORY_FORMFACTOR_CHIP = 0x05,
167 MEMORY_FORMFACTOR_DIP = 0x06,
168 MEMORY_FORMFACTOR_ZIP = 0x07,
169 MEMORY_FORMFACTOR_PROPRIETARY_CARD = 0x08,
170 MEMORY_FORMFACTOR_DIMM = 0x09,
171 MEMORY_FORMFACTOR_TSOP = 0x0a,
172 MEMORY_FORMFACTOR_ROC = 0x0b,
173 MEMORY_FORMFACTOR_RIMM = 0x0c,
174 MEMORY_FORMFACTOR_SODIMM = 0x0d,
175 MEMORY_FORMFACTOR_SRIMM = 0x0e,
176 MEMORY_FORMFACTOR_FBDIMM = 0x0f,
177 MEMORY_FORMFACTOR_DIE = 0x10,
178 } smbios_memory_form_factor;
180 typedef enum {
181 MEMORY_TYPE_OTHER = 0x01,
182 MEMORY_TYPE_UNKNOWN = 0x02,
183 MEMORY_TYPE_DRAM = 0x03,
184 MEMORY_TYPE_EDRAM = 0x04,
185 MEMORY_TYPE_VRAM = 0x05,
186 MEMORY_TYPE_SRAM = 0x06,
187 MEMORY_TYPE_RAM = 0x07,
188 MEMORY_TYPE_ROM = 0x08,
189 MEMORY_TYPE_FLASH = 0x09,
190 MEMORY_TYPE_EEPROM = 0x0a,
191 MEMORY_TYPE_FEPROM = 0x0b,
192 MEMORY_TYPE_EPROM = 0x0c,
193 MEMORY_TYPE_CDRAM = 0x0d,
194 MEMORY_TYPE_3DRAM = 0x0e,
195 MEMORY_TYPE_SDRAM = 0x0f,
196 MEMORY_TYPE_SGRAM = 0x10,
197 MEMORY_TYPE_RDRAM = 0x11,
198 MEMORY_TYPE_DDR = 0x12,
199 MEMORY_TYPE_DDR2 = 0x13,
200 MEMORY_TYPE_DDR2_FBDIMM = 0x14,
201 MEMORY_TYPE_DDR3 = 0x18,
202 MEMORY_TYPE_FBD2 = 0x19,
203 MEMORY_TYPE_DDR4 = 0x1a,
204 MEMORY_TYPE_LPDDR = 0x1b,
205 MEMORY_TYPE_LPDDR2 = 0x1c,
206 MEMORY_TYPE_LPDDR3 = 0x1d,
207 MEMORY_TYPE_LPDDR4 = 0x1e,
208 MEMORY_TYPE_LOGICAL_NON_VOLATILE_DEVICE = 0x1f,
209 MEMORY_TYPE_HBM = 0x20,
210 MEMORY_TYPE_HBM2 = 0x21,
211 MEMORY_TYPE_DDR5 = 0x22,
212 MEMORY_TYPE_LPDDR5 = 0x23,
213 MEMORY_TYPE_HBM3 = 0x24,
214 } smbios_memory_type;
216 typedef enum {
217 MEMORY_ARRAY_LOCATION_OTHER = 0x01,
218 MEMORY_ARRAY_LOCATION_UNKNOWN = 0x02,
219 MEMORY_ARRAY_LOCATION_SYSTEM_BOARD = 0x03,
220 MEMORY_ARRAY_LOCATION_ISA_ADD_ON = 0x04,
221 MEMORY_ARRAY_LOCATION_EISA_ADD_ON = 0x05,
222 MEMORY_ARRAY_LOCATION_PCI_ADD_ON = 0x06,
223 MEMORY_ARRAY_LOCATION_MCA_ADD_ON = 0x07,
224 MEMORY_ARRAY_LOCATION_PCMCIA_ADD_ON = 0x08,
225 MEMORY_ARRAY_LOCATION_PROPRIETARY_ADD_ON = 0x09,
226 MEMORY_ARRAY_LOCATION_NUBUS = 0x0a,
227 MEMORY_ARRAY_LOCATION_PC_98_C20_ADD_ON = 0xa0,
228 MEMORY_ARRAY_LOCATION_PC_98_C24_ADD_ON = 0xa1,
229 MEMORY_ARRAY_LOCATION_PC_98_E_ADD_ON = 0xa2,
230 MEMORY_ARRAY_LOCATION_PC_98_LOCAL_BUS_ADD_ON = 0xa3,
231 MEMORY_ARRAY_LOCATION_CXL_FLEXBUS_1_0_ADD_ON = 0xa4,
232 } smbios_memory_array_location;
234 typedef enum {
235 MEMORY_ARRAY_USE_OTHER = 0x01,
236 MEMORY_ARRAY_USE_UNKNOWN = 0x02,
237 MEMORY_ARRAY_USE_SYSTEM = 0x03,
238 MEMORY_ARRAY_USE_VIDEO = 0x04,
239 MEMORY_ARRAY_USE_FLASH = 0x05,
240 MEMORY_ARRAY_USE_NVRAM = 0x06,
241 MEMORY_ARRAY_USE_CACHE = 0x07,
242 } smbios_memory_array_use;
244 typedef enum {
245 MEMORY_ARRAY_ECC_OTHER = 0x01,
246 MEMORY_ARRAY_ECC_UNKNOWN = 0x02,
247 MEMORY_ARRAY_ECC_NONE = 0x03,
248 MEMORY_ARRAY_ECC_PARITY = 0x04,
249 MEMORY_ARRAY_ECC_SINGLE_BIT = 0x05,
250 MEMORY_ARRAY_ECC_MULTI_BIT = 0x06,
251 MEMORY_ARRAY_ECC_CRC = 0x07,
252 } smbios_memory_array_ecc;
254 #define SMBIOS_STATE_SAFE 3
255 typedef enum {
256 SMBIOS_BIOS_INFORMATION = 0,
257 SMBIOS_SYSTEM_INFORMATION = 1,
258 SMBIOS_BOARD_INFORMATION = 2,
259 SMBIOS_SYSTEM_ENCLOSURE = 3,
260 SMBIOS_PROCESSOR_INFORMATION = 4,
261 SMBIOS_CACHE_INFORMATION = 7,
262 SMBIOS_PORT_CONNECTOR_INFORMATION = 8,
263 SMBIOS_SYSTEM_SLOTS = 9,
264 SMBIOS_OEM_STRINGS = 11,
265 SMBIOS_EVENT_LOG = 15,
266 SMBIOS_PHYS_MEMORY_ARRAY = 16,
267 SMBIOS_MEMORY_DEVICE = 17,
268 SMBIOS_MEMORY_ARRAY_MAPPED_ADDRESS = 19,
269 SMBIOS_MEMORY_DEVICE_MAPPED_ADDRESS = 20,
270 SMBIOS_TEMPERATURE_PROBE = 28,
271 SMBIOS_SYSTEM_BOOT_INFORMATION = 32,
272 SMBIOS_IPMI_DEVICE_INFORMATION = 38,
273 SMBIOS_ONBOARD_DEVICES_EXTENDED_INFORMATION = 41,
274 SMBIOS_TPM_DEVICE = 43,
275 SMBIOS_END_OF_TABLE = 127,
276 } smbios_struct_type_t;
278 struct smbios_entry {
279 u8 anchor[4];
280 u8 checksum;
281 u8 length;
282 u8 major_version;
283 u8 minor_version;
284 u16 max_struct_size;
285 u8 entry_point_rev;
286 u8 formwatted_area[5];
287 u8 intermediate_anchor_string[5];
288 u8 intermediate_checksum;
289 u16 struct_table_length;
290 u32 struct_table_address;
291 u16 struct_count;
292 u8 smbios_bcd_revision;
293 } __packed;
295 struct smbios_entry30 {
296 u8 anchor[5];
297 u8 checksum;
298 u8 length;
299 u8 major_version;
300 u8 minor_version;
301 u8 smbios_doc_rev;
302 u8 entry_point_rev;
303 u8 reserved;
304 u32 struct_table_length;
305 u64 struct_table_address;
306 } __packed;
308 struct smbios_header {
309 u8 type;
310 u8 length;
311 u16 handle;
312 } __packed;
314 struct smbios_type0 {
315 struct smbios_header header;
316 u8 vendor;
317 u8 bios_version;
318 u16 bios_start_segment;
319 u8 bios_release_date;
320 u8 bios_rom_size;
321 u64 bios_characteristics;
322 u8 bios_characteristics_ext1;
323 u8 bios_characteristics_ext2;
324 u8 system_bios_major_release;
325 u8 system_bios_minor_release;
326 u8 ec_major_release;
327 u8 ec_minor_release;
328 u16 extended_bios_rom_size;
329 u8 eos[2];
330 } __packed;
332 typedef enum {
333 SMBIOS_WAKEUP_TYPE_RESERVED = 0x00,
334 SMBIOS_WAKEUP_TYPE_OTHER = 0x01,
335 SMBIOS_WAKEUP_TYPE_UNKNOWN = 0x02,
336 SMBIOS_WAKEUP_TYPE_APM_TIMER = 0x03,
337 SMBIOS_WAKEUP_TYPE_MODEM_RING = 0x04,
338 SMBIOS_WAKEUP_TYPE_LAN_REMOTE = 0x05,
339 SMBIOS_WAKEUP_TYPE_POWER_SWITCH = 0x06,
340 SMBIOS_WAKEUP_TYPE_PCI_PME = 0x07,
341 SMBIOS_WAKEUP_TYPE_AC_POWER_RESTORED = 0x08,
342 } smbios_wakeup_type;
344 struct smbios_type1 {
345 struct smbios_header header;
346 u8 manufacturer;
347 u8 product_name;
348 u8 version;
349 u8 serial_number;
350 u8 uuid[16];
351 u8 wakeup_type;
352 u8 sku;
353 u8 family;
354 u8 eos[2];
355 } __packed;
357 #define SMBIOS_FEATURE_FLAGS_HOSTING_BOARD (1 << 0)
358 #define SMBIOS_FEATURE_FLAGS_REQUIRES_DAUGHTER_CARD (1 << 1)
359 #define SMBIOS_FEATURE_FLAGS_REMOVABLE (1 << 2)
360 #define SMBIOS_FEATURE_FLAGS_REPLACEABLE (1 << 3)
361 #define SMBIOS_FEATURE_FLAGS_HOT_SWAPPABLE (1 << 4)
363 typedef enum {
364 SMBIOS_BOARD_TYPE_UNKNOWN = 0x01,
365 SMBIOS_BOARD_TYPE_OTHER = 0x02,
366 SMBIOS_BOARD_TYPE_SERVER_BLADE = 0x03,
367 SMBIOS_BOARD_TYPE_CONNECTIVITY_SWITCH = 0x04,
368 SMBIOS_BOARD_TYPE_SYSTEM_MANAGEMENT_MODULE = 0x05,
369 SMBIOS_BOARD_TYPE_PROCESSOR_MODULE = 0x06,
370 SMBIOS_BOARD_TYPE_IO_MODULE = 0x07,
371 SMBIOS_BOARD_TYPE_MEMORY_MODULE = 0x08,
372 SMBIOS_BOARD_TYPE_DAUGHTER_BOARD = 0x09,
373 SMBIOS_BOARD_TYPE_MOTHERBOARD = 0x0a,
374 SMBIOS_BOARD_TYPE_PROCESSOR_MEMORY_MODULE = 0x0b,
375 SMBIOS_BOARD_TYPE_PROCESSOR_IO_MODULE = 0x0c,
376 SMBIOS_BOARD_TYPE_INTERCONNECT_BOARD = 0x0d,
377 } smbios_board_type;
379 struct smbios_type2 {
380 struct smbios_header header;
381 u8 manufacturer;
382 u8 product_name;
383 u8 version;
384 u8 serial_number;
385 u8 asset_tag;
386 u8 feature_flags;
387 u8 location_in_chassis;
388 u16 chassis_handle;
389 u8 board_type;
390 u8 eos[2];
391 } __packed;
393 typedef enum {
394 SMBIOS_ENCLOSURE_OTHER = 0x01,
395 SMBIOS_ENCLOSURE_UNKNOWN = 0x02,
396 SMBIOS_ENCLOSURE_DESKTOP = 0x03,
397 SMBIOS_ENCLOSURE_LOW_PROFILE_DESKTOP = 0x04,
398 SMBIOS_ENCLOSURE_PIZZA_BOX = 0x05,
399 SMBIOS_ENCLOSURE_MINI_TOWER = 0x06,
400 SMBIOS_ENCLOSURE_TOWER = 0x07,
401 SMBIOS_ENCLOSURE_PORTABLE = 0x08,
402 SMBIOS_ENCLOSURE_LAPTOP = 0x09,
403 SMBIOS_ENCLOSURE_NOTEBOOK = 0x0a,
404 SMBIOS_ENCLOSURE_HAND_HELD = 0x0b,
405 SMBIOS_ENCLOSURE_DOCKING_STATION = 0x0c,
406 SMBIOS_ENCLOSURE_ALL_IN_ONE = 0x0d,
407 SMBIOS_ENCLOSURE_SUB_NOTEBOOK = 0x0e,
408 SMBIOS_ENCLOSURE_SPACE_SAVING = 0x0f,
409 SMBIOS_ENCLOSURE_LUNCH_BOX = 0x10,
410 SMBIOS_ENCLOSURE_MAIN_SERVER_CHASSIS = 0x11,
411 SMBIOS_ENCLOSURE_EXPANSION_CHASSIS = 0x12,
412 SMBIOS_ENCLOSURE_SUBCHASSIS = 0x13,
413 SMBIOS_ENCLOSURE_BUS_EXPANSION_CHASSIS = 0x14,
414 SMBIOS_ENCLOSURE_PERIPHERAL_CHASSIS = 0x15,
415 SMBIOS_ENCLOSURE_RAID_CHASSIS = 0x16,
416 SMBIOS_ENCLOSURE_RACK_MOUNT_CHASSIS = 0x17,
417 SMBIOS_ENCLOSURE_SEALED_CASE_PC = 0x18,
418 SMBIOS_ENCLOSURE_MULTI_SYSTEM_CHASSIS = 0x19,
419 SMBIOS_ENCLOSURE_COMPACT_PCI = 0x1a,
420 SMBIOS_ENCLOSURE_ADVANCED_TCA = 0x1b,
421 SMBIOS_ENCLOSURE_BLADE = 0x1c,
422 SMBIOS_ENCLOSURE_BLADE_ENCLOSURE = 0x1d,
423 SMBIOS_ENCLOSURE_TABLET = 0x1e,
424 SMBIOS_ENCLOSURE_CONVERTIBLE = 0x1f,
425 SMBIOS_ENCLOSURE_DETACHABLE = 0x20,
426 SMBIOS_ENCLOSURE_IOT_GATEWAY = 0x21,
427 SMBIOS_ENCLOSURE_EMBEDDED_PC = 0x22,
428 SMBIOS_ENCLOSURE_MINI_PC = 0x23,
429 SMBIOS_ENCLOSURE_STICK_PC = 0x24,
430 } smbios_enclosure_type;
432 struct smbios_type3 {
433 struct smbios_header header;
434 u8 manufacturer;
435 u8 _type;
436 u8 version;
437 u8 serial_number;
438 u8 asset_tag_number;
439 u8 bootup_state;
440 u8 power_supply_state;
441 u8 thermal_state;
442 u8 security_status;
443 u32 oem_defined;
444 u8 height;
445 u8 number_of_power_cords;
446 u8 element_count;
447 u8 element_record_length;
448 u8 sku_number;
449 u8 eos[2];
450 } __packed;
452 struct smbios_type4 {
453 struct smbios_header header;
454 u8 socket_designation;
455 u8 processor_type;
456 u8 processor_family;
457 u8 processor_manufacturer;
458 u32 processor_id[2];
459 u8 processor_version;
460 u8 voltage;
461 u16 external_clock;
462 u16 max_speed;
463 u16 current_speed;
464 u8 status;
465 u8 processor_upgrade;
466 u16 l1_cache_handle;
467 u16 l2_cache_handle;
468 u16 l3_cache_handle;
469 u8 serial_number;
470 u8 asset_tag;
471 u8 part_number;
472 u8 core_count;
473 u8 core_enabled;
474 u8 thread_count;
475 u16 processor_characteristics;
476 u16 processor_family2;
477 u16 core_count2;
478 u16 core_enabled2;
479 u16 thread_count2;
480 u8 eos[2];
481 } __packed;
483 /* defines for smbios_type4 */
485 #define SMBIOS_PROCESSOR_STATUS_POPULATED (1 << 6)
486 #define SMBIOS_PROCESSOR_STATUS_CPU_ENABLED (1 << 0)
488 /* defines for supported_sram_type/current_sram_type */
490 #define SMBIOS_CACHE_SRAM_TYPE_OTHER (1 << 0)
491 #define SMBIOS_CACHE_SRAM_TYPE_UNKNOWN (1 << 1)
492 #define SMBIOS_CACHE_SRAM_TYPE_NON_BURST (1 << 2)
493 #define SMBIOS_CACHE_SRAM_TYPE_BURST (1 << 3)
494 #define SMBIOS_CACHE_SRAM_TYPE_PIPELINE_BURST (1 << 4)
495 #define SMBIOS_CACHE_SRAM_TYPE_SYNCHRONOUS (1 << 5)
496 #define SMBIOS_CACHE_SRAM_TYPE_ASYNCHRONOUS (1 << 6)
498 /* enum for error_correction_type */
500 enum smbios_cache_error_corr {
501 SMBIOS_CACHE_ERROR_CORRECTION_OTHER = 1,
502 SMBIOS_CACHE_ERROR_CORRECTION_UNKNOWN,
503 SMBIOS_CACHE_ERROR_CORRECTION_NONE,
504 SMBIOS_CACHE_ERROR_CORRECTION_PARITY,
505 SMBIOS_CACHE_ERROR_CORRECTION_SINGLE_BIT,
506 SMBIOS_CACHE_ERROR_CORRECTION_MULTI_BIT,
509 /* enum for system_cache_type */
511 enum smbios_cache_type {
512 SMBIOS_CACHE_TYPE_OTHER = 1,
513 SMBIOS_CACHE_TYPE_UNKNOWN,
514 SMBIOS_CACHE_TYPE_INSTRUCTION,
515 SMBIOS_CACHE_TYPE_DATA,
516 SMBIOS_CACHE_TYPE_UNIFIED,
519 /* enum for associativity */
521 enum smbios_cache_associativity {
522 SMBIOS_CACHE_ASSOCIATIVITY_OTHER = 1,
523 SMBIOS_CACHE_ASSOCIATIVITY_UNKNOWN,
524 SMBIOS_CACHE_ASSOCIATIVITY_DIRECT,
525 SMBIOS_CACHE_ASSOCIATIVITY_2WAY,
526 SMBIOS_CACHE_ASSOCIATIVITY_4WAY,
527 SMBIOS_CACHE_ASSOCIATIVITY_FULL,
528 SMBIOS_CACHE_ASSOCIATIVITY_8WAY,
529 SMBIOS_CACHE_ASSOCIATIVITY_16WAY,
530 SMBIOS_CACHE_ASSOCIATIVITY_12WAY,
531 SMBIOS_CACHE_ASSOCIATIVITY_24WAY,
532 SMBIOS_CACHE_ASSOCIATIVITY_32WAY,
533 SMBIOS_CACHE_ASSOCIATIVITY_48WAY,
534 SMBIOS_CACHE_ASSOCIATIVITY_64WAY,
535 SMBIOS_CACHE_ASSOCIATIVITY_20WAY,
538 /* defines for cache_configuration */
540 #define SMBIOS_CACHE_CONF_LEVEL(x) ((((x) - 1) & 0x7) << 0)
541 #define SMBIOS_CACHE_CONF_LOCATION(x) (((x) & 0x3) << 5)
542 #define SMBIOS_CACHE_CONF_ENABLED(x) (((x) & 0x1) << 7)
543 #define SMBIOS_CACHE_CONF_OPERATION_MODE(x) (((x) & 0x3) << 8)
545 /* defines for max_cache_size and installed_size */
547 #define SMBIOS_CACHE_SIZE_UNIT_1KB (0 << 15)
548 #define SMBIOS_CACHE_SIZE_UNIT_64KB (1 << 15)
549 #define SMBIOS_CACHE_SIZE_MASK 0x7fff
550 #define SMBIOS_CACHE_SIZE_OVERFLOW 0xffff
552 #define SMBIOS_CACHE_SIZE2_UNIT_1KB (0 << 31)
553 #define SMBIOS_CACHE_SIZE2_UNIT_64KB (1UL << 31)
554 #define SMBIOS_CACHE_SIZE2_MASK 0x7fffffff
556 /* define for cache operation mode */
558 #define SMBIOS_CACHE_OP_MODE_WRITE_THROUGH 0
559 #define SMBIOS_CACHE_OP_MODE_WRITE_BACK 1
560 #define SMBIOS_CACHE_OP_MODE_VARIES_WITH_MEMORY_ADDRESS 2
561 #define SMBIOS_CACHE_OP_MODE_UNKNOWN 3
563 struct smbios_type7 {
564 struct smbios_header header;
565 u8 socket_designation;
566 u16 cache_configuration;
567 u16 max_cache_size;
568 u16 installed_size;
569 u16 supported_sram_type;
570 u16 current_sram_type;
571 u8 cache_speed;
572 u8 error_correction_type;
573 u8 system_cache_type;
574 u8 associativity;
575 u32 max_cache_size2;
576 u32 installed_size2;
577 u8 eos[2];
578 } __packed;
580 /* enum for connector types */
581 typedef enum {
582 CONN_NONE = 0x00,
583 CONN_CENTRONICS = 0x01,
584 CONN_MINI_CENTRONICS = 0x02,
585 CONN_PROPRIETARY = 0x03,
586 CONN_DB_25_PIN_MALE = 0x04,
587 CONN_DB_25_PIN_FEMALE = 0x05,
588 CONN_DB_15_PIN_MALE = 0x06,
589 CONN_DB_15_PIN_FEMALE = 0x07,
590 CONN_DB_9_PIN_MALE = 0x08,
591 CONN_DB_9_PIN_FEMALE = 0x09,
592 CONN_RJ_11 = 0x0A,
593 CONN_RJ_45 = 0x0B,
594 CONN_50_PIN_MINI_SCSI = 0x0C,
595 CONN_MINI_DIN = 0x0D,
596 CONN_MICRO_DIN = 0x0E,
597 CONN_PS_2 = 0x0F,
598 CONN_INFRARED = 0x10,
599 CONN_HP_HIL = 0x11,
600 CONN_ACCESS_BUS_USB = 0x12,
601 CONN_SSA_SCSI = 0x13,
602 CONN_CIRCULAR_DIN_8_MALE = 0x14,
603 CONN_CIRCULAR_DIN_8_FEMALE = 0x15,
604 CONN_ON_BOARD_IDE = 0x16,
605 CONN_ON_BOARD_FLOPPY = 0x17,
606 CONN_9_PIN_DUAL_INLINE = 0x18,
607 CONN_25_PIN_DUAL_INLINE = 0x19,
608 CONN_50_PIN_DUAL_INLINE = 0x1A,
609 CONN_68_PIN_DUAL_INLINE = 0x1B,
610 CONN_ON_BOARD_SOUND_INPUT_FROM_CD_ROM = 0x1C,
611 CONN_MINI_CENTRONICS_TYPE14 = 0x1D,
612 CONN_MINI_CENTRONICS_TYPE26 = 0x1E,
613 CONN_MINI_JACK_HEADPHONES = 0x1F,
614 CONN_BNC = 0x20,
615 CONN_1394 = 0x21,
616 CONN_SAS_SATA = 0x22,
617 CONN_USB_TYPE_C = 0x23,
618 CONN_PC_98 = 0xA0,
619 CONN_PC_98_HIRESO = 0xA1,
620 CONN_PC_H98 = 0xA2,
621 CONN_PC98_NOTE = 0xA3,
622 CONN_PC_98_FULL = 0xA4,
623 CONN_OTHER = 0xFF,
624 } type8_connector_types;
626 /* enum for port types */
627 typedef enum {
628 TYPE_NONE_PORT = 0x00,
629 TYPE_PARALLEL_PORT_XT_AT_COMPATIBLE = 0x01,
630 TYPE_PARALLEL_PORT_PS_2 = 0x02,
631 TYPE_PARALLEL_PORT_ECP = 0x03,
632 TYPE_PARALLEL_PORT_EPP = 0x04,
633 TYPE_PARALLEL_PORT_ECP_EPP = 0x05,
634 TYPE_SERIAL_PORT_XT_AT_COMPATIBLE = 0x06,
635 TYPE_SERIAL_PORT_16450_COMPATIBLE = 0x07,
636 TYPE_SERIAL_PORT_16550_COMPATIBLE = 0x08,
637 TYPE_SERIAL_PORT_16550A_COMPATIBLE = 0x09,
638 TYPE_SCSI_PORT = 0x0A,
639 TYPE_MIDI_PORT = 0x0B,
640 TYPE_JOY_STICK_PORT = 0x0C,
641 TYPE_KEYBOARD_PORT = 0x0D,
642 TYPE_MOUSE_PORT = 0x0E,
643 TYPE_SSA_SCSI = 0x0F,
644 TYPE_USB = 0x10,
645 TYPE_FIREWIRE_IEEE_P1394 = 0x11,
646 TYPE_PCMCIA_TYPE_I = 0x12,
647 TYPE_PCMCIA_TYPE_II = 0x13,
648 TYPE_PCMCIA_TYPE_III = 0x14,
649 TYPE_CARDBUS = 0x15,
650 TYPE_ACCESS_BUS_PORT = 0x16,
651 TYPE_SCSI_II = 0x17,
652 TYPE_SCSI_WIDE = 0x18,
653 TYPE_PC_98 = 0x19,
654 TYPE_PC_98_HIRESO = 0x1A,
655 TYPE_PC_H98 = 0x1B,
656 TYPE_VIDEO_PORT = 0x1C,
657 TYPE_AUDIO_PORT = 0x1D,
658 TYPE_MODEM_PORT = 0x1E,
659 TYPE_NETWORK_PORT = 0x1F,
660 TYPE_SATA = 0x20,
661 TYPE_SAS = 0x21,
662 TYPE_MFDP = 0x22,
663 TYPE_THUNDERBOLT = 0x23,
664 TYPE_8251_COMPATIBLE = 0xA0,
665 TYPE_8251_FIFO_COMPATIBLE = 0xA1,
666 TYPE_OTHER_PORT = 0xFF,
667 } type8_port_types;
669 struct port_information {
670 const char *internal_reference_designator;
671 type8_connector_types internal_connector_type;
672 const char *external_reference_designator;
673 type8_connector_types external_connector_type;
674 type8_port_types port_type;
677 struct smbios_type8 {
678 struct smbios_header header;
679 u8 internal_reference_designator;
680 u8 internal_connector_type;
681 u8 external_reference_designator;
682 u8 external_connector_type;
683 u8 port_type;
684 u8 eos[2];
685 } __packed;
687 /* System Slots - Slot Type */
688 enum misc_slot_type {
689 SlotTypeOther = 0x01,
690 SlotTypeUnknown = 0x02,
691 SlotTypeIsa = 0x03,
692 SlotTypeMca = 0x04,
693 SlotTypeEisa = 0x05,
694 SlotTypePci = 0x06,
695 SlotTypePcmcia = 0x07,
696 SlotTypeVlVesa = 0x08,
697 SlotTypeProprietary = 0x09,
698 SlotTypeProcessorCardSlot = 0x0A,
699 SlotTypeProprietaryMemoryCardSlot = 0x0B,
700 SlotTypeIORiserCardSlot = 0x0C,
701 SlotTypeNuBus = 0x0D,
702 SlotTypePci66MhzCapable = 0x0E,
703 SlotTypeAgp = 0x0F,
704 SlotTypeApg2X = 0x10,
705 SlotTypeAgp4X = 0x11,
706 SlotTypePciX = 0x12,
707 SlotTypeAgp8X = 0x13,
708 SlotTypeM2Socket1_DP = 0x14,
709 SlotTypeM2Socket1_SD = 0x15,
710 SlotTypeM2Socket2 = 0x16,
711 SlotTypeM2Socket3 = 0x17,
712 SlotTypeMxmTypeI = 0x18,
713 SlotTypeMxmTypeII = 0x19,
714 SlotTypeMxmTypeIIIStandard = 0x1A,
715 SlotTypeMxmTypeIIIHe = 0x1B,
716 SlotTypeMxmTypeIV = 0x1C,
717 SlotTypeMxm30TypeA = 0x1D,
718 SlotTypeMxm30TypeB = 0x1E,
719 SlotTypePciExpressGen2Sff_8639 = 0x1F,
720 SlotTypePciExpressGen3Sff_8639 = 0x20,
721 SlotTypePciExpressMini52pinWithBSKO = 0x21,
722 SlotTypePciExpressMini52pinWithoutBSKO = 0x22,
723 SlotTypePciExpressMini76pin = 0x23,
724 SlotTypePC98C20 = 0xA0,
725 SlotTypePC98C24 = 0xA1,
726 SlotTypePC98E = 0xA2,
727 SlotTypePC98LocalBus = 0xA3,
728 SlotTypePC98Card = 0xA4,
729 SlotTypePciExpress = 0xA5,
730 SlotTypePciExpressX1 = 0xA6,
731 SlotTypePciExpressX2 = 0xA7,
732 SlotTypePciExpressX4 = 0xA8,
733 SlotTypePciExpressX8 = 0xA9,
734 SlotTypePciExpressX16 = 0xAA,
735 SlotTypePciExpressGen2 = 0xAB,
736 SlotTypePciExpressGen2X1 = 0xAC,
737 SlotTypePciExpressGen2X2 = 0xAD,
738 SlotTypePciExpressGen2X4 = 0xAE,
739 SlotTypePciExpressGen2X8 = 0xAF,
740 SlotTypePciExpressGen2X16 = 0xB0,
741 SlotTypePciExpressGen3 = 0xB1,
742 SlotTypePciExpressGen3X1 = 0xB2,
743 SlotTypePciExpressGen3X2 = 0xB3,
744 SlotTypePciExpressGen3X4 = 0xB4,
745 SlotTypePciExpressGen3X8 = 0xB5,
746 SlotTypePciExpressGen3X16 = 0xB6,
747 SlotTypePciExpressGen4 = 0xB8,
748 SlotTypePciExpressGen4x1 = 0xB9,
749 SlotTypePciExpressGen4x2 = 0xBA,
750 SlotTypePciExpressGen4x4 = 0xBB,
751 SlotTypePciExpressGen4x8 = 0xBC,
752 SlotTypePciExpressGen4x16 = 0xBD,
753 SlotTypePciExpressGen5 = 0xBE,
754 SlotTypePciExpressGen5x1 = 0xBF,
755 SlotTypePciExpressGen5x2 = 0xC0,
756 SlotTypePciExpressGen5x4 = 0xC1,
757 SlotTypePciExpressGen5x8 = 0xC2,
758 SlotTypePciExpressGen5x16 = 0xC3
761 /* System Slots - Slot Data Bus Width. */
762 enum slot_data_bus_bandwidth {
763 SlotDataBusWidthOther = 0x01,
764 SlotDataBusWidthUnknown = 0x02,
765 SlotDataBusWidth8Bit = 0x03,
766 SlotDataBusWidth16Bit = 0x04,
767 SlotDataBusWidth32Bit = 0x05,
768 SlotDataBusWidth64Bit = 0x06,
769 SlotDataBusWidth128Bit = 0x07,
770 SlotDataBusWidth1X = 0x08,
771 SlotDataBusWidth2X = 0x09,
772 SlotDataBusWidth4X = 0x0A,
773 SlotDataBusWidth8X = 0x0B,
774 SlotDataBusWidth12X = 0x0C,
775 SlotDataBusWidth16X = 0x0D,
776 SlotDataBusWidth32X = 0x0E
779 /* System Slots - Current Usage. */
780 enum misc_slot_usage {
781 SlotUsageOther = 0x01,
782 SlotUsageUnknown = 0x02,
783 SlotUsageAvailable = 0x03,
784 SlotUsageInUse = 0x04,
785 SlotUsageUnavailable = 0x05
788 /* System Slots - Slot Length.*/
789 enum misc_slot_length {
790 SlotLengthOther = 0x01,
791 SlotLengthUnknown = 0x02,
792 SlotLengthShort = 0x03,
793 SlotLengthLong = 0x04
796 /* System Slots - Slot Characteristics 1. */
797 #define SMBIOS_SLOT_UNKNOWN (1 << 0)
798 #define SMBIOS_SLOT_5V (1 << 1)
799 #define SMBIOS_SLOT_3P3V (1 << 2)
800 #define SMBIOS_SLOT_SHARED (1 << 3)
801 #define SMBIOS_SLOT_PCCARD_16 (1 << 4)
802 #define SMBIOS_SLOT_PCCARD_CARDBUS (1 << 5)
803 #define SMBIOS_SLOT_PCCARD_ZOOM (1 << 6)
804 #define SMBIOS_SLOT_PCCARD_MODEM_RING (1 << 7)
805 /* System Slots - Slot Characteristics 2. */
806 #define SMBIOS_SLOT_PME (1 << 0)
807 #define SMBIOS_SLOT_HOTPLUG (1 << 1)
808 #define SMBIOS_SLOT_SMBUS (1 << 2)
809 #define SMBIOS_SLOT_BIFURCATION (1 << 3)
811 struct slot_peer_groups {
812 u16 peer_seg_num;
813 u8 peer_bus_num;
814 u8 peer_dev_fn_num;
815 u8 peer_data_bus_width;
816 } __packed;
818 struct smbios_type9 {
819 struct smbios_header header;
820 u8 slot_designation;
821 u8 slot_type;
822 u8 slot_data_bus_width;
823 u8 current_usage;
824 u8 slot_length;
825 u16 slot_id;
826 u8 slot_characteristics_1;
827 u8 slot_characteristics_2;
828 u16 segment_group_number;
829 u8 bus_number;
830 u8 device_function_number;
831 u8 data_bus_width;
832 u8 peer_group_count;
833 struct slot_peer_groups peer[0];
834 u8 eos[2];
835 } __packed;
837 struct smbios_type11 {
838 struct smbios_header header;
839 u8 count;
840 u8 eos[2];
841 } __packed;
843 struct smbios_type15 {
844 struct smbios_header header;
845 u16 area_length;
846 u16 header_offset;
847 u16 data_offset;
848 u8 access_method;
849 u8 log_status;
850 u32 change_token;
851 u32 address;
852 u8 header_format;
853 u8 log_type_descriptors;
854 u8 log_type_descriptor_length;
855 u8 eos[2];
856 } __packed;
858 enum {
859 SMBIOS_EVENTLOG_ACCESS_METHOD_IO8 = 0,
860 SMBIOS_EVENTLOG_ACCESS_METHOD_IO8X2,
861 SMBIOS_EVENTLOG_ACCESS_METHOD_IO16,
862 SMBIOS_EVENTLOG_ACCESS_METHOD_MMIO32,
863 SMBIOS_EVENTLOG_ACCESS_METHOD_GPNV,
866 enum {
867 SMBIOS_EVENTLOG_STATUS_VALID = 1, /* Bit 0 */
868 SMBIOS_EVENTLOG_STATUS_FULL = 2, /* Bit 1 */
871 #define SMBIOS_USE_EXTENDED_MAX_CAPACITY (1ULL << 31)
873 struct smbios_type16 {
874 struct smbios_header header;
875 u8 location;
876 u8 use;
877 u8 memory_error_correction;
878 u32 maximum_capacity;
879 u16 memory_error_information_handle;
880 u16 number_of_memory_devices;
881 u64 extended_maximum_capacity;
882 u8 eos[2];
883 } __packed;
885 struct smbios_type17 {
886 struct smbios_header header;
887 u16 phys_memory_array_handle;
888 u16 memory_error_information_handle;
889 u16 total_width;
890 u16 data_width;
891 u16 size;
892 u8 form_factor;
893 u8 device_set;
894 u8 device_locator;
895 u8 bank_locator;
896 u8 memory_type;
897 u16 type_detail;
898 u16 speed;
899 u8 manufacturer;
900 u8 serial_number;
901 u8 asset_tag;
902 u8 part_number;
903 u8 attributes;
904 u32 extended_size;
905 u16 clock_speed;
906 u16 minimum_voltage;
907 u16 maximum_voltage;
908 u16 configured_voltage;
909 u8 eos[2];
910 } __packed;
912 struct smbios_type19 {
913 struct smbios_header header;
914 u32 starting_address;
915 u32 ending_address;
916 u16 memory_array_handle;
917 u8 partition_width;
918 u64 extended_starting_address;
919 u64 extended_ending_address;
920 u8 eos[2];
921 } __packed;
923 struct smbios_type20 {
924 struct smbios_header header;
925 u32 addr_start;
926 u32 addr_end;
927 u16 memory_device_handle;
928 u16 memory_array_mapped_address_handle;
929 u8 partition_row_pos;
930 u8 interleave_pos;
931 u8 interleave_depth;
932 u64 ext_addr_start;
933 u64 ext_addr_end;
934 u8 eos[2];
935 } __packed;
937 /* Bit[7..5] = Temp status */
938 enum smbios_temp_status {
939 SMBIOS_TEMP_STATUS_OTHER = 0x01,
940 SMBIOS_TEMP_STATUS_UNKNOWN,
941 SMBIOS_TEMP_STATUS_OK,
942 SMBIOS_TEMP_STATUS_NONCRITICAL,
943 SMBIOS_TEMP_STATUS_CRITICAL,
944 SMBIOS_TEMP_STATUS_NONREC, // Non-Recoverable.
947 /* Bit[4..0] = Temp location */
948 enum smbios_temp_location {
949 SMBIOS_TEMP_LOCATION_OTHER = 0x01,
950 SMBIOS_TEMP_LOCATION_UNKNOWN,
951 SMBIOS_TEMP_LOCATION_PROCESSOR,
952 SMBIOS_TEMP_LOCATION_DISK,
953 SMBIOS_TEMP_LOCATION_BAY, // Peripheral Bay.
954 SMBIOS_TEMP_LOCATION_SMM, // System Management Module.
955 SMBIOS_TEMP_LOCATION_BOARD, // Motherboard.
956 SMBIOS_TEMP_LOCATION_MM, // Memory.
957 SMBIOS_TEMP_LOCATION_PM, // Processor Module.
958 SMBIOS_TEMP_LOCATION_POW, // Power Unit.
959 SMBIOS_TEMP_LOCATION_ADDCARD,
962 struct smbios_type28 {
963 struct smbios_header header;
964 u8 description;
965 u8 location_and_status;
966 u16 maximum_value;
967 u16 minimum_value;
968 u16 resolution;
969 u16 tolerance;
970 u16 accuracy;
971 u32 oem_defined;
972 u16 nominal_value;
973 u8 eos[2];
974 } __packed;
977 struct smbios_type32 {
978 struct smbios_header header;
979 u8 reserved[6];
980 u8 boot_status;
981 u8 eos[2];
982 } __packed;
984 struct smbios_type38 {
985 struct smbios_header header;
986 u8 interface_type;
987 u8 ipmi_rev;
988 u8 i2c_slave_addr;
989 u8 nv_storage_addr;
990 u64 base_address;
991 u8 base_address_modifier;
992 u8 irq;
993 u8 eos[2];
994 } __packed;
996 enum smbios_bmc_interface_type {
997 SMBIOS_BMC_INTERFACE_UNKNOWN = 0,
998 SMBIOS_BMC_INTERFACE_KCS,
999 SMBIOS_BMC_INTERFACE_SMIC,
1000 SMBIOS_BMC_INTERFACE_BLOCK,
1001 SMBIOS_BMC_INTERFACE_SMBUS,
1004 typedef enum {
1005 SMBIOS_DEVICE_TYPE_OTHER = 0x01,
1006 SMBIOS_DEVICE_TYPE_UNKNOWN,
1007 SMBIOS_DEVICE_TYPE_VIDEO,
1008 SMBIOS_DEVICE_TYPE_SCSI,
1009 SMBIOS_DEVICE_TYPE_ETHERNET,
1010 SMBIOS_DEVICE_TYPE_TOKEN_RING,
1011 SMBIOS_DEVICE_TYPE_SOUND,
1012 SMBIOS_DEVICE_TYPE_PATA,
1013 SMBIOS_DEVICE_TYPE_SATA,
1014 SMBIOS_DEVICE_TYPE_SAS,
1015 SMBIOS_DEVICE_TYPE_WIRELESS_LAN,
1016 SMBIOS_DEVICE_TYPE_BLUETOOTH,
1017 SMBIOS_DEVICE_TYPE_WWAN,
1018 SMBIOS_DEVICE_TYPE_EMMC,
1019 SMBIOS_DEVICE_TYPE_NVME,
1020 SMBIOS_DEVICE_TYPE_UFS,
1021 } smbios_onboard_device_type;
1023 #define SMBIOS_DEVICE_TYPE_COUNT 10
1025 struct smbios_type41 {
1026 struct smbios_header header;
1027 u8 reference_designation;
1028 u8 device_type: 7;
1029 u8 device_status: 1;
1030 u8 device_type_instance;
1031 u16 segment_group_number;
1032 u8 bus_number;
1033 u8 function_number: 3;
1034 u8 device_number: 5;
1035 u8 eos[2];
1036 } __packed;
1039 #define SMBIOS_TPM_DEVICE_CHARACTERISTICS_NOT_SUPPORTED (1ULL << 2)
1040 #define SMBIOS_TPM_DEVICE_FAMILY_CONFIGURABLE_VIA_FW_UPD (1ULL << 3)
1041 #define SMBIOS_TPM_DEVICE_FAMILY_CONFIGURABLE_VIA_PLATFORM_SW_SUPPORT (1ULL << 4)
1042 #define SMBIOS_TPM_DEVICE_FAMILY_CONFIGURABLE_VIA_OEM_PROPRIETARY (1ULL << 5)
1044 struct smbios_type43 {
1045 struct smbios_header header;
1046 u32 vendor_id;
1047 u8 major_spec_ver;
1048 u8 minor_spec_ver;
1049 u32 fw_ver1;
1050 u32 fw_ver2;
1051 u8 description;
1052 u64 characteristics;
1053 u32 oem_defined;
1054 u8 eos[2];
1055 } __packed;
1057 struct smbios_type127 {
1058 struct smbios_header header;
1059 u8 eos[2];
1060 } __packed;
1062 void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id,
1063 struct smbios_type17 *t);
1064 void smbios_fill_dimm_asset_tag(const struct dimm_info *dimm,
1065 struct smbios_type17 *t);
1066 void smbios_fill_dimm_locator(const struct dimm_info *dimm,
1067 struct smbios_type17 *t);
1069 smbios_wakeup_type smbios_system_wakeup_type(void);
1070 smbios_board_type smbios_mainboard_board_type(void);
1071 smbios_enclosure_type smbios_mainboard_enclosure_type(void);
1073 #endif