xref: /reactos/sdk/lib/dmilib/dmi.h (revision c3568045)
1 /*
2  * PROJECT:     ReactOS DMI/SMBIOS Library
3  * LICENSE:     GPL - See COPYING in the top level directory
4  * FILE:        dmi.h
5  * PURPOSE:     SMBIOS table parsing functions
6  * PROGRAMMERS: Timo Kreuzer (timo.kreuzer@reactos.org)
7  */
8 
9 #pragma once
10 
11 enum DMI_DEVICE_TYPE
12 {
13     DMI_DEV_TYPE_ANY = 0,
14     DMI_DEV_TYPE_OTHER,
15     DMI_DEV_TYPE_UNKNOWN,
16     DMI_DEV_TYPE_VIDEO,
17     DMI_DEV_TYPE_SCSI,
18     DMI_DEV_TYPE_ETHERNET,
19     DMI_DEV_TYPE_TOKENRING,
20     DMI_DEV_TYPE_SOUND,
21     DMI_DEV_TYPE_PATA,
22     DMI_DEV_TYPE_SATA,
23     DMI_DEV_TYPE_SAS,
24     DMI_DEV_TYPE_IPMI = -1,
25     DMI_DEV_TYPE_OEM_STRING = -2,
26     DMI_DEV_TYPE_DEV_ONBOARD = -3,
27 };
28 
29 enum DMI_ENTRY_TYPE
30 {
31     DMI_ENTRY_BIOS = 0,
32     DMI_ENTRY_SYSTEM = 1,
33     DMI_ENTRY_BASEBOARD = 2,
34     DMI_ENTRY_CHASSIS = 3,
35     DMI_ENTRY_PROCESSOR = 4,
36     DMI_ENTRY_MEM_CONTROLLER = 5,
37     DMI_ENTRY_MEM_MODULE = 6,
38     DMI_ENTRY_CACHE = 7,
39     DMI_ENTRY_PORT_CONNECTOR = 8,
40     DMI_ENTRY_SYSTEM_SLOT = 9,
41     DMI_ENTRY_ONBOARD_DEVICE = 10,
42     DMI_ENTRY_OEMSTRINGS = 11,
43     DMI_ENTRY_SYSCONF = 12,
44     DMI_ENTRY_BIOS_LANG = 13,
45     DMI_ENTRY_GROUP_ASSOC = 14,
46     DMI_ENTRY_SYSTEM_EVENT_LOG = 15,
47     DMI_ENTRY_PHYS_MEM_ARRAY = 16,
48     DMI_ENTRY_MEM_DEVICE = 17,
49     DMI_ENTRY_32_MEM_ERROR = 18,
50     DMI_ENTRY_MEM_ARRAY_MAPPED_ADDR = 19,
51     DMI_ENTRY_MEM_DEV_MAPPED_ADDR = 20,
52     DMI_ENTRY_BUILTIN_POINTING_DEV,
53     DMI_ENTRY_PORTABLE_BATTERY,
54     DMI_ENTRY_SYSTEM_RESET,
55     DMI_ENTRY_HW_SECURITY,
56     DMI_ENTRY_SYSTEM_POWER_CONTROLS = 25,
57     DMI_ENTRY_VOLTAGE_PROBE,
58     DMI_ENTRY_COOLING_DEV,
59     DMI_ENTRY_TEMP_PROBE,
60     DMI_ENTRY_ELECTRICAL_CURRENT_PROBE,
61     DMI_ENTRY_OOB_REMOTE_ACCESS = 30,
62     DMI_ENTRY_BIS_ENTRY,
63     DMI_ENTRY_SYSTEM_BOOT = 32,
64     DMI_ENTRY_MGMT_DEV,
65     DMI_ENTRY_MGMT_DEV_COMPONENT,
66     DMI_ENTRY_MGMT_DEV_THRES = 35,
67     DMI_ENTRY_MEM_CHANNEL = 36,
68     DMI_ENTRY_IPMI_DEV = 37,
69     DMI_ENTRY_SYS_POWER_SUPPLY = 38,
70     DMI_ENTRY_ADDITIONAL = 39,
71     DMI_ENTRY_ONBOARD_DEV_EXT = 40,
72     DMI_ENTRY_MGMT_CONTROLLER_HOST = 41,
73     DMI_ENTRY_INACTIVE = 126,
74     DMI_ENTRY_END_OF_TABLE = 127,
75 };
76 
77 enum _DMI_FIELD_OFFSETS
78 {
79     /* Type = 0: DMI_ENTRY_BIOS */
80     DMI_BIOS_VENDOR = 0x04,
81     DMI_BIOS_VERSION = 0x05,
82     DMI_BIOS_DATE = 0x08,
83     DMI_BIOS_SIZE = 0x14,
84 
85     /* Type = 1: DMI_ENTRY_SYSTEM */
86     DMI_SYS_VENDOR = 0x04,
87     DMI_SYS_PRODUCT = 0x05,
88     DMI_SYS_VERSION = 0x06,
89     DMI_SYS_SERIAL = 0x07,
90     DMI_SYS_SKU = 0x19,
91     DMI_SYS_FAMILY = 0x1a,
92     DMI_SYS_SIZE = 0x1b,
93 
94     /* Type = 2: DMI_ENTRY_BASEBOARD */
95     DMI_BOARD_VENDOR = 0x04,
96     DMI_BOARD_NAME = 0x05,
97     DMI_BOARD_VERSION = 0x06,
98     DMI_BOARD_SERIAL = 0x07,
99     DMI_BOARD_ASSET_TAG = 0x08,
100     DMI_BOARD_SIZE = 0x10,
101 
102 
103 };
104 
105 typedef struct _DMI_HEADER
106 {
107  	UCHAR Type;
108  	UCHAR Length;
109  	USHORT Handle;
110 } DMI_HEADER, *PDMI_HEADER;
111 
112