TianoCore EDK2 master
Loading...
Searching...
No Matches
AmlResourceData.h
Go to the documentation of this file.
1
14#ifndef AML_RESOURCE_DATA_H_
15#define AML_RESOURCE_DATA_H_
16
17/* This header file does not include internal Node definition,
18 i.e. AML_ROOT_NODE, AML_OBJECT_NODE, etc. The node definitions
19 must be included by the caller file. The function prototypes must
20 only expose AML_NODE_HANDLE, AML_ROOT_NODE_HANDLE, etc. node
21 definitions.
22 This allows to keep the functions defined here both internal and
23 potentially external. If necessary, any function of this file can
24 be exposed externally.
25 The Api folder is internal to the AmlLib, but should only use these
26 functions. They provide a "safe" way to interact with the AmlLib.
27*/
28
29#include <AmlInclude.h>
31
55typedef UINT8 AML_RD_HEADER;
56
61#define AML_RD_SMALL_SIZE_MASK (0x7U)
62
67#define AML_RD_SMALL_ID_MASK (0xFU << 3)
68
73#define AML_RD_LARGE_ID_MASK (0x7FU)
74
92#define AML_RD_IS_LARGE(Header) \
93 (((ACPI_SMALL_RESOURCE_HEADER*)Header)->Bits.Type == \
94 ACPI_LARGE_ITEM_FLAG)
95
106#define AML_RD_BUILD_SMALL_DESC_ID(Id) ((AML_RD_HEADER)((Id & 0xF) << 3))
107
117#define AML_RD_BUILD_LARGE_DESC_ID(Id) ((AML_RD_HEADER)((BIT7) | Id))
118
133BOOLEAN
134EFIAPI
136 IN CONST AML_RD_HEADER *Header,
137 IN AML_RD_HEADER DescriptorId
138 );
139
152EFIAPI
154 IN CONST AML_RD_HEADER *Header
155 );
156
168UINT32
169EFIAPI
171 IN CONST AML_RD_HEADER *Header
172 );
173
189EFIAPI
191 IN CONST AML_RD_HEADER *Header,
192 IN UINT8 CheckSum
193 );
194
195#endif // AML_RESOURCE_DATA_H_
EFI_STATUS EFIAPI AmlRdSetEndTagChecksum(IN CONST AML_RD_HEADER *Header, IN UINT8 CheckSum)
UINT8 AML_RD_HEADER
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
UINT32 EFIAPI AmlRdGetSize(IN CONST AML_RD_HEADER *Header)
AML_RD_HEADER EFIAPI AmlRdGetDescId(IN CONST AML_RD_HEADER *Header)
BOOLEAN EFIAPI AmlRdCompareDescId(IN CONST AML_RD_HEADER *Header, IN AML_RD_HEADER DescriptorId)