Timothy Pearson | 821217b | 2015-03-27 22:47:25 -0500 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2015 Timothy Pearson <tpearson@raptorengineeringinc.com>, Raptor Engineering |
| 5 | * Copyright (C) various authors, the coreboot project |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
Patrick Georgi | b890a12 | 2015-03-26 15:17:45 +0100 | [diff] [blame] | 18 | * Foundation, Inc. |
Timothy Pearson | 821217b | 2015-03-27 22:47:25 -0500 | [diff] [blame] | 19 | */ |
| 20 | |
Sven Schnelle | 164bcfd | 2011-08-14 20:56:34 +0200 | [diff] [blame] | 21 | #ifndef SMBIOS_H |
| 22 | #define SMBIOS_H |
| 23 | |
| 24 | #include <types.h> |
| 25 | |
| 26 | unsigned long smbios_write_tables(unsigned long start); |
| 27 | int smbios_add_string(char *start, const char *str); |
| 28 | int smbios_string_table_len(char *start); |
| 29 | |
Duncan Laurie | 21a7870 | 2013-05-23 14:17:05 -0700 | [diff] [blame] | 30 | /* Used by mainboard to add an on-board device */ |
| 31 | int smbios_write_type41(unsigned long *current, int *handle, |
| 32 | const char *name, u8 instance, u16 segment, |
| 33 | u8 bus, u8 device, u8 function); |
| 34 | |
Gerd Hoffmann | 0626274 | 2013-11-13 13:37:23 +0100 | [diff] [blame] | 35 | const char *smbios_mainboard_manufacturer(void); |
| 36 | const char *smbios_mainboard_product_name(void); |
Duncan Laurie | 21a7870 | 2013-05-23 14:17:05 -0700 | [diff] [blame] | 37 | |
Christian Gmeiner | ac3aa09 | 2012-07-25 13:42:40 +0200 | [diff] [blame] | 38 | const char *smbios_mainboard_serial_number(void); |
| 39 | const char *smbios_mainboard_version(void); |
Gerd Hoffmann | 0626274 | 2013-11-13 13:37:23 +0100 | [diff] [blame] | 40 | void smbios_mainboard_set_uuid(u8 *uuid); |
Vladimir Serbinenko | 63acd22 | 2014-06-01 00:26:48 +0200 | [diff] [blame] | 41 | const char *smbios_mainboard_bios_version(void); |
Vladimir Serbinenko | a71bdc3 | 2014-08-30 00:35:39 +0200 | [diff] [blame] | 42 | u8 smbios_mainboard_enclosure_type(void); |
Kane Chen | 51bdc47 | 2014-09-08 18:40:30 -0700 | [diff] [blame] | 43 | #ifdef CONFIG_MAINBOARD_FAMILY |
| 44 | const char *smbios_mainboard_family(void); |
| 45 | #endif |
Christian Gmeiner | ac3aa09 | 2012-07-25 13:42:40 +0200 | [diff] [blame] | 46 | |
Sven Schnelle | 164bcfd | 2011-08-14 20:56:34 +0200 | [diff] [blame] | 47 | #define BIOS_CHARACTERISTICS_PCI_SUPPORTED (1 << 7) |
| 48 | #define BIOS_CHARACTERISTICS_PC_CARD (1 << 8) |
| 49 | #define BIOS_CHARACTERISTICS_PNP (1 << 9) |
| 50 | #define BIOS_CHARACTERISTICS_APM (1 << 10) |
| 51 | #define BIOS_CHARACTERISTICS_UPGRADEABLE (1 << 11) |
| 52 | #define BIOS_CHARACTERISTICS_SHADOW (1 << 12) |
| 53 | #define BIOS_CHARACTERISTICS_BOOT_FROM_CD (1 << 15) |
| 54 | #define BIOS_CHARACTERISTICS_SELECTABLE_BOOT (1 << 16) |
| 55 | #define BIOS_CHARACTERISTICS_BIOS_SOCKETED (1 << 17) |
| 56 | |
| 57 | #define BIOS_EXT1_CHARACTERISTICS_ACPI (1 << 0) |
| 58 | #define BIOS_EXT2_CHARACTERISTICS_TARGET (1 << 2) |
| 59 | |
Timothy Pearson | 821217b | 2015-03-27 22:47:25 -0500 | [diff] [blame] | 60 | #define BIOS_MEMORY_ECC_SINGLE_BIT_CORRECTING (1 << 3) |
| 61 | #define BIOS_MEMORY_ECC_DOUBLE_BIT_CORRECTING (1 << 4) |
| 62 | #define BIOS_MEMORY_ECC_SCRUBBING (1 << 5) |
| 63 | |
| 64 | #define MEMORY_TYPE_DETAIL_OTHER (1 << 1) |
| 65 | #define MEMORY_TYPE_DETAIL_UNKNOWN (1 << 2) |
| 66 | #define MEMORY_TYPE_DETAIL_FAST_PAGED (1 << 3) |
| 67 | #define MEMORY_TYPE_DETAIL_STATIC_COLUMN (1 << 4) |
| 68 | #define MEMORY_TYPE_DETAIL_PSEUDO_STATIC (1 << 5) |
| 69 | #define MEMORY_TYPE_DETAIL_RAMBUS (1 << 6) |
| 70 | #define MEMORY_TYPE_DETAIL_SYNCHRONOUS (1 << 7) |
| 71 | #define MEMORY_TYPE_DETAIL_CMOS (1 << 8) |
| 72 | #define MEMORY_TYPE_DETAIL_EDO (1 << 9) |
| 73 | #define MEMORY_TYPE_DETAIL_WINDOW_DRAM (1 << 10) |
| 74 | #define MEMORY_TYPE_DETAIL_CACHE_DRAM (1 << 11) |
| 75 | #define MEMORY_TYPE_DETAIL_NON_VOLATILE (1 << 12) |
| 76 | #define MEMORY_TYPE_DETAIL_REGISTERED (1 << 13) |
| 77 | #define MEMORY_TYPE_DETAIL_UNBUFFERED (1 << 14) |
| 78 | |
Kane Chen | 33faac6 | 2014-07-27 12:54:44 -0700 | [diff] [blame] | 79 | typedef enum { |
| 80 | MEMORY_FORMFACTOR_OTHER = 0x01, |
| 81 | MEMORY_FORMFACTOR_UNKNOWN = 0x02, |
| 82 | MEMORY_FORMFACTOR_SIMM = 0x03, |
| 83 | MEMORY_FORMFACTOR_SIP = 0x04, |
| 84 | MEMORY_FORMFACTOR_CHIP = 0x05, |
| 85 | MEMORY_FORMFACTOR_DIP = 0x06, |
| 86 | MEMORY_FORMFACTOR_ZIP = 0x07, |
| 87 | MEMORY_FORMFACTOR_PROPRIETARY_CARD = 0x08, |
| 88 | MEMORY_FORMFACTOR_DIMM = 0x09, |
| 89 | MEMORY_FORMFACTOR_TSOP = 0x0a, |
| 90 | MEMORY_FORMFACTOR_ROC = 0x0b, |
| 91 | MEMORY_FORMFACTOR_RIMM = 0x0c, |
| 92 | MEMORY_FORMFACTOR_SODIMM = 0x0d, |
| 93 | MEMORY_FORMFACTOR_SRIMM = 0x0e, |
| 94 | MEMORY_FORMFACTOR_FBDIMM = 0x0f, |
| 95 | } smbios_memory_form_factor; |
| 96 | |
Timothy Pearson | 821217b | 2015-03-27 22:47:25 -0500 | [diff] [blame] | 97 | typedef enum { |
| 98 | MEMORY_TYPE_OTHER = 0x01, |
| 99 | MEMORY_TYPE_UNKNOWN = 0x02, |
| 100 | MEMORY_TYPE_DRAM = 0x03, |
| 101 | MEMORY_TYPE_EDRAM = 0x04, |
| 102 | MEMORY_TYPE_VRAM = 0x05, |
| 103 | MEMORY_TYPE_SRAM = 0x06, |
| 104 | MEMORY_TYPE_RAM = 0x07, |
| 105 | MEMORY_TYPE_ROM = 0x08, |
| 106 | MEMORY_TYPE_FLASH = 0x09, |
| 107 | MEMORY_TYPE_EEPROM = 0x0a, |
| 108 | MEMORY_TYPE_FEPROM = 0x0b, |
| 109 | MEMORY_TYPE_EPROM = 0x0c, |
| 110 | MEMORY_TYPE_CDRAM = 0x0d, |
| 111 | MEMORY_TYPE_3DRAM = 0x0e, |
| 112 | MEMORY_TYPE_SDRAM = 0x0f, |
| 113 | MEMORY_TYPE_SGRAM = 0x10, |
| 114 | MEMORY_TYPE_RDRAM = 0x11, |
| 115 | MEMORY_TYPE_DDR = 0x12, |
| 116 | MEMORY_TYPE_DDR2 = 0x13, |
| 117 | MEMORY_TYPE_DDR2_FBDIMM = 0x14, |
| 118 | MEMORY_TYPE_DDR3 = 0x18, |
| 119 | MEMORY_TYPE_FBD2 = 0x19, |
| 120 | } smbios_memory_type; |
| 121 | |
| 122 | typedef enum { |
| 123 | MEMORY_ARRAY_LOCATION_OTHER = 0x01, |
| 124 | MEMORY_ARRAY_LOCATION_UNKNOWN = 0x02, |
| 125 | MEMORY_ARRAY_LOCATION_SYSTEM_BOARD = 0x03, |
| 126 | MEMORY_ARRAY_LOCATION_ISA_ADD_ON = 0x04, |
| 127 | MEMORY_ARRAY_LOCATION_EISA_ADD_ON = 0x05, |
| 128 | MEMORY_ARRAY_LOCATION_PCI_ADD_ON = 0x06, |
| 129 | MEMORY_ARRAY_LOCATION_MCA_ADD_ON = 0x07, |
| 130 | MEMORY_ARRAY_LOCATION_PCMCIA_ADD_ON = 0x08, |
| 131 | MEMORY_ARRAY_LOCATION_PROPRIETARY_ADD_ON = 0x09, |
| 132 | MEMORY_ARRAY_LOCATION_NUBUS = 0x0a, |
| 133 | MEMORY_ARRAY_LOCATION_PC_98_C20_ADD_ON = 0xa0, |
| 134 | MEMORY_ARRAY_LOCATION_PC_98_C24_ADD_ON = 0xa1, |
| 135 | MEMORY_ARRAY_LOCATION_PC_98_E_ADD_ON = 0xa2, |
| 136 | MEMORY_ARRAY_LOCATION_PC_98_LOCAL_BUS_ADD_ON = 0xa3, |
| 137 | } smbios_memory_array_location; |
| 138 | |
| 139 | typedef enum { |
| 140 | MEMORY_ARRAY_USE_OTHER = 0x01, |
| 141 | MEMORY_ARRAY_USE_UNKNOWN = 0x02, |
| 142 | MEMORY_ARRAY_USE_SYSTEM = 0x03, |
| 143 | MEMORY_ARRAY_USE_VIDEO = 0x04, |
| 144 | MEMORY_ARRAY_USE_FLASH = 0x05, |
| 145 | MEMORY_ARRAY_USE_NVRAM = 0x06, |
| 146 | MEMORY_ARRAY_USE_CACHE = 0x07, |
| 147 | } smbios_memory_array_use; |
| 148 | |
| 149 | typedef enum { |
| 150 | MEMORY_ARRAY_ECC_OTHER = 0x01, |
| 151 | MEMORY_ARRAY_ECC_UNKNOWN = 0x02, |
| 152 | MEMORY_ARRAY_ECC_NONE = 0x03, |
| 153 | MEMORY_ARRAY_ECC_PARITY = 0x04, |
| 154 | MEMORY_ARRAY_ECC_SINGLE_BIT = 0x05, |
| 155 | MEMORY_ARRAY_ECC_MULTI_BIT = 0x06, |
| 156 | MEMORY_ARRAY_ECC_CRC = 0x07, |
| 157 | } smbios_memory_array_ecc; |
| 158 | |
Sven Schnelle | 164bcfd | 2011-08-14 20:56:34 +0200 | [diff] [blame] | 159 | #define SMBIOS_STATE_SAFE 3 |
| 160 | typedef enum { |
| 161 | SMBIOS_BIOS_INFORMATION=0, |
| 162 | SMBIOS_SYSTEM_INFORMATION=1, |
Vladimir Serbinenko | 47089f2 | 2014-03-02 19:14:44 +0100 | [diff] [blame] | 163 | SMBIOS_BOARD_INFORMATION=2, |
Sven Schnelle | 164bcfd | 2011-08-14 20:56:34 +0200 | [diff] [blame] | 164 | SMBIOS_SYSTEM_ENCLOSURE=3, |
| 165 | SMBIOS_PROCESSOR_INFORMATION=4, |
| 166 | SMBIOS_CACHE_INFORMATION=7, |
| 167 | SMBIOS_SYSTEM_SLOTS=9, |
Peter Stuge | c392b64 | 2013-07-06 19:51:12 +0200 | [diff] [blame] | 168 | SMBIOS_OEM_STRINGS=11, |
Duncan Laurie | 472ec9c | 2012-06-23 16:13:42 -0700 | [diff] [blame] | 169 | SMBIOS_EVENT_LOG=15, |
Sven Schnelle | 164bcfd | 2011-08-14 20:56:34 +0200 | [diff] [blame] | 170 | SMBIOS_PHYS_MEMORY_ARRAY=16, |
| 171 | SMBIOS_MEMORY_DEVICE=17, |
| 172 | SMBIOS_MEMORY_ARRAY_MAPPED_ADDRESS=19, |
| 173 | SMBIOS_SYSTEM_BOOT_INFORMATION=32, |
Stefan Reinauer | 3d7c677 | 2012-04-02 13:30:10 -0700 | [diff] [blame] | 174 | SMBIOS_ONBOARD_DEVICES_EXTENDED_INFORMATION=41, |
Sven Schnelle | 164bcfd | 2011-08-14 20:56:34 +0200 | [diff] [blame] | 175 | SMBIOS_END_OF_TABLE=127, |
| 176 | } smbios_struct_type_t; |
| 177 | |
| 178 | struct smbios_entry { |
| 179 | u8 anchor[4]; |
| 180 | u8 checksum; |
| 181 | u8 length; |
| 182 | u8 major_version; |
| 183 | u8 minor_version; |
| 184 | u16 max_struct_size; |
| 185 | u8 entry_point_rev; |
| 186 | u8 formwatted_area[5]; |
| 187 | u8 intermediate_anchor_string[5]; |
| 188 | u8 intermediate_checksum; |
| 189 | u16 struct_table_length; |
| 190 | u32 struct_table_address; |
| 191 | u16 struct_count; |
| 192 | u8 smbios_bcd_revision; |
| 193 | } __attribute__((packed)); |
| 194 | |
| 195 | struct smbios_type0 { |
| 196 | u8 type; |
| 197 | u8 length; |
| 198 | u16 handle; |
| 199 | u8 vendor; |
| 200 | u8 bios_version; |
| 201 | u16 bios_start_segment; |
| 202 | u8 bios_release_date; |
| 203 | u8 bios_rom_size; |
| 204 | u64 bios_characteristics; |
| 205 | u8 bios_characteristics_ext1; |
| 206 | u8 bios_characteristics_ext2; |
| 207 | u8 system_bios_major_release; |
| 208 | u8 system_bios_minor_release; |
| 209 | u8 ec_major_release; |
| 210 | u8 ec_minor_release; |
| 211 | char eos[2]; |
| 212 | } __attribute__((packed)); |
| 213 | |
| 214 | struct smbios_type1 { |
| 215 | u8 type; |
| 216 | u8 length; |
| 217 | u16 handle; |
| 218 | u8 manufacturer; |
| 219 | u8 product_name; |
| 220 | u8 version; |
| 221 | u8 serial_number; |
| 222 | u8 uuid[16]; |
| 223 | u8 wakeup_type; |
| 224 | u8 sku; |
| 225 | u8 family; |
| 226 | char eos[2]; |
| 227 | } __attribute__((packed)); |
| 228 | |
Vladimir Serbinenko | 47089f2 | 2014-03-02 19:14:44 +0100 | [diff] [blame] | 229 | struct smbios_type2 { |
| 230 | u8 type; |
| 231 | u8 length; |
| 232 | u16 handle; |
| 233 | u8 manufacturer; |
| 234 | u8 product_name; |
| 235 | u8 version; |
| 236 | u8 serial_number; |
| 237 | char eos[2]; |
| 238 | } __attribute__((packed)); |
| 239 | |
Vladimir Serbinenko | 71c0bf6 | 2014-08-27 23:23:14 +0200 | [diff] [blame] | 240 | enum |
| 241 | { |
| 242 | SMBIOS_ENCLOSURE_DESKTOP = 3, |
| 243 | SMBIOS_ENCLOSURE_NOTEBOOK = 9, |
| 244 | }; |
| 245 | |
Sven Schnelle | 164bcfd | 2011-08-14 20:56:34 +0200 | [diff] [blame] | 246 | struct smbios_type3 { |
| 247 | u8 type; |
| 248 | u8 length; |
| 249 | u16 handle; |
| 250 | u8 manufacturer; |
| 251 | u8 _type; |
| 252 | u8 version; |
| 253 | u8 serial_number; |
| 254 | u8 asset_tag_number; |
| 255 | u8 bootup_state; |
| 256 | u8 power_supply_state; |
| 257 | u8 thermal_state; |
| 258 | u8 security_status; |
| 259 | u32 oem_defined; |
| 260 | u8 height; |
| 261 | u8 number_of_power_cords; |
| 262 | u8 element_count; |
| 263 | u8 element_record_length; |
| 264 | char eos[2]; |
| 265 | } __attribute__((packed)); |
| 266 | |
| 267 | struct smbios_type4 { |
| 268 | u8 type; |
| 269 | u8 length; |
| 270 | u16 handle; |
| 271 | u8 socket_designation; |
| 272 | u8 processor_type; |
| 273 | u8 processor_family; |
| 274 | u8 processor_manufacturer; |
| 275 | u32 processor_id[2]; |
| 276 | u8 processor_version; |
| 277 | u8 voltage; |
| 278 | u16 external_clock; |
| 279 | u16 max_speed; |
| 280 | u16 current_speed; |
| 281 | u8 status; |
| 282 | u8 processor_upgrade; |
| 283 | u16 l1_cache_handle; |
| 284 | u16 l2_cache_handle; |
| 285 | u16 l3_cache_handle; |
| 286 | u8 serial_number; |
| 287 | u8 asset_tag; |
| 288 | u8 part_number; |
| 289 | u8 core_count; |
| 290 | u8 core_enabled; |
| 291 | u8 thread_count; |
| 292 | u16 processor_characteristics; |
| 293 | u16 processor_family2; |
| 294 | char eos[2]; |
| 295 | } __attribute__((packed)); |
| 296 | |
Peter Stuge | c392b64 | 2013-07-06 19:51:12 +0200 | [diff] [blame] | 297 | struct smbios_type11 { |
| 298 | u8 type; |
| 299 | u8 length; |
| 300 | u16 handle; |
| 301 | u8 count; |
| 302 | char eos[2]; |
| 303 | } __attribute__((packed)); |
| 304 | |
Duncan Laurie | 472ec9c | 2012-06-23 16:13:42 -0700 | [diff] [blame] | 305 | struct smbios_type15 { |
| 306 | u8 type; |
| 307 | u8 length; |
| 308 | u16 handle; |
| 309 | u16 area_length; |
| 310 | u16 header_offset; |
| 311 | u16 data_offset; |
| 312 | u8 access_method; |
| 313 | u8 log_status; |
| 314 | u32 change_token; |
| 315 | u32 address; |
| 316 | u8 header_format; |
| 317 | u8 log_type_descriptors; |
| 318 | u8 log_type_descriptor_length; |
| 319 | char eos[2]; |
| 320 | } __attribute__((packed)); |
| 321 | |
| 322 | enum { |
| 323 | SMBIOS_EVENTLOG_ACCESS_METHOD_IO8 = 0, |
| 324 | SMBIOS_EVENTLOG_ACCESS_METHOD_IO8X2, |
| 325 | SMBIOS_EVENTLOG_ACCESS_METHOD_IO16, |
| 326 | SMBIOS_EVENTLOG_ACCESS_METHOD_MMIO32, |
| 327 | SMBIOS_EVENTLOG_ACCESS_METHOD_GPNV, |
| 328 | }; |
| 329 | |
| 330 | enum { |
| 331 | SMBIOS_EVENTLOG_STATUS_VALID = 1, /* Bit 0 */ |
| 332 | SMBIOS_EVENTLOG_STATUS_FULL = 2, /* Bit 1 */ |
| 333 | }; |
| 334 | |
Sven Schnelle | 164bcfd | 2011-08-14 20:56:34 +0200 | [diff] [blame] | 335 | struct smbios_type16 { |
| 336 | u8 type; |
| 337 | u8 length; |
| 338 | u16 handle; |
| 339 | u8 location; |
| 340 | u8 use; |
| 341 | u8 memory_error_correction; |
| 342 | u32 maximum_capacity; |
| 343 | u16 memory_error_information_handle; |
| 344 | u16 number_of_memory_devices; |
| 345 | u64 extended_maximum_capacity; |
| 346 | char eos[2]; |
| 347 | } __attribute__((packed)); |
| 348 | |
| 349 | struct smbios_type17 { |
| 350 | u8 type; |
| 351 | u8 length; |
| 352 | u16 handle; |
| 353 | u16 phys_memory_array_handle; |
| 354 | u16 memory_error_information_handle; |
| 355 | u16 total_width; |
| 356 | u16 data_width; |
| 357 | u16 size; |
| 358 | u8 form_factor; |
| 359 | u8 device_set; |
| 360 | u8 device_locator; |
| 361 | u8 bank_locator; |
| 362 | u8 memory_type; |
| 363 | u16 type_detail; |
| 364 | u16 speed; |
| 365 | u8 manufacturer; |
| 366 | u8 serial_number; |
| 367 | u8 asset_tag; |
| 368 | u8 part_number; |
| 369 | u8 attributes; |
| 370 | u16 extended_size; |
| 371 | u16 clock_speed; |
| 372 | |
| 373 | char eos[2]; |
| 374 | } __attribute__((packed)); |
| 375 | |
| 376 | struct smbios_type32 { |
| 377 | u8 type; |
| 378 | u8 length; |
| 379 | u16 handle; |
| 380 | u8 reserved[6]; |
| 381 | u8 boot_status; |
| 382 | u8 eos[2]; |
| 383 | } __attribute__((packed)); |
| 384 | |
Sven Schnelle | 6d03876 | 2012-07-09 08:52:53 +0200 | [diff] [blame] | 385 | struct smbios_type38 { |
| 386 | u8 type; |
| 387 | u8 length; |
| 388 | u16 handle; |
| 389 | u8 interface_type; |
| 390 | u8 ipmi_rev; |
| 391 | u8 i2c_slave_addr; |
| 392 | u8 nv_storage_addr; |
| 393 | u64 base_address; |
| 394 | u8 base_address_modifier; |
| 395 | u8 irq; |
| 396 | } __attribute__((packed)); |
| 397 | |
Stefan Reinauer | 3d7c677 | 2012-04-02 13:30:10 -0700 | [diff] [blame] | 398 | typedef enum { |
| 399 | SMBIOS_DEVICE_TYPE_OTHER = 0x01, |
| 400 | SMBIOS_DEVICE_TYPE_UNKNOWN, |
| 401 | SMBIOS_DEVICE_TYPE_VIDEO, |
| 402 | SMBIOS_DEVICE_TYPE_SCSI, |
| 403 | SMBIOS_DEVICE_TYPE_ETHERNET, |
| 404 | SMBIOS_DEVICE_TYPE_TOKEN_RING, |
| 405 | SMBIOS_DEVICE_TYPE_SOUND, |
| 406 | SMBIOS_DEVICE_TYPE_PATA, |
| 407 | SMBIOS_DEVICE_TYPE_SATA, |
| 408 | SMBIOS_DEVICE_TYPE_SAS, |
| 409 | } smbios_onboard_device_type; |
| 410 | |
| 411 | struct smbios_type41 { |
| 412 | u8 type; |
| 413 | u8 length; |
| 414 | u16 handle; |
| 415 | u8 reference_designation; |
| 416 | u8 device_type: 7; |
| 417 | u8 device_status: 1; |
| 418 | u8 device_type_instance; |
| 419 | u16 segment_group_number; |
| 420 | u8 bus_number; |
| 421 | u8 function_number: 3; |
| 422 | u8 device_number: 5; |
| 423 | char eos[2]; |
| 424 | } __attribute__((packed)); |
| 425 | |
Sven Schnelle | 164bcfd | 2011-08-14 20:56:34 +0200 | [diff] [blame] | 426 | struct smbios_type127 { |
| 427 | u8 type; |
| 428 | u8 length; |
| 429 | u16 handle; |
| 430 | u8 eos[2]; |
| 431 | } __attribute__((packed)); |
| 432 | |
Timothy Pearson | 4785f2a | 2015-03-27 23:05:36 -0500 | [diff] [blame] | 433 | void smbios_fill_dimm_manufacturer_from_id(uint16_t mod_id, struct smbios_type17 *t); |
| 434 | |
Sven Schnelle | 164bcfd | 2011-08-14 20:56:34 +0200 | [diff] [blame] | 435 | #endif |