xref: /qemu/include/hw/firmware/smbios.h (revision a0628599)
1a2eb5c0cSPhilippe Mathieu-Daudé #ifndef QEMU_SMBIOS_H
2a2eb5c0cSPhilippe Mathieu-Daudé #define QEMU_SMBIOS_H
3a2eb5c0cSPhilippe Mathieu-Daudé 
4a2eb5c0cSPhilippe Mathieu-Daudé /*
5a2eb5c0cSPhilippe Mathieu-Daudé  * SMBIOS Support
6a2eb5c0cSPhilippe Mathieu-Daudé  *
7a2eb5c0cSPhilippe Mathieu-Daudé  * Copyright (C) 2009 Hewlett-Packard Development Company, L.P.
8a2eb5c0cSPhilippe Mathieu-Daudé  *
9a2eb5c0cSPhilippe Mathieu-Daudé  * Authors:
10a2eb5c0cSPhilippe Mathieu-Daudé  *  Alex Williamson <alex.williamson@hp.com>
11a2eb5c0cSPhilippe Mathieu-Daudé  *
12a2eb5c0cSPhilippe Mathieu-Daudé  * This work is licensed under the terms of the GNU GPL, version 2.  See
13a2eb5c0cSPhilippe Mathieu-Daudé  * the COPYING file in the top-level directory.
14a2eb5c0cSPhilippe Mathieu-Daudé  *
15a2eb5c0cSPhilippe Mathieu-Daudé  */
16a2eb5c0cSPhilippe Mathieu-Daudé 
17a2eb5c0cSPhilippe Mathieu-Daudé 
18a2eb5c0cSPhilippe Mathieu-Daudé #define SMBIOS_MAX_TYPE 127
19a2eb5c0cSPhilippe Mathieu-Daudé 
20a2eb5c0cSPhilippe Mathieu-Daudé /* memory area description, used by type 19 table */
21a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_phys_mem_area {
22a2eb5c0cSPhilippe Mathieu-Daudé     uint64_t address;
23a2eb5c0cSPhilippe Mathieu-Daudé     uint64_t length;
24a2eb5c0cSPhilippe Mathieu-Daudé };
25a2eb5c0cSPhilippe Mathieu-Daudé 
26a2eb5c0cSPhilippe Mathieu-Daudé /*
27a2eb5c0cSPhilippe Mathieu-Daudé  * SMBIOS spec defined tables
28a2eb5c0cSPhilippe Mathieu-Daudé  */
29a2eb5c0cSPhilippe Mathieu-Daudé typedef enum SmbiosEntryPointType {
30a2eb5c0cSPhilippe Mathieu-Daudé     SMBIOS_ENTRY_POINT_21,
31a2eb5c0cSPhilippe Mathieu-Daudé     SMBIOS_ENTRY_POINT_30,
32a2eb5c0cSPhilippe Mathieu-Daudé } SmbiosEntryPointType;
33a2eb5c0cSPhilippe Mathieu-Daudé 
34a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS Entry Point
35a2eb5c0cSPhilippe Mathieu-Daudé  * There are two types of entry points defined in the SMBIOS specification
36a2eb5c0cSPhilippe Mathieu-Daudé  * (see below). BIOS must place the entry point(s) at a 16-byte-aligned
37a2eb5c0cSPhilippe Mathieu-Daudé  * address between 0xf0000 and 0xfffff. Note that either entry point type
38a2eb5c0cSPhilippe Mathieu-Daudé  * can be used in a 64-bit target system, except that SMBIOS 2.1 entry point
39a2eb5c0cSPhilippe Mathieu-Daudé  * only allows the SMBIOS struct table to reside below 4GB address space.
40a2eb5c0cSPhilippe Mathieu-Daudé  */
41a2eb5c0cSPhilippe Mathieu-Daudé 
42a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS 2.1 (32-bit) Entry Point
43a2eb5c0cSPhilippe Mathieu-Daudé  *  - introduced since SMBIOS 2.1
44a2eb5c0cSPhilippe Mathieu-Daudé  *  - supports structure table below 4GB only
45a2eb5c0cSPhilippe Mathieu-Daudé  */
46a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_21_entry_point {
47a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t anchor_string[4];
48a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t checksum;
49a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t length;
50a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t smbios_major_version;
51a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t smbios_minor_version;
52a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t max_structure_size;
53a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t entry_point_revision;
54a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t formatted_area[5];
55a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t intermediate_anchor_string[5];
56a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t intermediate_checksum;
57a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t structure_table_length;
58a2eb5c0cSPhilippe Mathieu-Daudé     uint32_t structure_table_address;
59a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t number_of_structures;
60a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t smbios_bcd_revision;
61a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
62a2eb5c0cSPhilippe Mathieu-Daudé 
63a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS 3.0 (64-bit) Entry Point
64a2eb5c0cSPhilippe Mathieu-Daudé  *  - introduced since SMBIOS 3.0
65a2eb5c0cSPhilippe Mathieu-Daudé  *  - supports structure table at 64-bit address space
66a2eb5c0cSPhilippe Mathieu-Daudé  */
67a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_30_entry_point {
68a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t anchor_string[5];
69a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t checksum;
70a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t length;
71a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t smbios_major_version;
72a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t smbios_minor_version;
73a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t smbios_doc_rev;
74a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t entry_point_revision;
75a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t reserved;
76a2eb5c0cSPhilippe Mathieu-Daudé     uint32_t structure_table_max_size;
77a2eb5c0cSPhilippe Mathieu-Daudé     uint64_t structure_table_address;
78a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
79a2eb5c0cSPhilippe Mathieu-Daudé 
80a2eb5c0cSPhilippe Mathieu-Daudé typedef union {
81a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_21_entry_point ep21;
82a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_30_entry_point ep30;
83a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED SmbiosEntryPoint;
84a2eb5c0cSPhilippe Mathieu-Daudé 
85a2eb5c0cSPhilippe Mathieu-Daudé /* This goes at the beginning of every SMBIOS structure. */
86a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_structure_header {
87a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t type;
88a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t length;
89a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t handle;
90a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
91a2eb5c0cSPhilippe Mathieu-Daudé 
92a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS type 0 - BIOS Information */
93a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_type_0 {
94a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_structure_header header;
95a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t vendor_str;
96a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t bios_version_str;
97a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t bios_starting_address_segment;
98a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t bios_release_date_str;
99a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t bios_rom_size;
100a2eb5c0cSPhilippe Mathieu-Daudé     uint64_t bios_characteristics;
101a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t bios_characteristics_extension_bytes[2];
102a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t system_bios_major_release;
103a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t system_bios_minor_release;
104a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t embedded_controller_major_release;
105a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t embedded_controller_minor_release;
106a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
107a2eb5c0cSPhilippe Mathieu-Daudé 
108a2eb5c0cSPhilippe Mathieu-Daudé /* UUID encoding. The time_* fields are little-endian, as specified by SMBIOS
109a2eb5c0cSPhilippe Mathieu-Daudé  * version 2.6.
110a2eb5c0cSPhilippe Mathieu-Daudé  */
111a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_uuid {
112a2eb5c0cSPhilippe Mathieu-Daudé     uint32_t time_low;
113a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t time_mid;
114a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t time_hi_and_version;
115a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t clock_seq_hi_and_reserved;
116a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t clock_seq_low;
117a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t node[6];
118a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
119a2eb5c0cSPhilippe Mathieu-Daudé 
120a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS type 1 - System Information */
121a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_type_1 {
122a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_structure_header header;
123a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t manufacturer_str;
124a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t product_name_str;
125a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t version_str;
126a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t serial_number_str;
127a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_uuid uuid;
128a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t wake_up_type;
129a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t sku_number_str;
130a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t family_str;
131a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
132a2eb5c0cSPhilippe Mathieu-Daudé 
133a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS type 2 - Base Board */
134a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_type_2 {
135a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_structure_header header;
136a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t manufacturer_str;
137a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t product_str;
138a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t version_str;
139a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t serial_number_str;
140a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t asset_tag_number_str;
141a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t feature_flags;
142a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t location_str;
143a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t chassis_handle;
144a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t board_type;
145a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t contained_element_count;
146a2eb5c0cSPhilippe Mathieu-Daudé     /* contained elements follow */
147a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
148a2eb5c0cSPhilippe Mathieu-Daudé 
149a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS type 3 - System Enclosure (v2.7) */
150a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_type_3 {
151a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_structure_header header;
152a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t manufacturer_str;
153a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t type;
154a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t version_str;
155a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t serial_number_str;
156a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t asset_tag_number_str;
157a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t boot_up_state;
158a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t power_supply_state;
159a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t thermal_state;
160a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t security_status;
161a2eb5c0cSPhilippe Mathieu-Daudé     uint32_t oem_defined;
162a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t height;
163a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t number_of_power_cords;
164a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t contained_element_count;
165b81a5f94SDaniel P. Berrangé     uint8_t contained_element_record_length;
166a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t sku_number_str;
167a2eb5c0cSPhilippe Mathieu-Daudé     /* contained elements follow */
168a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
169a2eb5c0cSPhilippe Mathieu-Daudé 
170a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS type 4 - Processor Information (v2.6) */
171a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_type_4 {
172a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_structure_header header;
173a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t socket_designation_str;
174a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t processor_type;
175a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t processor_family;
176a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t processor_manufacturer_str;
177a2eb5c0cSPhilippe Mathieu-Daudé     uint32_t processor_id[2];
178a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t processor_version_str;
179a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t voltage;
180a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t external_clock;
181a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t max_speed;
182a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t current_speed;
183a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t status;
184a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t processor_upgrade;
185a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t l1_cache_handle;
186a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t l2_cache_handle;
187a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t l3_cache_handle;
188a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t serial_number_str;
189a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t asset_tag_number_str;
190a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t part_number_str;
191a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t core_count;
192a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t core_enabled;
193a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t thread_count;
194a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t processor_characteristics;
195a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t processor_family2;
196a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
197a2eb5c0cSPhilippe Mathieu-Daudé 
198a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS type 11 - OEM strings */
199a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_type_11 {
200a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_structure_header header;
201a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t count;
202a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
203a2eb5c0cSPhilippe Mathieu-Daudé 
204a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS type 16 - Physical Memory Array (v2.7) */
205a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_type_16 {
206a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_structure_header header;
207a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t location;
208a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t use;
209a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t error_correction;
210a2eb5c0cSPhilippe Mathieu-Daudé     uint32_t maximum_capacity;
211a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t memory_error_information_handle;
212a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t number_of_memory_devices;
213a2eb5c0cSPhilippe Mathieu-Daudé     uint64_t extended_maximum_capacity;
214a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
215a2eb5c0cSPhilippe Mathieu-Daudé 
216a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS type 17 - Memory Device (v2.8) */
217a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_type_17 {
218a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_structure_header header;
219a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t physical_memory_array_handle;
220a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t memory_error_information_handle;
221a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t total_width;
222a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t data_width;
223a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t size;
224a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t form_factor;
225a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t device_set;
226a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t device_locator_str;
227a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t bank_locator_str;
228a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t memory_type;
229a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t type_detail;
230a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t speed;
231a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t manufacturer_str;
232a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t serial_number_str;
233a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t asset_tag_number_str;
234a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t part_number_str;
235a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t attributes;
236a2eb5c0cSPhilippe Mathieu-Daudé     uint32_t extended_size;
237a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t configured_clock_speed;
238a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t minimum_voltage;
239a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t maximum_voltage;
240a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t configured_voltage;
241a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
242a2eb5c0cSPhilippe Mathieu-Daudé 
243a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS type 19 - Memory Array Mapped Address (v2.7) */
244a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_type_19 {
245a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_structure_header header;
246a2eb5c0cSPhilippe Mathieu-Daudé     uint32_t starting_address;
247a2eb5c0cSPhilippe Mathieu-Daudé     uint32_t ending_address;
248a2eb5c0cSPhilippe Mathieu-Daudé     uint16_t memory_array_handle;
249a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t partition_width;
250a2eb5c0cSPhilippe Mathieu-Daudé     uint64_t extended_starting_address;
251a2eb5c0cSPhilippe Mathieu-Daudé     uint64_t extended_ending_address;
252a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
253a2eb5c0cSPhilippe Mathieu-Daudé 
254a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS type 32 - System Boot Information */
255a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_type_32 {
256a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_structure_header header;
257a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t reserved[6];
258a2eb5c0cSPhilippe Mathieu-Daudé     uint8_t boot_status;
259a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
260a2eb5c0cSPhilippe Mathieu-Daudé 
261a2eb5c0cSPhilippe Mathieu-Daudé /* SMBIOS type 127 -- End-of-table */
262a2eb5c0cSPhilippe Mathieu-Daudé struct smbios_type_127 {
263a2eb5c0cSPhilippe Mathieu-Daudé     struct smbios_structure_header header;
264a2eb5c0cSPhilippe Mathieu-Daudé } QEMU_PACKED;
265a2eb5c0cSPhilippe Mathieu-Daudé 
266a2eb5c0cSPhilippe Mathieu-Daudé void smbios_entry_add(QemuOpts *opts, Error **errp);
267a2eb5c0cSPhilippe Mathieu-Daudé void smbios_set_cpuid(uint32_t version, uint32_t features);
268a2eb5c0cSPhilippe Mathieu-Daudé void smbios_set_defaults(const char *manufacturer, const char *product,
269a2eb5c0cSPhilippe Mathieu-Daudé                          const char *version, bool legacy_mode,
270a2eb5c0cSPhilippe Mathieu-Daudé                          bool uuid_encoded, SmbiosEntryPointType ep_type);
271*a0628599SLike Xu uint8_t *smbios_get_table_legacy(MachineState *ms, size_t *length);
272*a0628599SLike Xu void smbios_get_tables(MachineState *ms,
273*a0628599SLike Xu                        const struct smbios_phys_mem_area *mem_array,
274a2eb5c0cSPhilippe Mathieu-Daudé                        const unsigned int mem_array_size,
275a2eb5c0cSPhilippe Mathieu-Daudé                        uint8_t **tables, size_t *tables_len,
276a2eb5c0cSPhilippe Mathieu-Daudé                        uint8_t **anchor, size_t *anchor_len);
277a2eb5c0cSPhilippe Mathieu-Daudé #endif /* QEMU_SMBIOS_H */
278