source: trunk/packages/xen-3.1/xen-3.1/tools/firmware/hvmloader/smbios_types.h @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 5.0 KB
Line 
1/*
2 * smbios_types.h - data structure definitions for Xen HVM SMBIOS support
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 * Copyright (C) IBM Corporation, 2006
19 *
20 * Authors: Andrew D. Ball <aball@us.ibm.com>
21 *
22 * See the SMBIOS 2.4 spec for more detail:
23 *   http://www.dmtf.org/standards/smbios/
24 */
25
26#ifndef SMBIOS_TYPES_H
27#define SMBIOS_TYPES_H
28
29#include <stdint.h>
30
31/* SMBIOS entry point -- must be written to a 16-bit aligned address
32   between 0xf0000 and 0xfffff.
33 */
34struct smbios_entry_point {
35        char anchor_string[4];
36        uint8_t checksum;
37        uint8_t length;
38        uint8_t smbios_major_version;
39        uint8_t smbios_minor_version;
40        uint16_t max_structure_size;
41        uint8_t entry_point_revision;
42        uint8_t formatted_area[5];
43        char intermediate_anchor_string[5];
44        uint8_t intermediate_checksum;
45        uint16_t structure_table_length;
46        uint32_t structure_table_address;
47        uint16_t number_of_structures;
48        uint8_t smbios_bcd_revision;
49} __attribute__ ((packed));
50
51/* This goes at the beginning of every SMBIOS structure. */
52struct smbios_structure_header {
53        uint8_t type;
54        uint8_t length;
55        uint16_t handle;
56} __attribute__ ((packed));
57
58/* SMBIOS type 0 - BIOS Information */
59struct smbios_type_0 {
60        struct smbios_structure_header header;
61        uint8_t vendor_str;
62        uint8_t version_str;
63        uint16_t starting_address_segment;
64        uint8_t release_date_str;
65        uint8_t rom_size; 
66        uint8_t characteristics[8];
67        uint8_t characteristics_extension_bytes[2];
68        uint8_t major_release;
69        uint8_t minor_release;
70        uint8_t embedded_controller_major;
71        uint8_t embedded_controller_minor;
72} __attribute__ ((packed));
73
74/* SMBIOS type 1 - System Information */
75struct smbios_type_1 {
76        struct smbios_structure_header header;
77        uint8_t manufacturer_str;
78        uint8_t product_name_str;
79        uint8_t version_str;
80        uint8_t serial_number_str;
81        uint8_t uuid[16];
82        uint8_t wake_up_type;
83        uint8_t sku_str;
84        uint8_t family_str;
85} __attribute__ ((packed));
86
87/* SMBIOS type 3 - System Enclosure */
88struct smbios_type_3 {
89        struct smbios_structure_header header;
90        uint8_t manufacturer_str;
91        uint8_t type;
92        uint8_t version_str;
93        uint8_t serial_number_str;
94        uint8_t asset_tag_str;
95        uint8_t boot_up_state;
96        uint8_t power_supply_state;
97        uint8_t thermal_state;
98        uint8_t security_status;
99} __attribute__ ((packed));
100
101/* SMBIOS type 4 - Processor Information */
102struct smbios_type_4 {
103        struct smbios_structure_header header;
104        uint8_t socket_designation_str;
105        uint8_t processor_type;
106        uint8_t processor_family;
107        uint8_t manufacturer_str;
108        uint32_t cpuid[2];
109        uint8_t version_str;
110        uint8_t voltage;
111        uint16_t external_clock;
112        uint16_t max_speed;
113        uint16_t current_speed;
114        uint8_t status;
115        uint8_t upgrade;
116} __attribute__ ((packed));
117
118/* SMBIOS type 16 - Physical Memory Array
119 *   Associated with one type 17 (Memory Device).
120 */
121struct smbios_type_16 {
122        struct smbios_structure_header header;
123        uint8_t location;
124        uint8_t use;
125        uint8_t error_correction;
126        uint32_t maximum_capacity;
127        uint16_t memory_error_information_handle;
128        uint16_t number_of_memory_devices;
129} __attribute__ ((packed));
130
131/* SMBIOS type 17 - Memory Device
132 *   Associated with one type 19
133 */
134struct smbios_type_17 {
135        struct smbios_structure_header header;
136        uint16_t physical_memory_array_handle;
137        uint16_t memory_error_information_handle;
138        uint16_t total_width;
139        uint16_t data_width;
140        uint16_t size;
141        uint8_t form_factor;
142        uint8_t device_set;
143        uint8_t device_locator_str;
144        uint8_t bank_locator_str;
145        uint8_t memory_type;
146        uint16_t type_detail;
147} __attribute__ ((packed));
148
149/* SMBIOS type 19 - Memory Array Mapped Address */
150struct smbios_type_19 {
151        struct smbios_structure_header header;
152        uint32_t starting_address;
153        uint32_t ending_address;
154        uint16_t memory_array_handle;
155        uint8_t partition_width;
156} __attribute__ ((packed));
157
158/* SMBIOS type 20 - Memory Device Mapped Address */
159struct smbios_type_20 {
160        struct smbios_structure_header header;
161        uint32_t starting_address;
162        uint32_t ending_address;
163        uint16_t memory_device_handle;
164        uint16_t memory_array_mapped_address_handle;
165        uint8_t partition_row_position;
166        uint8_t interleave_position;
167        uint8_t interleaved_data_depth;
168} __attribute__ ((packed));
169
170/* SMBIOS type 32 - System Boot Information */
171struct smbios_type_32 {
172        struct smbios_structure_header header;
173        uint8_t reserved[6];
174        uint8_t boot_status;
175} __attribute__ ((packed));
176
177/* SMBIOS type 127 -- End-of-table */
178struct smbios_type_127 {
179        struct smbios_structure_header header;
180} __attribute__ ((packed));
181
182#endif /* SMBIOS_TYPES_H */
Note: See TracBrowser for help on using the repository browser.