Subversion Repositories HelenOS

Rev

Rev 2726 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2726 Rev 2782
1
#ifndef _LIB_SMBIOS_H
1
#ifndef _LIB_SMBIOS_H
2
#define _LIB_SMBIOS_H
2
#define _LIB_SMBIOS_H
3
/*++
3
/*++
4
 
4
 
5
Copyright (c) 2000  Intel Corporation
5
Copyright (c) 2000  Intel Corporation
6
 
6
 
7
Module Name:
7
Module Name:
8
 
8
 
9
    LibSmbios.h
9
    LibSmbios.h
10
   
10
   
11
Abstract:
11
Abstract:
12
 
12
 
13
    Lib include  for SMBIOS services. Used to get system serial number and GUID
13
    Lib include  for SMBIOS services. Used to get system serial number and GUID
14
 
14
 
15
Revision History
15
Revision History
16
 
16
 
17
--*/
17
--*/
18
 
18
 
19
//
19
//
20
// Define SMBIOS tables.
20
// Define SMBIOS tables.
21
//
21
//
22
#pragma pack(1)
22
#pragma pack(1)
23
typedef struct {
23
typedef struct {
24
    UINT8   AnchorString[4];
24
    UINT8   AnchorString[4];
25
    UINT8   EntryPointStructureChecksum;
25
    UINT8   EntryPointStructureChecksum;
26
    UINT8   EntryPointLength;
26
    UINT8   EntryPointLength;
27
    UINT8   MajorVersion;
27
    UINT8   MajorVersion;
28
    UINT8   MinorVersion;
28
    UINT8   MinorVersion;
29
    UINT16  MaxStructureSize;
29
    UINT16  MaxStructureSize;
30
    UINT8   EntryPointRevision;
30
    UINT8   EntryPointRevision;
31
    UINT8   FormattedArea[5];
31
    UINT8   FormattedArea[5];
32
    UINT8   IntermediateAnchorString[5];
32
    UINT8   IntermediateAnchorString[5];
33
    UINT8   IntermediateChecksum;
33
    UINT8   IntermediateChecksum;
34
    UINT16  TableLength;
34
    UINT16  TableLength;
35
    UINT32  TableAddress;
35
    UINT32  TableAddress;
36
    UINT16  NumberOfSmbiosStructures;
36
    UINT16  NumberOfSmbiosStructures;
37
    UINT8   SmbiosBcdRevision;
37
    UINT8   SmbiosBcdRevision;
38
} SMBIOS_STRUCTURE_TABLE;
38
} SMBIOS_STRUCTURE_TABLE;
39
 
39
 
40
//
40
//
41
// Please note that SMBIOS structures can be odd byte aligned since the
41
// Please note that SMBIOS structures can be odd byte aligned since the
42
//  unformated section of each record is a set of arbitrary size strings.
42
//  unformated section of each record is a set of arbitrary size strings.
43
//
43
//
44
 
44
 
45
typedef struct {
45
typedef struct {
46
    UINT8   Type;
46
    UINT8   Type;
47
    UINT8   Length;
47
    UINT8   Length;
48
    UINT8   Handle[2];
48
    UINT8   Handle[2];
49
} SMBIOS_HEADER;
49
} SMBIOS_HEADER;
50
 
50
 
51
typedef UINT8   SMBIOS_STRING;
51
typedef UINT8   SMBIOS_STRING;
52
 
52
 
53
typedef struct {
53
typedef struct {
54
    SMBIOS_HEADER   Hdr;
54
    SMBIOS_HEADER   Hdr;
55
    SMBIOS_STRING   Vendor;
55
    SMBIOS_STRING   Vendor;
56
    SMBIOS_STRING   BiosVersion;
56
    SMBIOS_STRING   BiosVersion;
57
    UINT8           BiosSegment[2];
57
    UINT8           BiosSegment[2];
58
    SMBIOS_STRING   BiosReleaseDate;
58
    SMBIOS_STRING   BiosReleaseDate;
59
    UINT8           BiosSize;
59
    UINT8           BiosSize;
60
    UINT8           BiosCharacteristics[8];
60
    UINT8           BiosCharacteristics[8];
61
} SMBIOS_TYPE0;
61
} SMBIOS_TYPE0;
62
 
62
 
63
typedef struct {
63
typedef struct {
64
    SMBIOS_HEADER   Hdr;
64
    SMBIOS_HEADER   Hdr;
65
    SMBIOS_STRING   Manufacturer;
65
    SMBIOS_STRING   Manufacturer;
66
    SMBIOS_STRING   ProductName;
66
    SMBIOS_STRING   ProductName;
67
    SMBIOS_STRING   Version;
67
    SMBIOS_STRING   Version;
68
    SMBIOS_STRING   SerialNumber;
68
    SMBIOS_STRING   SerialNumber;
69
 
69
 
70
    //
70
    //
71
    // always byte copy this data to prevent alignment faults!
71
    // always byte copy this data to prevent alignment faults!
72
    //
72
    //
73
    EFI_GUID        Uuid;
73
    EFI_GUID        Uuid;
74
   
74
   
75
    UINT8           WakeUpType;
75
    UINT8           WakeUpType;
76
} SMBIOS_TYPE1;
76
} SMBIOS_TYPE1;
77
 
77
 
78
typedef struct {
78
typedef struct {
79
    SMBIOS_HEADER   Hdr;
79
    SMBIOS_HEADER   Hdr;
80
    SMBIOS_STRING   Manufacturer;
80
    SMBIOS_STRING   Manufacturer;
81
    SMBIOS_STRING   ProductName;
81
    SMBIOS_STRING   ProductName;
82
    SMBIOS_STRING   Version;
82
    SMBIOS_STRING   Version;
83
    SMBIOS_STRING   SerialNumber;
83
    SMBIOS_STRING   SerialNumber;
84
} SMBIOS_TYPE2;
84
} SMBIOS_TYPE2;
85
 
85
 
86
typedef struct {
86
typedef struct {
87
    SMBIOS_HEADER   Hdr;
87
    SMBIOS_HEADER   Hdr;
88
    SMBIOS_STRING   Manufacturer;
88
    SMBIOS_STRING   Manufacturer;
89
    UINT8           Type;
89
    UINT8           Type;
90
    SMBIOS_STRING   Version;
90
    SMBIOS_STRING   Version;
91
    SMBIOS_STRING   SerialNumber;
91
    SMBIOS_STRING   SerialNumber;
92
    SMBIOS_STRING   AssetTag;
92
    SMBIOS_STRING   AssetTag;
93
    UINT8           BootupState;
93
    UINT8           BootupState;
94
    UINT8           PowerSupplyState;
94
    UINT8           PowerSupplyState;
95
    UINT8           ThermalState;
95
    UINT8           ThermalState;
96
    UINT8           SecurityStatus;
96
    UINT8           SecurityStatus;
97
    UINT8           OemDefined[4];
97
    UINT8           OemDefined[4];
98
} SMBIOS_TYPE3;
98
} SMBIOS_TYPE3;
99
 
99
 
100
typedef struct {
100
typedef struct {
101
    SMBIOS_HEADER   Hdr;
101
    SMBIOS_HEADER   Hdr;
102
    UINT8           Socket;
102
    UINT8           Socket;
103
    UINT8           ProcessorType;
103
    UINT8           ProcessorType;
104
    UINT8           ProcessorFamily;
104
    UINT8           ProcessorFamily;
105
    SMBIOS_STRING   ProcessorManufacture;
105
    SMBIOS_STRING   ProcessorManufacture;
106
    UINT8           ProcessorId[8];
106
    UINT8           ProcessorId[8];
107
    SMBIOS_STRING   ProcessorVersion;
107
    SMBIOS_STRING   ProcessorVersion;
108
    UINT8           Voltage;
108
    UINT8           Voltage;
109
    UINT8           ExternalClock[2];
109
    UINT8           ExternalClock[2];
110
    UINT8           MaxSpeed[2];
110
    UINT8           MaxSpeed[2];
111
    UINT8           CurrentSpeed[2];
111
    UINT8           CurrentSpeed[2];
112
    UINT8           Status;
112
    UINT8           Status;
113
    UINT8           ProcessorUpgrade;
113
    UINT8           ProcessorUpgrade;
114
    UINT8           L1CacheHandle[2];
114
    UINT8           L1CacheHandle[2];
115
    UINT8           L2CacheHandle[2];
115
    UINT8           L2CacheHandle[2];
116
    UINT8           L3CacheHandle[2];
116
    UINT8           L3CacheHandle[2];
117
} SMBIOS_TYPE4;
117
} SMBIOS_TYPE4;
118
 
118
 
119
typedef union {
119
typedef union {
120
    SMBIOS_HEADER   *Hdr;
120
    SMBIOS_HEADER   *Hdr;
121
    SMBIOS_TYPE0    *Type0;
121
    SMBIOS_TYPE0    *Type0;
122
    SMBIOS_TYPE1    *Type1;
122
    SMBIOS_TYPE1    *Type1;
123
    SMBIOS_TYPE2    *Type2;
123
    SMBIOS_TYPE2    *Type2;
124
    SMBIOS_TYPE3    *Type3;
124
    SMBIOS_TYPE3    *Type3;
125
    SMBIOS_TYPE4    *Type4;
125
    SMBIOS_TYPE4    *Type4;
126
    UINT8           *Raw;
126
    UINT8           *Raw;
127
} SMBIOS_STRUCTURE_POINTER;
127
} SMBIOS_STRUCTURE_POINTER;
128
#pragma pack()
128
#pragma pack()
129
 
129
 
130
 
130
 
131
#endif
131
#endif
132
 
132
 
133
 
133