TianoCore EDK2 master
Loading...
Searching...
No Matches
Aml.h
Go to the documentation of this file.
1
10#ifndef AML_H_
11#define AML_H_
12
13#include <AmlDefines.h>
14#include <AmlInclude.h>
16
17#if !defined (MDEPKG_NDEBUG)
18#define AML_OPCODE_DEF(str, OpCode) str, OpCode
19#else
20#define AML_OPCODE_DEF(str, OpCode) OpCode
21#endif // MDEPKG_NDEBUG
22
33typedef enum EAmlParseFormat {
44 EAmlName,
53
59typedef UINT32 AML_OP_ATTRIBUTE;
60
64#define AML_HAS_PKG_LENGTH 0x00001U
65
70#define AML_IS_NAME_CHAR 0x00002U
71
75#define AML_HAS_CHILD_OBJ 0x00004U
76
82#define AML_HAS_BYTE_LIST 0x00008U
83
88#define AML_HAS_FIELD_LIST 0x00010U
89
93#define AML_IS_FIELD_ELEMENT 0x00020U
94
98#define AML_IN_NAMESPACE 0x10000U
99
103#define AML_IS_PSEUDO_OPCODE 0x20000U
104
114typedef struct _AML_BYTE_ENCODING {
115 // Enable this field for debug.
116 #if !defined (MDEPKG_NDEBUG)
118 CONST CHAR8 *Str;
119 #endif // MDEPKG_NDEBUG
120
122 UINT8 OpCode;
123
129
135
140
143
145 AML_OP_ATTRIBUTE Attribute;
147
159CONST
161EFIAPI
163 IN CONST UINT8 *Buffer
164 );
165
175CONST
177EFIAPI
179 IN UINT8 OpCode,
180 IN UINT8 SubOpCode
181 );
182
194CONST
196EFIAPI
198 IN CONST UINT8 *Buffer
199 );
200
211CONST
213EFIAPI
215 IN UINT8 OpCode,
216 IN UINT8 SubOpCode
217 );
218
219// Enable this function for debug.
220#if !defined (MDEPKG_NDEBUG)
221
231CONST
232CHAR8 *
234 IN UINT8 OpCode,
235 IN UINT8 SubOpCode
236 );
237
247CONST
248CHAR8 *
250 IN UINT8 OpCode,
251 IN UINT8 SubOpCode
252 );
253
254#endif // MDEPKG_NDEBUG
255
265BOOLEAN
266EFIAPI
268 IN UINT8 OpCode,
269 IN UINT8 SubOpCode
270 );
271
280EFIAPI
282 IN AML_PARSE_FORMAT AmlType
283 );
284
294UINT32
295EFIAPI
297 IN CONST UINT8 *Buffer,
298 OUT UINT32 *PkgLength
299 );
300
310UINT8
311EFIAPI
313 IN UINT32 Length,
314 OUT UINT8 *Buffer
315 );
316
325UINT8
326EFIAPI
328 IN UINT32 Length
329 );
330
370EFIAPI
372 IN UINT32 Length,
373 OUT UINT32 *PkgLen
374 );
375
376#endif // AML_H_
EAML_NODE_DATA_TYPE EFIAPI AmlTypeToNodeDataType(IN AML_PARSE_FORMAT AmlType)
Definition: Aml.c:596
CONST AML_BYTE_ENCODING *EFIAPI AmlGetByteEncodingByOpCode(IN UINT8 OpCode, IN UINT8 SubOpCode)
Definition: Aml.c:347
CONST CHAR8 * AmlGetOpCodeStr(IN UINT8 OpCode, IN UINT8 SubOpCode)
Definition: Aml.c:470
enum EAmlParseFormat AML_PARSE_FORMAT
struct _AML_BYTE_ENCODING AML_BYTE_ENCODING
UINT8 EFIAPI AmlComputePkgLengthWidth(IN UINT32 Length)
Definition: Aml.c:799
CONST CHAR8 * AmlGetFieldOpCodeStr(IN UINT8 OpCode, IN UINT8 SubOpCode)
Definition: Aml.c:504
UINT32 EFIAPI AmlGetPkgLength(IN CONST UINT8 *Buffer, OUT UINT32 *PkgLength)
Definition: Aml.c:621
EFI_STATUS EFIAPI AmlComputePkgLength(IN UINT32 Length, OUT UINT32 *PkgLen)
Definition: Aml.c:862
UINT8 EFIAPI AmlSetPkgLength(IN UINT32 Length, OUT UINT8 *Buffer)
Definition: Aml.c:724
CONST AML_BYTE_ENCODING *EFIAPI AmlGetFieldEncodingByOpCode(IN UINT8 OpCode, IN UINT8 SubOpCode)
Definition: Aml.c:434
CONST AML_BYTE_ENCODING *EFIAPI AmlGetByteEncoding(IN CONST UINT8 *Buffer)
Definition: Aml.c:290
BOOLEAN EFIAPI AmlIsOpCodeValid(IN UINT8 OpCode, IN UINT8 SubOpCode)
Definition: Aml.c:543
UINT32 AML_OP_ATTRIBUTE
Definition: Aml.h:59
CONST AML_BYTE_ENCODING *EFIAPI AmlGetFieldEncoding(IN CONST UINT8 *Buffer)
Definition: Aml.c:383
EAmlParseFormat
Definition: Aml.h:33
@ EAmlParseFormatMax
Max enum.
Definition: Aml.h:51
@ EAmlUInt64
Eight byte value evaluated as a UINT64.
Definition: Aml.h:38
@ EAmlName
Definition: Aml.h:44
@ EAmlObject
Definition: Aml.h:39
@ EAmlUInt8
One byte value evaluated as a UINT8.
Definition: Aml.h:35
@ EAmlFieldPkgLen
Definition: Aml.h:47
@ EAmlString
NULL terminated string.
Definition: Aml.h:46
@ EAmlNone
No data expected.
Definition: Aml.h:34
@ EAmlUInt16
Two byte value evaluated as a UINT16.
Definition: Aml.h:36
@ EAmlUInt32
Four byte value evaluated as a UINT32.
Definition: Aml.h:37
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
enum EAmlParseIndex EAML_PARSE_INDEX
enum EAmlNodeDataType EAML_NODE_DATA_TYPE
@ EAmlParseIndexMax
Maximum fixed argument index (=6).
Definition: AmlDefines.h:71
EAML_PARSE_INDEX NameIndex
Definition: Aml.h:139
UINT8 SubOpCode
Definition: Aml.h:128
UINT8 OpCode
OpCode of the AML object.
Definition: Aml.h:122
AML_OP_ATTRIBUTE Attribute
Additional information on the AML object.
Definition: Aml.h:145
AML_PARSE_FORMAT Format[EAmlParseIndexMax]
Type of each fixed argument.
Definition: Aml.h:142
EAML_PARSE_INDEX MaxIndex
Definition: Aml.h:134
CONST CHAR8 * Str
String field allowing to print the AML object.
Definition: Aml.h:118