TianoCore EDK2 master
Loading...
Searching...
No Matches
AmlNodeDefines.h
Go to the documentation of this file.
1
9#ifndef AML_NODE_DEFINES_H_
10#define AML_NODE_DEFINES_H_
11
12#include <AmlEncoding/Aml.h>
14
20typedef struct AmlNodeHeader {
23
26
30
34
41typedef struct AmlRootNode {
44
48
52
56
62typedef struct AmlObjectNode {
65
70
75
79
82 UINT32 PkgLen;
84
88
95typedef struct AmlDataNode {
98
102
104 UINT8 *Buffer;
105
107 UINT32 Size;
109
113
121#define IS_AML_NODE_VALID(Node) \
122 ((Node != NULL) && \
123 ((((CONST AML_NODE_HEADER*)Node)->NodeType > EAmlNodeUnknown) || \
124 (((CONST AML_NODE_HEADER*)Node)->NodeType < EAmlNodeMax)))
125
133#define IS_AML_ROOT_NODE(Node) \
134 ((Node != NULL) && \
135 (((CONST AML_NODE_HEADER*)Node)->NodeType == EAmlNodeRoot))
136
144#define IS_AML_OBJECT_NODE(Node) \
145 ((Node != NULL) && \
146 (((CONST AML_NODE_HEADER*)Node)->NodeType == EAmlNodeObject))
147
155#define IS_AML_DATA_NODE(Node) \
156 ((Node != NULL) && \
157 (((CONST AML_NODE_HEADER*)Node)->NodeType == EAmlNodeData))
158
166#define AML_NODE_HAS_PARENT(Node) \
167 (IS_AML_NODE_VALID (Node) && \
168 (((CONST AML_NODE_HEADER*)Node)->Parent != NULL))
169
178#define AML_NODE_IS_DETACHED(Node) \
179 (IS_AML_NODE_VALID (Node) && \
180 IsListEmpty ((CONST LIST_ENTRY*)Node) && \
181 (((CONST AML_NODE_HEADER*)Node)->Parent == NULL))
182
183#endif // AML_NODE_DEFINES_H_
struct AmlRootNode AML_ROOT_NODE
AML_NODE_HEADER * AML_NODE_HANDLE
AML_ROOT_NODE * AML_ROOT_NODE_HANDLE
struct AmlNodeHeader AML_NODE_HEADER
struct AmlDataNode AML_DATA_NODE
struct AmlObjectNode AML_OBJECT_NODE
AML_OBJECT_NODE * AML_OBJECT_NODE_HANDLE
AML_DATA_NODE * AML_DATA_NODE_HANDLE
#define CONST
Definition: Base.h:259
enum EAmlNodeType EAML_NODE_TYPE
enum EAmlNodeDataType EAML_NODE_DATA_TYPE
@ EAmlParseIndexMax
Maximum fixed argument index (=6).
Definition: AmlDefines.h:71
AML_NODE_HEADER NodeHeader
Header information. Must be the first field of the struct.
EAML_NODE_DATA_TYPE DataType
UINT8 * Buffer
Buffer containing the data stored by this node.
UINT32 Size
Size of the Buffer.
LIST_ENTRY Link
This must be the first field in this structure.
struct AmlNodeHeader * Parent
Parent of this node. NULL for the root node.
EAML_NODE_TYPE NodeType
Node type allowing to identify a root/object/data node.
LIST_ENTRY VariableArgs
CONST AML_BYTE_ENCODING * AmlByteEncoding
AML_NODE_HEADER NodeHeader
Header information. Must be the first field of the struct.
AML_NODE_HEADER * FixedArgs[EAmlParseIndexMax]
AML_NODE_HEADER NodeHeader
Header information. Must be the first field of the struct.
LIST_ENTRY VariableArgs
EFI_ACPI_DESCRIPTION_HEADER * SdtHeader
ACPI DSDT/SSDT header.