6
* Copyright (C) 2009 Hewlett-Packard Development Company, L.P.
9
* Alex Williamson <alex.williamson@hp.com>
11
* This work is licensed under the terms of the GNU GPL, version 2. See
12
* the COPYING file in the top-level directory.
16
int smbios_entry_add(const char *t);
17
void smbios_add_field(int type, int offset, int len, void *data);
18
uint8_t *smbios_get_table(size_t *length);
21
* SMBIOS spec defined tables
24
/* This goes at the beginning of every SMBIOS structure. */
25
struct smbios_structure_header {
31
/* SMBIOS type 0 - BIOS Information */
32
struct smbios_type_0 {
33
struct smbios_structure_header header;
35
uint8_t bios_version_str;
36
uint16_t bios_starting_address_segment;
37
uint8_t bios_release_date_str;
38
uint8_t bios_rom_size;
39
uint8_t bios_characteristics[8];
40
uint8_t bios_characteristics_extension_bytes[2];
41
uint8_t system_bios_major_release;
42
uint8_t system_bios_minor_release;
43
uint8_t embedded_controller_major_release;
44
uint8_t embedded_controller_minor_release;
47
/* SMBIOS type 1 - System Information */
48
struct smbios_type_1 {
49
struct smbios_structure_header header;
50
uint8_t manufacturer_str;
51
uint8_t product_name_str;
53
uint8_t serial_number_str;
56
uint8_t sku_number_str;
60
/* SMBIOS type 3 - System Enclosure (v2.3) */
61
struct smbios_type_3 {
62
struct smbios_structure_header header;
63
uint8_t manufacturer_str;
66
uint8_t serial_number_str;
67
uint8_t asset_tag_number_str;
68
uint8_t boot_up_state;
69
uint8_t power_supply_state;
70
uint8_t thermal_state;
71
uint8_t security_status;
74
uint8_t number_of_power_cords;
75
uint8_t contained_element_count;
76
// contained elements follow
79
/* SMBIOS type 4 - Processor Information (v2.0) */
80
struct smbios_type_4 {
81
struct smbios_structure_header header;
82
uint8_t socket_designation_str;
83
uint8_t processor_type;
84
uint8_t processor_family;
85
uint8_t processor_manufacturer_str;
86
uint32_t processor_id[2];
87
uint8_t processor_version_str;
89
uint16_t external_clock;
91
uint16_t current_speed;
93
uint8_t processor_upgrade;
94
uint16_t l1_cache_handle;
95
uint16_t l2_cache_handle;
96
uint16_t l3_cache_handle;
99
/* SMBIOS type 16 - Physical Memory Array
100
* Associated with one type 17 (Memory Device).
102
struct smbios_type_16 {
103
struct smbios_structure_header header;
106
uint8_t error_correction;
107
uint32_t maximum_capacity;
108
uint16_t memory_error_information_handle;
109
uint16_t number_of_memory_devices;
111
/* SMBIOS type 17 - Memory Device
112
* Associated with one type 19
114
struct smbios_type_17 {
115
struct smbios_structure_header header;
116
uint16_t physical_memory_array_handle;
117
uint16_t memory_error_information_handle;
118
uint16_t total_width;
123
uint8_t device_locator_str;
124
uint8_t bank_locator_str;
126
uint16_t type_detail;
129
/* SMBIOS type 19 - Memory Array Mapped Address */
130
struct smbios_type_19 {
131
struct smbios_structure_header header;
132
uint32_t starting_address;
133
uint32_t ending_address;
134
uint16_t memory_array_handle;
135
uint8_t partition_width;
138
/* SMBIOS type 20 - Memory Device Mapped Address */
139
struct smbios_type_20 {
140
struct smbios_structure_header header;
141
uint32_t starting_address;
142
uint32_t ending_address;
143
uint16_t memory_device_handle;
144
uint16_t memory_array_mapped_address_handle;
145
uint8_t partition_row_position;
146
uint8_t interleave_position;
147
uint8_t interleaved_data_depth;
150
/* SMBIOS type 32 - System Boot Information */
151
struct smbios_type_32 {
152
struct smbios_structure_header header;
157
/* SMBIOS type 127 -- End-of-table */
158
struct smbios_type_127 {
159
struct smbios_structure_header header;
162
#endif /*QEMU_SMBIOS_H */