SMBIOS Library
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
libraries
common
TokenLowLevel.h
Go to the documentation of this file.
1
// vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:
2
/*
3
* Copyright (C) 2005 Dell Inc.
4
* by Michael Brown <Michael_E_Brown@dell.com>
5
* Licensed under the Open Software License version 2.1
6
*
7
* Alternatively, you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published
9
* by the Free Software Foundation; either version 2 of the License,
10
* or (at your option) any later version.
11
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
* See the GNU General Public License for more details.
16
*/
17
18
19
#ifndef CMOSTOKENLOWLEVEL_H
20
#define CMOSTOKENLOWLEVEL_H
21
22
// compat header should always be first header
23
#include "
smbios/compat.h
"
24
25
#include "
smbios/types.h
"
26
27
// abi_prefix should be last header included before declarations
28
#include "
smbios/config/abi_prefix.hpp
"
29
30
namespace
smbios
31
{
32
#if defined(_MSC_VER)
33
#pragma pack(push,1)
34
#endif
35
enum
// Smbios Structure types
36
{
37
DellIndexedIoTokenType
= 0xD4,
38
DellProtectedAreaType1
= 0xD5,
39
DellProtectedAreaType2
= 0xD6,
40
DellCallingInterface
= 0xDA,
41
};
42
43
enum
// Token types
44
{
45
TokenTypeEOT
= 0xffff,
46
};
47
48
struct
indexed_io_token
49
{
50
u16
tokenId
;
51
u8
location
;
52
u8
andMask
;
53
union
{
54
u8
orValue
;
55
u8
stringLength
;
56
};
57
}
58
LIBSMBIOS_PACKED_ATTR
;
59
60
struct
indexed_io_access_structure
61
{
/* 0xD4 structure */
62
u8
type
;
63
u8
length
;
64
u16
handle
;
65
u16
indexPort
;
66
u16
dataPort
;
67
u8
checkType
;
68
u8
checkedRangeStartIndex
;
69
u8
checkedRangeEndIndex
;
70
u8
checkValueIndex
;
71
//variable number of tokens present, but at least one.
72
struct
indexed_io_token
first_token
;
73
}
74
LIBSMBIOS_PACKED_ATTR
;
75
76
77
struct
dell_protected_value_1_structure
78
{
/* 0xD5 structure */
79
u8
type
;
80
u8
length
;
81
u16
handle
;
82
u16
tokenId
;
83
u8
valueLen
;
84
u8
valueFormat
;
85
u16
validationKey
;
86
u16
indexPort
;
87
u16
dataPort
;
88
u8
checkType
;
89
u8
valueStartIndex
;
90
u8
checkIndex
;
91
}
92
LIBSMBIOS_PACKED_ATTR
;
93
94
struct
dell_protected_value_2_structure
95
{
/* 0xD6 structure */
96
u8
type
;
97
u8
length
;
98
u16
handle
;
99
u16
tokenId
;
100
u8
valueLen
;
101
u8
valueFormat
;
102
u16
validationKey
;
103
u16
indexPort
;
104
u16
dataPort
;
105
u8
checkType
;
106
u8
valueStartIndex
;
107
u8
checkIndex
;
108
u8
rangeCheckType
;
109
u8
rangeCheckStart
;
110
u8
rangeCheckEnd
;
111
u8
rangeCheckIndex
;
112
}
113
LIBSMBIOS_PACKED_ATTR
;
114
115
struct
calling_interface_token
116
{
117
u16
tokenId
;
118
u16
location
;
// 0 for string tokens
119
union
{
120
u16
value
;
121
u16
stringLength
;
122
};
123
}
124
LIBSMBIOS_PACKED_ATTR
;
125
126
struct
calling_interface_structure
127
{
/* 0xDA structure */
128
u8
type
;
129
u8
length
;
130
u16
handle
;
131
132
u16
cmdIOAddress
;
133
u8
cmdIOCode
;
134
u32
supportedCmds
;
135
136
//variable number of tokens present, zero or more possible
137
//would _really_ like to do:
138
// struct calling_interface_token token_array[];
139
//
140
//but cannot because it is a gcc extension. :-(
141
struct
calling_interface_token
first_token
;
142
}
143
LIBSMBIOS_PACKED_ATTR
;
144
145
enum
// protected value format types
146
{
147
pvFmtAlphaNumericScanCode
= 0,
148
pvFmtAlphaNumericAscii
= 1,
149
pvFmtAlphaNumericScanCodeNS
= 2,
150
pvFmtAlphaNumericAsciiNS
= 3,
151
};
152
153
154
#if defined(_MSC_VER)
155
#pragma pack(pop)
156
#endif
157
}
158
159
// always should be last thing in header file
160
#include "
smbios/config/abi_suffix.hpp
"
161
162
#endif
/* CMOSTOKENLOWLEVEL_H */
Generated on Thu Mar 27 2014 09:27:18 for SMBIOS Library by
1.8.1.2