1 /* SPDX-License-Identifier: GPL-2.0-only */
7 #include <memory_info.h>
9 #define update_max(len, max_len, stmt) \
13 max_len = MAX(max_len, tmp); \
17 unsigned long smbios_write_tables(unsigned long start
);
18 int smbios_add_string(u8
*start
, const char *str
);
19 int smbios_string_table_len(u8
*start
);
22 int smbios_full_table_len(struct smbios_header
*header
, u8
*str_table_start
);
23 void *smbios_carve_table(unsigned long start
, u8 type
, u8 length
, u16 handle
);
25 /* Used by mainboard to add an on-board device */
27 enum misc_slot_length
;
29 enum slot_data_bus_bandwidth
;
30 int smbios_write_type9(unsigned long *current
, int *handle
,
31 const char *name
, const enum misc_slot_type type
,
32 const enum slot_data_bus_bandwidth bandwidth
,
33 const enum misc_slot_usage usage
,
34 const enum misc_slot_length length
,
35 const u16 id
, u8 slot_char1
, u8 slot_char2
,
36 u8 segment_group
, u8 bus
, u8 dev_func
);
37 enum smbios_bmc_interface_type
;
38 int smbios_write_type38(unsigned long *current
, int *handle
,
39 const enum smbios_bmc_interface_type interface_type
,
40 const u8 ipmi_rev
, const u8 i2c_addr
, const u8 nv_addr
,
41 const u64 base_addr
, const u8 base_modifier
,
43 int smbios_write_type41(unsigned long *current
, int *handle
,
44 const char *name
, u8 instance
, u16 segment_group
,
45 u8 bus
, u8 device
, u8 function
, u8 device_type
);
46 enum smbios_temp_location
;
47 enum smbios_temp_status
;
48 int smbios_write_type28(unsigned long *current
, int *handle
,
50 const enum smbios_temp_location location
,
51 const enum smbios_temp_status status
,
52 u16 max_value
, u16 min_value
,
53 u16 resolution
, u16 tolerance
,
58 int smbios_write_type43(unsigned long *current
, int *handle
, const u32 vendor_id
,
59 const u8 major_spec_ver
, const u8 minor_spec_ver
,
60 const u32 fw_ver1
, const u32 fw_ver2
, const char *description
,
61 const u64 characteristics
, const u32 oem_defined
);
64 int get_smbios_data(struct device
*dev
, int *handle
, unsigned long *current
);
66 const char *smbios_system_manufacturer(void);
67 const char *smbios_system_product_name(void);
68 const char *smbios_system_serial_number(void);
69 const char *smbios_system_version(void);
70 void smbios_system_set_uuid(u8
*uuid
);
71 const char *smbios_system_sku(void);
73 unsigned int smbios_cpu_get_max_speed_mhz(void);
74 unsigned int smbios_cpu_get_current_speed_mhz(void);
75 unsigned int smbios_cpu_get_voltage(void);
77 const char *smbios_mainboard_manufacturer(void);
78 const char *smbios_mainboard_product_name(void);
79 const char *smbios_mainboard_serial_number(void);
80 const char *smbios_mainboard_version(void);
82 const char *smbios_mainboard_bios_version(void);
83 const char *smbios_mainboard_asset_tag(void);
84 u8
smbios_mainboard_feature_flags(void);
85 const char *smbios_mainboard_location_in_chassis(void);
86 const char *smbios_chassis_version(void);
87 const char *smbios_chassis_serial_number(void);
88 const char *smbios_processor_serial_number(void);
89 u8
smbios_chassis_power_cords(void);
91 /* This string could be filled late in payload. */
92 void smbios_type0_bios_version(uintptr_t address
);
94 void smbios_ec_revision(uint8_t *ec_major_revision
, uint8_t *ec_minor_revision
);
96 unsigned int smbios_processor_external_clock(void);
97 unsigned int smbios_processor_characteristics(void);
99 unsigned int smbios_processor_family(struct cpuid_result res
);
101 unsigned int smbios_cache_error_correction_type(u8 level
);
102 unsigned int smbios_cache_sram_type(void);
103 unsigned int smbios_cache_conf_operation_mode(u8 level
);
105 /* Used by mainboard to add port information of type 8 */
106 struct port_information
;
107 int smbios_write_type8(unsigned long *current
, int *handle
,
108 const struct port_information
*port
,
111 #define BIOS_CHARACTERISTICS_PCI_SUPPORTED (1 << 7)
112 #define BIOS_CHARACTERISTICS_PC_CARD (1 << 8)
113 #define BIOS_CHARACTERISTICS_PNP (1 << 9)
114 #define BIOS_CHARACTERISTICS_APM (1 << 10)
115 #define BIOS_CHARACTERISTICS_UPGRADEABLE (1 << 11)
116 #define BIOS_CHARACTERISTICS_SHADOW (1 << 12)
117 #define BIOS_CHARACTERISTICS_BOOT_FROM_CD (1 << 15)
118 #define BIOS_CHARACTERISTICS_SELECTABLE_BOOT (1 << 16)
119 #define BIOS_CHARACTERISTICS_BIOS_SOCKETED (1 << 17)
121 #define BIOS_EXT1_CHARACTERISTICS_ACPI (1 << 0)
122 #define BIOS_EXT2_CHARACTERISTICS_TARGET (1 << 2)
124 #define BIOS_MEMORY_ECC_SINGLE_BIT_CORRECTING (1 << 3)
125 #define BIOS_MEMORY_ECC_DOUBLE_BIT_CORRECTING (1 << 4)
126 #define BIOS_MEMORY_ECC_SCRUBBING (1 << 5)
128 #define MEMORY_TYPE_DETAIL_OTHER (1 << 1)
129 #define MEMORY_TYPE_DETAIL_UNKNOWN (1 << 2)
130 #define MEMORY_TYPE_DETAIL_FAST_PAGED (1 << 3)
131 #define MEMORY_TYPE_DETAIL_STATIC_COLUMN (1 << 4)
132 #define MEMORY_TYPE_DETAIL_PSEUDO_STATIC (1 << 5)
133 #define MEMORY_TYPE_DETAIL_RAMBUS (1 << 6)
134 #define MEMORY_TYPE_DETAIL_SYNCHRONOUS (1 << 7)
135 #define MEMORY_TYPE_DETAIL_CMOS (1 << 8)
136 #define MEMORY_TYPE_DETAIL_EDO (1 << 9)
137 #define MEMORY_TYPE_DETAIL_WINDOW_DRAM (1 << 10)
138 #define MEMORY_TYPE_DETAIL_CACHE_DRAM (1 << 11)
139 #define MEMORY_TYPE_DETAIL_NON_VOLATILE (1 << 12)
140 #define MEMORY_TYPE_DETAIL_REGISTERED (1 << 13)
141 #define MEMORY_TYPE_DETAIL_UNBUFFERED (1 << 14)
142 #define MEMORY_TYPE_DETAIL_LRDIMM (1 << 15)
144 #define MEMORY_TECHNOLOGY_OTHER 0x01
145 #define MEMORY_TECHNOLOGY_UNKNOWN 0x02
146 #define MEMORY_TECHNOLOGY_DRAM 0x03
147 #define MEMORY_TECHNOLOGY_NVDIMM_N 0x04
148 #define MEMORY_TECHNOLOGY_NVDIMM_F 0x05
149 #define MEMORY_TECHNOLOGY_NVDIMM_P 0x06
150 #define MEMORY_TECHNOLOGY_INTEL_PERSISTENT 0x07
152 #define MEMORY_OPERATING_MODE_CAP_OTHER (1 << 1)
153 #define MEMORY_OPERATING_MODE_CAP_UNKNOWN (1 << 2)
154 #define MEMORY_OPERATING_MODE_CAP_VOLATILE (1 << 3)
155 #define MEMORY_OPERATING_MODE_CAP_BYTE_ACCESS_PERSISTENT (1 << 4)
156 #define MEMORY_OPERATING_MODE_CAP_BLOCK_ACCESS_PERSISTENT (1 << 5)
159 MEMORY_BUS_WIDTH_8
= 0,
160 MEMORY_BUS_WIDTH_16
= 1,
161 MEMORY_BUS_WIDTH_32
= 2,
162 MEMORY_BUS_WIDTH_64
= 3,
163 MEMORY_BUS_WIDTH_128
= 4,
164 MEMORY_BUS_WIDTH_256
= 5,
165 MEMORY_BUS_WIDTH_512
= 6,
166 MEMORY_BUS_WIDTH_1024
= 7,
167 MEMORY_BUS_WIDTH_MAX
= 7,
168 } smbios_memory_bus_width
;
171 MEMORY_FORMFACTOR_OTHER
= 0x01,
172 MEMORY_FORMFACTOR_UNKNOWN
= 0x02,
173 MEMORY_FORMFACTOR_SIMM
= 0x03,
174 MEMORY_FORMFACTOR_SIP
= 0x04,
175 MEMORY_FORMFACTOR_CHIP
= 0x05,
176 MEMORY_FORMFACTOR_DIP
= 0x06,
177 MEMORY_FORMFACTOR_ZIP
= 0x07,
178 MEMORY_FORMFACTOR_PROPRIETARY_CARD
= 0x08,
179 MEMORY_FORMFACTOR_DIMM
= 0x09,
180 MEMORY_FORMFACTOR_TSOP
= 0x0a,
181 MEMORY_FORMFACTOR_ROC
= 0x0b,
182 MEMORY_FORMFACTOR_RIMM
= 0x0c,
183 MEMORY_FORMFACTOR_SODIMM
= 0x0d,
184 MEMORY_FORMFACTOR_SRIMM
= 0x0e,
185 MEMORY_FORMFACTOR_FBDIMM
= 0x0f,
186 MEMORY_FORMFACTOR_DIE
= 0x10,
187 } smbios_memory_form_factor
;
190 MEMORY_TYPE_OTHER
= 0x01,
191 MEMORY_TYPE_UNKNOWN
= 0x02,
192 MEMORY_TYPE_DRAM
= 0x03,
193 MEMORY_TYPE_EDRAM
= 0x04,
194 MEMORY_TYPE_VRAM
= 0x05,
195 MEMORY_TYPE_SRAM
= 0x06,
196 MEMORY_TYPE_RAM
= 0x07,
197 MEMORY_TYPE_ROM
= 0x08,
198 MEMORY_TYPE_FLASH
= 0x09,
199 MEMORY_TYPE_EEPROM
= 0x0a,
200 MEMORY_TYPE_FEPROM
= 0x0b,
201 MEMORY_TYPE_EPROM
= 0x0c,
202 MEMORY_TYPE_CDRAM
= 0x0d,
203 MEMORY_TYPE_3DRAM
= 0x0e,
204 MEMORY_TYPE_SDRAM
= 0x0f,
205 MEMORY_TYPE_SGRAM
= 0x10,
206 MEMORY_TYPE_RDRAM
= 0x11,
207 MEMORY_TYPE_DDR
= 0x12,
208 MEMORY_TYPE_DDR2
= 0x13,
209 MEMORY_TYPE_DDR2_FBDIMM
= 0x14,
210 MEMORY_TYPE_DDR3
= 0x18,
211 MEMORY_TYPE_FBD2
= 0x19,
212 MEMORY_TYPE_DDR4
= 0x1a,
213 MEMORY_TYPE_LPDDR
= 0x1b,
214 MEMORY_TYPE_LPDDR2
= 0x1c,
215 MEMORY_TYPE_LPDDR3
= 0x1d,
216 MEMORY_TYPE_LPDDR4
= 0x1e,
217 MEMORY_TYPE_LOGICAL_NON_VOLATILE_DEVICE
= 0x1f,
218 MEMORY_TYPE_HBM
= 0x20,
219 MEMORY_TYPE_HBM2
= 0x21,
220 MEMORY_TYPE_DDR5
= 0x22,
221 MEMORY_TYPE_LPDDR5
= 0x23,
222 MEMORY_TYPE_HBM3
= 0x24,
223 } smbios_memory_type
;
226 MEMORY_ARRAY_LOCATION_OTHER
= 0x01,
227 MEMORY_ARRAY_LOCATION_UNKNOWN
= 0x02,
228 MEMORY_ARRAY_LOCATION_SYSTEM_BOARD
= 0x03,
229 MEMORY_ARRAY_LOCATION_ISA_ADD_ON
= 0x04,
230 MEMORY_ARRAY_LOCATION_EISA_ADD_ON
= 0x05,
231 MEMORY_ARRAY_LOCATION_PCI_ADD_ON
= 0x06,
232 MEMORY_ARRAY_LOCATION_MCA_ADD_ON
= 0x07,
233 MEMORY_ARRAY_LOCATION_PCMCIA_ADD_ON
= 0x08,
234 MEMORY_ARRAY_LOCATION_PROPRIETARY_ADD_ON
= 0x09,
235 MEMORY_ARRAY_LOCATION_NUBUS
= 0x0a,
236 MEMORY_ARRAY_LOCATION_PC_98_C20_ADD_ON
= 0xa0,
237 MEMORY_ARRAY_LOCATION_PC_98_C24_ADD_ON
= 0xa1,
238 MEMORY_ARRAY_LOCATION_PC_98_E_ADD_ON
= 0xa2,
239 MEMORY_ARRAY_LOCATION_PC_98_LOCAL_BUS_ADD_ON
= 0xa3,
240 MEMORY_ARRAY_LOCATION_CXL_FLEXBUS_1_0_ADD_ON
= 0xa4,
241 } smbios_memory_array_location
;
244 MEMORY_ARRAY_USE_OTHER
= 0x01,
245 MEMORY_ARRAY_USE_UNKNOWN
= 0x02,
246 MEMORY_ARRAY_USE_SYSTEM
= 0x03,
247 MEMORY_ARRAY_USE_VIDEO
= 0x04,
248 MEMORY_ARRAY_USE_FLASH
= 0x05,
249 MEMORY_ARRAY_USE_NVRAM
= 0x06,
250 MEMORY_ARRAY_USE_CACHE
= 0x07,
251 } smbios_memory_array_use
;
254 MEMORY_ARRAY_ECC_OTHER
= 0x01,
255 MEMORY_ARRAY_ECC_UNKNOWN
= 0x02,
256 MEMORY_ARRAY_ECC_NONE
= 0x03,
257 MEMORY_ARRAY_ECC_PARITY
= 0x04,
258 MEMORY_ARRAY_ECC_SINGLE_BIT
= 0x05,
259 MEMORY_ARRAY_ECC_MULTI_BIT
= 0x06,
260 MEMORY_ARRAY_ECC_CRC
= 0x07,
261 } smbios_memory_array_ecc
;
263 #define SMBIOS_STATE_SAFE 3
265 SMBIOS_BIOS_INFORMATION
= 0,
266 SMBIOS_SYSTEM_INFORMATION
= 1,
267 SMBIOS_BOARD_INFORMATION
= 2,
268 SMBIOS_SYSTEM_ENCLOSURE
= 3,
269 SMBIOS_PROCESSOR_INFORMATION
= 4,
270 SMBIOS_CACHE_INFORMATION
= 7,
271 SMBIOS_PORT_CONNECTOR_INFORMATION
= 8,
272 SMBIOS_SYSTEM_SLOTS
= 9,
273 SMBIOS_OEM_STRINGS
= 11,
274 SMBIOS_EVENT_LOG
= 15,
275 SMBIOS_PHYS_MEMORY_ARRAY
= 16,
276 SMBIOS_MEMORY_DEVICE
= 17,
277 SMBIOS_MEMORY_ARRAY_MAPPED_ADDRESS
= 19,
278 SMBIOS_MEMORY_DEVICE_MAPPED_ADDRESS
= 20,
279 SMBIOS_TEMPERATURE_PROBE
= 28,
280 SMBIOS_SYSTEM_BOOT_INFORMATION
= 32,
281 SMBIOS_IPMI_DEVICE_INFORMATION
= 38,
282 SMBIOS_SYSTEM_POWER_SUPPLY
= 39,
283 SMBIOS_ONBOARD_DEVICES_EXTENDED_INFORMATION
= 41,
284 SMBIOS_TPM_DEVICE
= 43,
285 SMBIOS_END_OF_TABLE
= 127,
286 } smbios_struct_type_t
;
288 struct smbios_entry
{
296 u8 formwatted_area
[5];
297 u8 intermediate_anchor_string
[5];
298 u8 intermediate_checksum
;
299 u16 struct_table_length
;
300 u32 struct_table_address
;
302 u8 smbios_bcd_revision
;
305 struct smbios_entry30
{
314 u32 struct_table_length
;
315 u64 struct_table_address
;
318 struct smbios_header
{
324 struct smbios_type0
{
325 struct smbios_header header
;
328 u16 bios_start_segment
;
329 u8 bios_release_date
;
331 u64 bios_characteristics
;
332 u8 bios_characteristics_ext1
;
333 u8 bios_characteristics_ext2
;
334 u8 system_bios_major_release
;
335 u8 system_bios_minor_release
;
338 u16 extended_bios_rom_size
;
343 SMBIOS_WAKEUP_TYPE_RESERVED
= 0x00,
344 SMBIOS_WAKEUP_TYPE_OTHER
= 0x01,
345 SMBIOS_WAKEUP_TYPE_UNKNOWN
= 0x02,
346 SMBIOS_WAKEUP_TYPE_APM_TIMER
= 0x03,
347 SMBIOS_WAKEUP_TYPE_MODEM_RING
= 0x04,
348 SMBIOS_WAKEUP_TYPE_LAN_REMOTE
= 0x05,
349 SMBIOS_WAKEUP_TYPE_POWER_SWITCH
= 0x06,
350 SMBIOS_WAKEUP_TYPE_PCI_PME
= 0x07,
351 SMBIOS_WAKEUP_TYPE_AC_POWER_RESTORED
= 0x08,
352 } smbios_wakeup_type
;
354 struct smbios_type1
{
355 struct smbios_header header
;
367 #define SMBIOS_FEATURE_FLAGS_HOSTING_BOARD (1 << 0)
368 #define SMBIOS_FEATURE_FLAGS_REQUIRES_DAUGHTER_CARD (1 << 1)
369 #define SMBIOS_FEATURE_FLAGS_REMOVABLE (1 << 2)
370 #define SMBIOS_FEATURE_FLAGS_REPLACEABLE (1 << 3)
371 #define SMBIOS_FEATURE_FLAGS_HOT_SWAPPABLE (1 << 4)
374 SMBIOS_BOARD_TYPE_UNKNOWN
= 0x01,
375 SMBIOS_BOARD_TYPE_OTHER
= 0x02,
376 SMBIOS_BOARD_TYPE_SERVER_BLADE
= 0x03,
377 SMBIOS_BOARD_TYPE_CONNECTIVITY_SWITCH
= 0x04,
378 SMBIOS_BOARD_TYPE_SYSTEM_MANAGEMENT_MODULE
= 0x05,
379 SMBIOS_BOARD_TYPE_PROCESSOR_MODULE
= 0x06,
380 SMBIOS_BOARD_TYPE_IO_MODULE
= 0x07,
381 SMBIOS_BOARD_TYPE_MEMORY_MODULE
= 0x08,
382 SMBIOS_BOARD_TYPE_DAUGHTER_BOARD
= 0x09,
383 SMBIOS_BOARD_TYPE_MOTHERBOARD
= 0x0a,
384 SMBIOS_BOARD_TYPE_PROCESSOR_MEMORY_MODULE
= 0x0b,
385 SMBIOS_BOARD_TYPE_PROCESSOR_IO_MODULE
= 0x0c,
386 SMBIOS_BOARD_TYPE_INTERCONNECT_BOARD
= 0x0d,
389 struct smbios_type2
{
390 struct smbios_header header
;
397 u8 location_in_chassis
;
404 SMBIOS_ENCLOSURE_OTHER
= 0x01,
405 SMBIOS_ENCLOSURE_UNKNOWN
= 0x02,
406 SMBIOS_ENCLOSURE_DESKTOP
= 0x03,
407 SMBIOS_ENCLOSURE_LOW_PROFILE_DESKTOP
= 0x04,
408 SMBIOS_ENCLOSURE_PIZZA_BOX
= 0x05,
409 SMBIOS_ENCLOSURE_MINI_TOWER
= 0x06,
410 SMBIOS_ENCLOSURE_TOWER
= 0x07,
411 SMBIOS_ENCLOSURE_PORTABLE
= 0x08,
412 SMBIOS_ENCLOSURE_LAPTOP
= 0x09,
413 SMBIOS_ENCLOSURE_NOTEBOOK
= 0x0a,
414 SMBIOS_ENCLOSURE_HAND_HELD
= 0x0b,
415 SMBIOS_ENCLOSURE_DOCKING_STATION
= 0x0c,
416 SMBIOS_ENCLOSURE_ALL_IN_ONE
= 0x0d,
417 SMBIOS_ENCLOSURE_SUB_NOTEBOOK
= 0x0e,
418 SMBIOS_ENCLOSURE_SPACE_SAVING
= 0x0f,
419 SMBIOS_ENCLOSURE_LUNCH_BOX
= 0x10,
420 SMBIOS_ENCLOSURE_MAIN_SERVER_CHASSIS
= 0x11,
421 SMBIOS_ENCLOSURE_EXPANSION_CHASSIS
= 0x12,
422 SMBIOS_ENCLOSURE_SUBCHASSIS
= 0x13,
423 SMBIOS_ENCLOSURE_BUS_EXPANSION_CHASSIS
= 0x14,
424 SMBIOS_ENCLOSURE_PERIPHERAL_CHASSIS
= 0x15,
425 SMBIOS_ENCLOSURE_RAID_CHASSIS
= 0x16,
426 SMBIOS_ENCLOSURE_RACK_MOUNT_CHASSIS
= 0x17,
427 SMBIOS_ENCLOSURE_SEALED_CASE_PC
= 0x18,
428 SMBIOS_ENCLOSURE_MULTI_SYSTEM_CHASSIS
= 0x19,
429 SMBIOS_ENCLOSURE_COMPACT_PCI
= 0x1a,
430 SMBIOS_ENCLOSURE_ADVANCED_TCA
= 0x1b,
431 SMBIOS_ENCLOSURE_BLADE
= 0x1c,
432 SMBIOS_ENCLOSURE_BLADE_ENCLOSURE
= 0x1d,
433 SMBIOS_ENCLOSURE_TABLET
= 0x1e,
434 SMBIOS_ENCLOSURE_CONVERTIBLE
= 0x1f,
435 SMBIOS_ENCLOSURE_DETACHABLE
= 0x20,
436 SMBIOS_ENCLOSURE_IOT_GATEWAY
= 0x21,
437 SMBIOS_ENCLOSURE_EMBEDDED_PC
= 0x22,
438 SMBIOS_ENCLOSURE_MINI_PC
= 0x23,
439 SMBIOS_ENCLOSURE_STICK_PC
= 0x24,
440 } smbios_enclosure_type
;
442 struct smbios_type3
{
443 struct smbios_header header
;
450 u8 power_supply_state
;
455 u8 number_of_power_cords
;
457 u8 element_record_length
;
462 struct smbios_type4
{
463 struct smbios_header header
;
464 u8 socket_designation
;
467 u8 processor_manufacturer
;
469 u8 processor_version
;
475 u8 processor_upgrade
;
485 u16 processor_characteristics
;
486 u16 processor_family2
;
493 /* defines for smbios_type4 */
495 #define SMBIOS_PROCESSOR_STATUS_POPULATED (1 << 6)
496 #define SMBIOS_PROCESSOR_STATUS_CPU_ENABLED (1 << 0)
498 /* enum for socket type */
499 enum smbios_processor_upgrade_field
{
500 PROCESSOR_UPGRADE_OTHER
= 0x01,
501 PROCESSOR_UPGRADE_UNKNOWN
= 0x02,
502 PROCESSOR_UPGRADE_DAUGHTER_BOARD
= 0x03,
503 PROCESSOR_UPGRADE_ZIF_SOCKET
= 0x04,
504 PROCESSOR_UPGRADE_REPLACEABLE_PIGGY_BACK
= 0x05,
505 PROCESSOR_UPGRADE_NONE
= 0x06,
506 PROCESSOR_UPGRADE_LIF_SOCKET
= 0x07,
507 PROCESSOR_UPGRADE_SLOT_1
= 0x08,
508 PROCESSOR_UPGRADE_SLOT_2
= 0x09,
509 PROCESSOR_UPGRADE_370_PIN_SOCKET
= 0x0a,
510 PROCESSOR_UPGRADE_SLOT_A
= 0x0b,
511 PROCESSOR_UPGRADE_SLOT_M
= 0x0c,
512 PROCESSOR_UPGRADE_SOCKET_423
= 0x0d,
513 PROCESSOR_UPGRADE_SOCKET_A
= 0x0e,
514 PROCESSOR_UPGRADE_SOCKET_478
= 0x0f,
515 PROCESSOR_UPGRADE_SOCKET_754
= 0x10,
516 PROCESSOR_UPGRADE_SOCKET_940
= 0x11,
517 PROCESSOR_UPGRADE_SOCKET_939
= 0x12,
518 PROCESSOR_UPGRADE_SOCKET_MPGA604
= 0x13,
519 PROCESSOR_UPGRADE_SOCKET_LGA771
= 0x14,
520 PROCESSOR_UPGRADE_SOCKET_LGA775
= 0x15,
521 PROCESSOR_UPGRADE_SOCKET_S1
= 0x16,
522 PROCESSOR_UPGRADE_SOCKET_AM2
= 0x17,
523 PROCESSOR_UPGRADE_SOCKET_F
= 0x18,
524 PROCESSOR_UPGRADE_SOCKET_LGA1366
= 0x19,
525 PROCESSOR_UPGRADE_SOCKET_G34
= 0x1a,
526 PROCESSOR_UPGRADE_SOCKET_AM3
= 0x1b,
527 PROCESSOR_UPGRADE_SOCKET_C32
= 0x1c,
528 PROCESSOR_UPGRADE_SOCKET_LGA1156
= 0x1d,
529 PROCESSOR_UPGRADE_SOCKET_LGA1567
= 0x1e,
530 PROCESSOR_UPGRADE_SOCKET_PGA988A
= 0x1f,
531 PROCESSOR_UPGRADE_SOCKET_BGA1288
= 0x20,
532 PROCESSOR_UPGRADE_SOCKET_RPGA988B
= 0x21,
533 PROCESSOR_UPGRADE_SOCKET_BGA1023
= 0x22,
534 PROCESSOR_UPGRADE_SOCKET_BGA1224
= 0x23,
535 PROCESSOR_UPGRADE_SOCKET_LGA1155
= 0x24,
536 PROCESSOR_UPGRADE_SOCKET_LGA1356
= 0x25,
537 PROCESSOR_UPGRADE_SOCKET_LGA2011
= 0x26,
538 PROCESSOR_UPGRADE_SOCKET_FS1
= 0x27,
539 PROCESSOR_UPGRADE_SOCKET_FS2
= 0x28,
540 PROCESSOR_UPGRADE_SOCKET_FM1
= 0x29,
541 PROCESSOR_UPGRADE_SOCKET_FM2
= 0x2a,
542 PROCESSOR_UPGRADE_SOCKET_LGA2011_3
= 0x2b,
543 PROCESSOR_UPGRADE_SOCKET_LGA1356_3
= 0x2c,
544 PROCESSOR_UPGRADE_SOCKET_LGA1150
= 0x2d,
545 PROCESSOR_UPGRADE_SOCKET_BGA1168
= 0x2e,
546 PROCESSOR_UPGRADE_SOCKET_BGA1234
= 0x2f,
547 PROCESSOR_UPGRADE_SOCKET_BGA1364
= 0x30,
548 PROCESSOR_UPGRADE_SOCKET_AM4
= 0x31,
549 PROCESSOR_UPGRADE_SOCKET_LGA1151
= 0x32,
550 PROCESSOR_UPGRADE_SOCKET_BGA1356
= 0x33,
551 PROCESSOR_UPGRADE_SOCKET_BGA1440
= 0x34,
552 PROCESSOR_UPGRADE_SOCKET_BGA1515
= 0x35,
553 PROCESSOR_UPGRADE_SOCKET_LGA3647_1
= 0x36,
554 PROCESSOR_UPGRADE_SOCKET_SP3
= 0x37,
555 PROCESSOR_UPGRADE_SOCKET_SP3R2
= 0x38,
556 PROCESSOR_UPGRADE_SOCKET_LGA2066
= 0x39,
557 PROCESSOR_UPGRADE_SOCKET_BGA1392
= 0x3a,
558 PROCESSOR_UPGRADE_SOCKET_BGA1510
= 0x3b,
559 PROCESSOR_UPGRADE_SOCKET_BGA1528
= 0x3c,
560 PROCESSOR_UPGRADE_SOCKET_LGA4189
= 0x3d,
561 PROCESSOR_UPGRADE_SOCKET_LGA1200
= 0x3e,
562 PROCESSOR_UPGRADE_SOCKET_LGA4677
= 0x3f,
563 PROCESSOR_UPGRADE_SOCKET_LGA1700
= 0x40,
564 PROCESSOR_UPGRADE_SOCKET_BGA1744
= 0x41,
565 PROCESSOR_UPGRADE_SOCKET_BGA1781
= 0x42,
566 PROCESSOR_UPGRADE_SOCKET_BGA1211
= 0x43,
567 PROCESSOR_UPGRADE_SOCKET_BGA2422
= 0x44,
568 PROCESSOR_UPGRADE_SOCKET_LGA1211
= 0x45,
569 PROCESSOR_UPGRADE_SOCKET_LGA2422
= 0x46,
570 PROCESSOR_UPGRADE_SOCKET_LGA5773
= 0x47,
571 PROCESSOR_UPGRADE_SOCKET_BGA5773
= 0x48,
574 /* defines for processor family */
575 #define SMBIOS_PROCESSOR_FAMILY_OTHER 0x01
576 #define SMBIOS_PROCESSOR_FAMILY_UNKNOWN 0x02
577 #define SMBIOS_PROCESSOR_FAMILY_XEON 0xb3
579 /* defines for processor characteristics */
580 #define PROCESSOR_64BIT_CAPABLE (1 << 2)
581 #define PROCESSOR_MULTI_CORE (1 << 3)
582 #define PROCESSOR_POWER_PERFORMANCE_CONTROL (1 << 7)
584 /* defines for supported_sram_type/current_sram_type */
586 #define SMBIOS_CACHE_SRAM_TYPE_OTHER (1 << 0)
587 #define SMBIOS_CACHE_SRAM_TYPE_UNKNOWN (1 << 1)
588 #define SMBIOS_CACHE_SRAM_TYPE_NON_BURST (1 << 2)
589 #define SMBIOS_CACHE_SRAM_TYPE_BURST (1 << 3)
590 #define SMBIOS_CACHE_SRAM_TYPE_PIPELINE_BURST (1 << 4)
591 #define SMBIOS_CACHE_SRAM_TYPE_SYNCHRONOUS (1 << 5)
592 #define SMBIOS_CACHE_SRAM_TYPE_ASYNCHRONOUS (1 << 6)
594 /* enum for error_correction_type */
596 enum smbios_cache_error_corr
{
597 SMBIOS_CACHE_ERROR_CORRECTION_OTHER
= 1,
598 SMBIOS_CACHE_ERROR_CORRECTION_UNKNOWN
,
599 SMBIOS_CACHE_ERROR_CORRECTION_NONE
,
600 SMBIOS_CACHE_ERROR_CORRECTION_PARITY
,
601 SMBIOS_CACHE_ERROR_CORRECTION_SINGLE_BIT
,
602 SMBIOS_CACHE_ERROR_CORRECTION_MULTI_BIT
,
605 /* enum for system_cache_type */
607 enum smbios_cache_type
{
608 SMBIOS_CACHE_TYPE_OTHER
= 1,
609 SMBIOS_CACHE_TYPE_UNKNOWN
,
610 SMBIOS_CACHE_TYPE_INSTRUCTION
,
611 SMBIOS_CACHE_TYPE_DATA
,
612 SMBIOS_CACHE_TYPE_UNIFIED
,
615 /* enum for associativity */
617 enum smbios_cache_associativity
{
618 SMBIOS_CACHE_ASSOCIATIVITY_OTHER
= 1,
619 SMBIOS_CACHE_ASSOCIATIVITY_UNKNOWN
,
620 SMBIOS_CACHE_ASSOCIATIVITY_DIRECT
,
621 SMBIOS_CACHE_ASSOCIATIVITY_2WAY
,
622 SMBIOS_CACHE_ASSOCIATIVITY_4WAY
,
623 SMBIOS_CACHE_ASSOCIATIVITY_FULL
,
624 SMBIOS_CACHE_ASSOCIATIVITY_8WAY
,
625 SMBIOS_CACHE_ASSOCIATIVITY_16WAY
,
626 SMBIOS_CACHE_ASSOCIATIVITY_12WAY
,
627 SMBIOS_CACHE_ASSOCIATIVITY_24WAY
,
628 SMBIOS_CACHE_ASSOCIATIVITY_32WAY
,
629 SMBIOS_CACHE_ASSOCIATIVITY_48WAY
,
630 SMBIOS_CACHE_ASSOCIATIVITY_64WAY
,
631 SMBIOS_CACHE_ASSOCIATIVITY_20WAY
,
634 /* defines for cache_configuration */
636 #define SMBIOS_CACHE_CONF_LEVEL(x) ((((x) - 1) & 0x7) << 0)
637 #define SMBIOS_CACHE_CONF_LOCATION(x) (((x) & 0x3) << 5)
638 #define SMBIOS_CACHE_CONF_ENABLED(x) (((x) & 0x1) << 7)
639 #define SMBIOS_CACHE_CONF_OPERATION_MODE(x) (((x) & 0x3) << 8)
641 /* defines for max_cache_size and installed_size */
643 #define SMBIOS_CACHE_SIZE_UNIT_1KB (0 << 15)
644 #define SMBIOS_CACHE_SIZE_UNIT_64KB (1 << 15)
645 #define SMBIOS_CACHE_SIZE_MASK 0x7fff
646 #define SMBIOS_CACHE_SIZE_OVERFLOW 0xffff
648 #define SMBIOS_CACHE_SIZE2_UNIT_1KB (0 << 31)
649 #define SMBIOS_CACHE_SIZE2_UNIT_64KB (1UL << 31)
650 #define SMBIOS_CACHE_SIZE2_MASK 0x7fffffff
652 /* define for cache operation mode */
654 #define SMBIOS_CACHE_OP_MODE_WRITE_THROUGH 0
655 #define SMBIOS_CACHE_OP_MODE_WRITE_BACK 1
656 #define SMBIOS_CACHE_OP_MODE_VARIES_WITH_MEMORY_ADDRESS 2
657 #define SMBIOS_CACHE_OP_MODE_UNKNOWN 3
659 struct smbios_type7
{
660 struct smbios_header header
;
661 u8 socket_designation
;
662 u16 cache_configuration
;
665 u16 supported_sram_type
;
666 u16 current_sram_type
;
668 u8 error_correction_type
;
669 u8 system_cache_type
;
676 /* enum for connector types */
679 CONN_CENTRONICS
= 0x01,
680 CONN_MINI_CENTRONICS
= 0x02,
681 CONN_PROPRIETARY
= 0x03,
682 CONN_DB_25_PIN_MALE
= 0x04,
683 CONN_DB_25_PIN_FEMALE
= 0x05,
684 CONN_DB_15_PIN_MALE
= 0x06,
685 CONN_DB_15_PIN_FEMALE
= 0x07,
686 CONN_DB_9_PIN_MALE
= 0x08,
687 CONN_DB_9_PIN_FEMALE
= 0x09,
690 CONN_50_PIN_MINI_SCSI
= 0x0C,
691 CONN_MINI_DIN
= 0x0D,
692 CONN_MICRO_DIN
= 0x0E,
694 CONN_INFRARED
= 0x10,
696 CONN_ACCESS_BUS_USB
= 0x12,
697 CONN_SSA_SCSI
= 0x13,
698 CONN_CIRCULAR_DIN_8_MALE
= 0x14,
699 CONN_CIRCULAR_DIN_8_FEMALE
= 0x15,
700 CONN_ON_BOARD_IDE
= 0x16,
701 CONN_ON_BOARD_FLOPPY
= 0x17,
702 CONN_9_PIN_DUAL_INLINE
= 0x18,
703 CONN_25_PIN_DUAL_INLINE
= 0x19,
704 CONN_50_PIN_DUAL_INLINE
= 0x1A,
705 CONN_68_PIN_DUAL_INLINE
= 0x1B,
706 CONN_ON_BOARD_SOUND_INPUT_FROM_CD_ROM
= 0x1C,
707 CONN_MINI_CENTRONICS_TYPE14
= 0x1D,
708 CONN_MINI_CENTRONICS_TYPE26
= 0x1E,
709 CONN_MINI_JACK_HEADPHONES
= 0x1F,
712 CONN_SAS_SATA
= 0x22,
713 CONN_USB_TYPE_C
= 0x23,
715 CONN_PC_98_HIRESO
= 0xA1,
717 CONN_PC98_NOTE
= 0xA3,
718 CONN_PC_98_FULL
= 0xA4,
720 } type8_connector_types
;
722 /* enum for port types */
724 TYPE_NONE_PORT
= 0x00,
725 TYPE_PARALLEL_PORT_XT_AT_COMPATIBLE
= 0x01,
726 TYPE_PARALLEL_PORT_PS_2
= 0x02,
727 TYPE_PARALLEL_PORT_ECP
= 0x03,
728 TYPE_PARALLEL_PORT_EPP
= 0x04,
729 TYPE_PARALLEL_PORT_ECP_EPP
= 0x05,
730 TYPE_SERIAL_PORT_XT_AT_COMPATIBLE
= 0x06,
731 TYPE_SERIAL_PORT_16450_COMPATIBLE
= 0x07,
732 TYPE_SERIAL_PORT_16550_COMPATIBLE
= 0x08,
733 TYPE_SERIAL_PORT_16550A_COMPATIBLE
= 0x09,
734 TYPE_SCSI_PORT
= 0x0A,
735 TYPE_MIDI_PORT
= 0x0B,
736 TYPE_JOY_STICK_PORT
= 0x0C,
737 TYPE_KEYBOARD_PORT
= 0x0D,
738 TYPE_MOUSE_PORT
= 0x0E,
739 TYPE_SSA_SCSI
= 0x0F,
741 TYPE_FIREWIRE_IEEE_P1394
= 0x11,
742 TYPE_PCMCIA_TYPE_I
= 0x12,
743 TYPE_PCMCIA_TYPE_II
= 0x13,
744 TYPE_PCMCIA_TYPE_III
= 0x14,
746 TYPE_ACCESS_BUS_PORT
= 0x16,
748 TYPE_SCSI_WIDE
= 0x18,
750 TYPE_PC_98_HIRESO
= 0x1A,
752 TYPE_VIDEO_PORT
= 0x1C,
753 TYPE_AUDIO_PORT
= 0x1D,
754 TYPE_MODEM_PORT
= 0x1E,
755 TYPE_NETWORK_PORT
= 0x1F,
759 TYPE_THUNDERBOLT
= 0x23,
760 TYPE_8251_COMPATIBLE
= 0xA0,
761 TYPE_8251_FIFO_COMPATIBLE
= 0xA1,
762 TYPE_OTHER_PORT
= 0xFF,
765 struct port_information
{
766 const char *internal_reference_designator
;
767 type8_connector_types internal_connector_type
;
768 const char *external_reference_designator
;
769 type8_connector_types external_connector_type
;
770 type8_port_types port_type
;
773 struct smbios_type8
{
774 struct smbios_header header
;
775 u8 internal_reference_designator
;
776 u8 internal_connector_type
;
777 u8 external_reference_designator
;
778 u8 external_connector_type
;
783 /* System Slots - Slot Type */
784 enum misc_slot_type
{
785 SlotTypeOther
= 0x01,
786 SlotTypeUnknown
= 0x02,
791 SlotTypePcmcia
= 0x07,
792 SlotTypeVlVesa
= 0x08,
793 SlotTypeProprietary
= 0x09,
794 SlotTypeProcessorCardSlot
= 0x0A,
795 SlotTypeProprietaryMemoryCardSlot
= 0x0B,
796 SlotTypeIORiserCardSlot
= 0x0C,
797 SlotTypeNuBus
= 0x0D,
798 SlotTypePci66MhzCapable
= 0x0E,
800 SlotTypeApg2X
= 0x10,
801 SlotTypeAgp4X
= 0x11,
803 SlotTypeAgp8X
= 0x13,
804 SlotTypeM2Socket1_DP
= 0x14,
805 SlotTypeM2Socket1_SD
= 0x15,
806 SlotTypeM2Socket2
= 0x16,
807 SlotTypeM2Socket3
= 0x17,
808 SlotTypeMxmTypeI
= 0x18,
809 SlotTypeMxmTypeII
= 0x19,
810 SlotTypeMxmTypeIIIStandard
= 0x1A,
811 SlotTypeMxmTypeIIIHe
= 0x1B,
812 SlotTypeMxmTypeIV
= 0x1C,
813 SlotTypeMxm30TypeA
= 0x1D,
814 SlotTypeMxm30TypeB
= 0x1E,
815 SlotTypePciExpressGen2Sff_8639
= 0x1F,
816 SlotTypePciExpressGen3Sff_8639
= 0x20,
817 SlotTypePciExpressMini52pinWithBSKO
= 0x21,
818 SlotTypePciExpressMini52pinWithoutBSKO
= 0x22,
819 SlotTypePciExpressMini76pin
= 0x23,
820 SlotTypePciExpressOCPNIC30SFF
= 0x26,
821 SlotTypePC98C20
= 0xA0,
822 SlotTypePC98C24
= 0xA1,
823 SlotTypePC98E
= 0xA2,
824 SlotTypePC98LocalBus
= 0xA3,
825 SlotTypePC98Card
= 0xA4,
826 SlotTypePciExpress
= 0xA5,
827 SlotTypePciExpressX1
= 0xA6,
828 SlotTypePciExpressX2
= 0xA7,
829 SlotTypePciExpressX4
= 0xA8,
830 SlotTypePciExpressX8
= 0xA9,
831 SlotTypePciExpressX16
= 0xAA,
832 SlotTypePciExpressGen2
= 0xAB,
833 SlotTypePciExpressGen2X1
= 0xAC,
834 SlotTypePciExpressGen2X2
= 0xAD,
835 SlotTypePciExpressGen2X4
= 0xAE,
836 SlotTypePciExpressGen2X8
= 0xAF,
837 SlotTypePciExpressGen2X16
= 0xB0,
838 SlotTypePciExpressGen3
= 0xB1,
839 SlotTypePciExpressGen3X1
= 0xB2,
840 SlotTypePciExpressGen3X2
= 0xB3,
841 SlotTypePciExpressGen3X4
= 0xB4,
842 SlotTypePciExpressGen3X8
= 0xB5,
843 SlotTypePciExpressGen3X16
= 0xB6,
844 SlotTypePciExpressGen4
= 0xB8,
845 SlotTypePciExpressGen4x1
= 0xB9,
846 SlotTypePciExpressGen4x2
= 0xBA,
847 SlotTypePciExpressGen4x4
= 0xBB,
848 SlotTypePciExpressGen4x8
= 0xBC,
849 SlotTypePciExpressGen4x16
= 0xBD,
850 SlotTypePciExpressGen5
= 0xBE,
851 SlotTypePciExpressGen5x1
= 0xBF,
852 SlotTypePciExpressGen5x2
= 0xC0,
853 SlotTypePciExpressGen5x4
= 0xC1,
854 SlotTypePciExpressGen5x8
= 0xC2,
855 SlotTypePciExpressGen5x16
= 0xC3
858 /* System Slots - Slot Data Bus Width. */
859 enum slot_data_bus_bandwidth
{
860 SlotDataBusWidthOther
= 0x01,
861 SlotDataBusWidthUnknown
= 0x02,
862 SlotDataBusWidth8Bit
= 0x03,
863 SlotDataBusWidth16Bit
= 0x04,
864 SlotDataBusWidth32Bit
= 0x05,
865 SlotDataBusWidth64Bit
= 0x06,
866 SlotDataBusWidth128Bit
= 0x07,
867 SlotDataBusWidth1X
= 0x08,
868 SlotDataBusWidth2X
= 0x09,
869 SlotDataBusWidth4X
= 0x0A,
870 SlotDataBusWidth8X
= 0x0B,
871 SlotDataBusWidth12X
= 0x0C,
872 SlotDataBusWidth16X
= 0x0D,
873 SlotDataBusWidth32X
= 0x0E
876 /* System Slots - Current Usage. */
877 enum misc_slot_usage
{
878 SlotUsageOther
= 0x01,
879 SlotUsageUnknown
= 0x02,
880 SlotUsageAvailable
= 0x03,
881 SlotUsageInUse
= 0x04,
882 SlotUsageUnavailable
= 0x05
885 /* System Slots - Slot Length.*/
886 enum misc_slot_length
{
887 SlotLengthOther
= 0x01,
888 SlotLengthUnknown
= 0x02,
889 SlotLengthShort
= 0x03,
890 SlotLengthLong
= 0x04
893 /* System Slots - Slot Characteristics 1. */
894 #define SMBIOS_SLOT_UNKNOWN (1 << 0)
895 #define SMBIOS_SLOT_5V (1 << 1)
896 #define SMBIOS_SLOT_3P3V (1 << 2)
897 #define SMBIOS_SLOT_SHARED (1 << 3)
898 #define SMBIOS_SLOT_PCCARD_16 (1 << 4)
899 #define SMBIOS_SLOT_PCCARD_CARDBUS (1 << 5)
900 #define SMBIOS_SLOT_PCCARD_ZOOM (1 << 6)
901 #define SMBIOS_SLOT_PCCARD_MODEM_RING (1 << 7)
902 /* System Slots - Slot Characteristics 2. */
903 #define SMBIOS_SLOT_PME (1 << 0)
904 #define SMBIOS_SLOT_HOTPLUG (1 << 1)
905 #define SMBIOS_SLOT_SMBUS (1 << 2)
906 #define SMBIOS_SLOT_BIFURCATION (1 << 3)
908 struct slot_peer_groups
{
912 u8 peer_data_bus_width
;
915 struct smbios_type9
{
916 struct smbios_header header
;
919 u8 slot_data_bus_width
;
923 u8 slot_characteristics_1
;
924 u8 slot_characteristics_2
;
925 u16 segment_group_number
;
927 u8 device_function_number
;
930 struct slot_peer_groups peer
[0];
934 struct smbios_type11
{
935 struct smbios_header header
;
940 struct smbios_type15
{
941 struct smbios_header header
;
950 u8 log_type_descriptors
;
951 u8 log_type_descriptor_length
;
956 SMBIOS_EVENTLOG_ACCESS_METHOD_IO8
= 0,
957 SMBIOS_EVENTLOG_ACCESS_METHOD_IO8X2
,
958 SMBIOS_EVENTLOG_ACCESS_METHOD_IO16
,
959 SMBIOS_EVENTLOG_ACCESS_METHOD_MMIO32
,
960 SMBIOS_EVENTLOG_ACCESS_METHOD_GPNV
,
964 SMBIOS_EVENTLOG_STATUS_VALID
= 1, /* Bit 0 */
965 SMBIOS_EVENTLOG_STATUS_FULL
= 2, /* Bit 1 */
968 #define SMBIOS_USE_EXTENDED_MAX_CAPACITY (1ULL << 31)
970 struct smbios_type16
{
971 struct smbios_header header
;
974 u8 memory_error_correction
;
975 u32 maximum_capacity
;
976 u16 memory_error_information_handle
;
977 u16 number_of_memory_devices
;
978 u64 extended_maximum_capacity
;
982 struct smbios_type17
{
983 struct smbios_header header
;
984 u16 phys_memory_array_handle
;
985 u16 memory_error_information_handle
;
1003 u16 minimum_voltage
;
1004 u16 maximum_voltage
;
1005 u16 configured_voltage
;
1009 struct smbios_type19
{
1010 struct smbios_header header
;
1011 u32 starting_address
;
1013 u16 memory_array_handle
;
1015 u64 extended_starting_address
;
1016 u64 extended_ending_address
;
1020 struct smbios_type20
{
1021 struct smbios_header header
;
1024 u16 memory_device_handle
;
1025 u16 memory_array_mapped_address_handle
;
1026 u8 partition_row_pos
;
1028 u8 interleave_depth
;
1034 /* Bit[7..5] = Temp status */
1035 enum smbios_temp_status
{
1036 SMBIOS_TEMP_STATUS_OTHER
= 0x01,
1037 SMBIOS_TEMP_STATUS_UNKNOWN
,
1038 SMBIOS_TEMP_STATUS_OK
,
1039 SMBIOS_TEMP_STATUS_NONCRITICAL
,
1040 SMBIOS_TEMP_STATUS_CRITICAL
,
1041 SMBIOS_TEMP_STATUS_NONREC
, // Non-Recoverable.
1044 /* Bit[4..0] = Temp location */
1045 enum smbios_temp_location
{
1046 SMBIOS_TEMP_LOCATION_OTHER
= 0x01,
1047 SMBIOS_TEMP_LOCATION_UNKNOWN
,
1048 SMBIOS_TEMP_LOCATION_PROCESSOR
,
1049 SMBIOS_TEMP_LOCATION_DISK
,
1050 SMBIOS_TEMP_LOCATION_BAY
, // Peripheral Bay.
1051 SMBIOS_TEMP_LOCATION_SMM
, // System Management Module.
1052 SMBIOS_TEMP_LOCATION_BOARD
, // Motherboard.
1053 SMBIOS_TEMP_LOCATION_MM
, // Memory.
1054 SMBIOS_TEMP_LOCATION_PM
, // Processor Module.
1055 SMBIOS_TEMP_LOCATION_POW
, // Power Unit.
1056 SMBIOS_TEMP_LOCATION_ADDCARD
,
1059 struct smbios_type28
{
1060 struct smbios_header header
;
1062 u8 location_and_status
;
1074 struct smbios_type32
{
1075 struct smbios_header header
;
1081 struct smbios_type38
{
1082 struct smbios_header header
;
1088 u8 base_address_modifier
;
1093 enum smbios_bmc_interface_type
{
1094 SMBIOS_BMC_INTERFACE_UNKNOWN
= 0,
1095 SMBIOS_BMC_INTERFACE_KCS
,
1096 SMBIOS_BMC_INTERFACE_SMIC
,
1097 SMBIOS_BMC_INTERFACE_BLOCK
,
1098 SMBIOS_BMC_INTERFACE_SMBUS
,
1102 PowerSupplyTypeOther
= 1,
1103 PowerSupplyTypeUnknown
= 2,
1104 PowerSupplyTypeLinear
= 3,
1105 PowerSupplyTypeSwitching
= 4,
1106 PowerSupplyTypeBattery
= 5,
1107 PowerSupplyTypeUps
= 6,
1108 PowerSupplyTypeConverter
= 7,
1109 PowerSupplyTypeRegulator
= 8
1110 } power_supply_type
;
1113 PowerSupplyStatusOther
= 1,
1114 PowerSupplyStatusUnknown
= 2,
1115 PowerSupplyStatusOk
= 3,
1116 PowerSupplyStatusNonCritical
= 4,
1117 PowerSupplyStatusCritical
= 5
1118 } power_supply_status
;
1121 PowerSupplyInputVoltageRangeSwitchingOther
= 1,
1122 PowerSupplyInputVoltageRangeSwitchingUnknown
= 2,
1123 PowerSupplyInputVoltageRangeSwitchingManual
= 3,
1124 PowerSupplyInputVoltageRangeSwitchingAutoSwitch
= 4,
1125 PowerSupplyInputVoltageRangeSwitchingWideRange
= 5,
1126 PowerSupplyInputVoltageRangeSwitchingNotApplicable
= 6
1127 } power_supply_input_voltage_range_switching
;
1129 struct power_supply_ch
{
1131 u16 power_supply_type
:4;
1132 u16 power_supply_status
:3;
1133 u16 input_voltage_range_switch
:4;
1134 u16 power_supply_unplugged
:1;
1135 u16 power_supply_present
:1;
1136 u16 power_supply_hot_replaceble
:1;
1139 struct smbios_type39
{
1140 struct smbios_header header
;
1141 u8 power_unit_group
;
1146 u8 asset_tag_number
;
1147 u8 model_part_number
;
1149 u16 max_power_capacity
;
1150 u16 power_supply_characteristics
;
1151 u16 input_voltage_probe_handle
;
1152 u16 cooling_device_handle
;
1153 u16 input_current_probe_handle
;
1157 int smbios_write_type39(unsigned long *current
, int *handle
,
1158 u8 unit_group
, const char *loc
, const char *dev_name
,
1159 const char *man
, const char *serial_num
,
1160 const char *tag_num
, const char *part_num
,
1161 const char *rev_lvl
, u16 max_pow_cap
,
1162 const struct power_supply_ch
*ps_ch
);
1165 SMBIOS_DEVICE_TYPE_OTHER
= 0x01,
1166 SMBIOS_DEVICE_TYPE_UNKNOWN
,
1167 SMBIOS_DEVICE_TYPE_VIDEO
,
1168 SMBIOS_DEVICE_TYPE_SCSI
,
1169 SMBIOS_DEVICE_TYPE_ETHERNET
,
1170 SMBIOS_DEVICE_TYPE_TOKEN_RING
,
1171 SMBIOS_DEVICE_TYPE_SOUND
,
1172 SMBIOS_DEVICE_TYPE_PATA
,
1173 SMBIOS_DEVICE_TYPE_SATA
,
1174 SMBIOS_DEVICE_TYPE_SAS
,
1175 SMBIOS_DEVICE_TYPE_WIRELESS_LAN
,
1176 SMBIOS_DEVICE_TYPE_BLUETOOTH
,
1177 SMBIOS_DEVICE_TYPE_WWAN
,
1178 SMBIOS_DEVICE_TYPE_EMMC
,
1179 SMBIOS_DEVICE_TYPE_NVME
,
1180 SMBIOS_DEVICE_TYPE_UFS
,
1181 } smbios_onboard_device_type
;
1183 #define SMBIOS_DEVICE_TYPE_COUNT 10
1185 struct smbios_type41
{
1186 struct smbios_header header
;
1187 u8 reference_designation
;
1189 u8 device_status
: 1;
1190 u8 device_type_instance
;
1191 u16 segment_group_number
;
1193 u8 function_number
: 3;
1194 u8 device_number
: 5;
1199 #define SMBIOS_TPM_DEVICE_CHARACTERISTICS_NOT_SUPPORTED (1ULL << 2)
1200 #define SMBIOS_TPM_DEVICE_FAMILY_CONFIGURABLE_VIA_FW_UPD (1ULL << 3)
1201 #define SMBIOS_TPM_DEVICE_FAMILY_CONFIGURABLE_VIA_PLATFORM_SW_SUPPORT (1ULL << 4)
1202 #define SMBIOS_TPM_DEVICE_FAMILY_CONFIGURABLE_VIA_OEM_PROPRIETARY (1ULL << 5)
1204 struct smbios_type43
{
1205 struct smbios_header header
;
1212 u64 characteristics
;
1217 struct smbios_type127
{
1218 struct smbios_header header
;
1222 /* Provided to help architecture code */
1223 int smbios_write_type7(unsigned long *current
,
1227 const enum smbios_cache_associativity associativity
,
1228 const enum smbios_cache_type type
,
1229 const size_t max_cache_size
,
1230 const size_t cache_size
);
1231 enum smbios_cache_associativity
smbios_cache_associativity(const u8 num
);
1233 /* Must be defined by architecture code */
1234 int smbios_write_type4(unsigned long *current
, int handle
);
1235 int smbios_write_type7_cache_parameters(unsigned long *current
,
1237 int *max_struct_size
,
1238 struct smbios_type4
*type4
);
1240 void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id
,
1241 struct smbios_type17
*t
);
1242 void smbios_fill_dimm_asset_tag(const struct dimm_info
*dimm
,
1243 struct smbios_type17
*t
);
1244 void smbios_fill_dimm_locator(const struct dimm_info
*dimm
,
1245 struct smbios_type17
*t
);
1247 smbios_wakeup_type
smbios_system_wakeup_type(void);
1248 smbios_board_type
smbios_mainboard_board_type(void);
1249 smbios_enclosure_type
smbios_mainboard_enclosure_type(void);