4 #include "types.h" // u32
6 #define SMBIOS_SIGNATURE 0x5f4d535f // "_SM_"
8 /* SMBIOS entry point -- must be written to a 16-bit aligned address
9 between 0xf0000 and 0xfffff.
11 struct smbios_entry_point {
15 u8 smbios_major_version;
16 u8 smbios_minor_version;
17 u16 max_structure_size;
18 u8 entry_point_revision;
20 char intermediate_anchor_string[5];
21 u8 intermediate_checksum;
22 u16 structure_table_length;
23 u32 structure_table_address;
24 u16 number_of_structures;
25 u8 smbios_bcd_revision;
28 /* This goes at the beginning of every SMBIOS structure. */
29 struct smbios_structure_header {
35 /* SMBIOS type 0 - BIOS Information */
36 struct smbios_type_0 {
37 struct smbios_structure_header header;
40 u16 bios_starting_address_segment;
41 u8 bios_release_date_str;
43 u8 bios_characteristics[8];
44 u8 bios_characteristics_extension_bytes[2];
45 u8 system_bios_major_release;
46 u8 system_bios_minor_release;
47 u8 embedded_controller_major_release;
48 u8 embedded_controller_minor_release;
51 /* SMBIOS type 1 - System Information */
52 struct smbios_type_1 {
53 struct smbios_structure_header header;
64 /* SMBIOS type 3 - System Enclosure (v2.3) */
65 struct smbios_type_3 {
66 struct smbios_structure_header header;
71 u8 asset_tag_number_str;
73 u8 power_supply_state;
78 u8 number_of_power_cords;
79 u8 contained_element_count;
80 // contained elements follow
83 /* SMBIOS type 4 - Processor Information (v2.0) */
84 struct smbios_type_4 {
85 struct smbios_structure_header header;
86 u8 socket_designation_str;
89 u8 processor_manufacturer_str;
91 u8 processor_version_str;
103 /* SMBIOS type 16 - Physical Memory Array
104 * Associated with one type 17 (Memory Device).
106 struct smbios_type_16 {
107 struct smbios_structure_header header;
111 u32 maximum_capacity;
112 u16 memory_error_information_handle;
113 u16 number_of_memory_devices;
116 /* SMBIOS type 17 - Memory Device
117 * Associated with one type 19
119 struct smbios_type_17 {
120 struct smbios_structure_header header;
121 u16 physical_memory_array_handle;
122 u16 memory_error_information_handle;
128 u8 device_locator_str;
134 /* SMBIOS type 19 - Memory Array Mapped Address */
135 struct smbios_type_19 {
136 struct smbios_structure_header header;
137 u32 starting_address;
139 u16 memory_array_handle;
143 /* SMBIOS type 20 - Memory Device Mapped Address */
144 struct smbios_type_20 {
145 struct smbios_structure_header header;
146 u32 starting_address;
148 u16 memory_device_handle;
149 u16 memory_array_mapped_address_handle;
150 u8 partition_row_position;
151 u8 interleave_position;
152 u8 interleaved_data_depth;
155 /* SMBIOS type 32 - System Boot Information */
156 struct smbios_type_32 {
157 struct smbios_structure_header header;
162 /* SMBIOS type 127 -- End-of-table */
163 struct smbios_type_127 {
164 struct smbios_structure_header header;