TianoCore EDK2 master
Loading...
Searching...
No Matches
Resource data APIs

Macros

#define AML_RD_IS_LARGE(Header)
 
#define AML_RD_BUILD_SMALL_DESC_ID(Id)   ((AML_RD_HEADER)((Id & 0xF) << 3))
 
#define AML_RD_BUILD_LARGE_DESC_ID(Id)   ((AML_RD_HEADER)((BIT7) | Id))
 

Functions

BOOLEAN EFIAPI AmlRdCompareDescId (IN CONST AML_RD_HEADER *Header, IN AML_RD_HEADER DescriptorId)
 
AML_RD_HEADER EFIAPI AmlRdGetDescId (IN CONST AML_RD_HEADER *Header)
 
UINT32 EFIAPI AmlRdGetSize (IN CONST AML_RD_HEADER *Header)
 

Detailed Description

Resource data APIs allow to manipulate/decode resource data elements.

Macro Definition Documentation

◆ AML_RD_BUILD_LARGE_DESC_ID

#define AML_RD_BUILD_LARGE_DESC_ID (   Id)    ((AML_RD_HEADER)((BIT7) | Id))

Build a large resource data descriptor Id. The small/large bit is included in the descriptor Id.

Parameters
[in]IdId of the descriptor.
Returns
A descriptor Id.

Definition at line 117 of file AmlResourceData.h.

◆ AML_RD_BUILD_SMALL_DESC_ID

#define AML_RD_BUILD_SMALL_DESC_ID (   Id)    ((AML_RD_HEADER)((Id & 0xF) << 3))

Build a small resource data descriptor Id. The small/large bit is included in the descriptor Id, but the size bits are not included.

Parameters
[in]IdDescriptor Id.
Returns
A descriptor Id.

Definition at line 106 of file AmlResourceData.h.

◆ AML_RD_IS_LARGE

#define AML_RD_IS_LARGE (   Header)
Value:
(((ACPI_SMALL_RESOURCE_HEADER*)Header)->Bits.Type == \
ACPI_LARGE_ITEM_FLAG)

Check whether a resource data is of the large type.

Parameters
[in]HeaderPointer to the first byte of a resource data.
Return values
TRUEIf the resource data is of the large type.
FALSEOtherwise.

Definition at line 92 of file AmlResourceData.h.

Function Documentation

◆ AmlRdCompareDescId()

BOOLEAN EFIAPI AmlRdCompareDescId ( IN CONST AML_RD_HEADER Header,
IN AML_RD_HEADER  DescriptorId 
)

Check whether the resource data has the input descriptor Id.

The small/large bit is included in the descriptor Id, but the size bits are not included for small resource data elements.

Parameters
[in]HeaderPointer to the first byte of a resource data element.
[in]DescriptorIdThe descriptor to check against.
Return values
TRUEThe resource data has the descriptor Id.
FALSEOtherwise.

Definition at line 30 of file AmlResourceData.c.

◆ AmlRdGetDescId()

AML_RD_HEADER EFIAPI AmlRdGetDescId ( IN CONST AML_RD_HEADER Header)

Get the descriptor Id of the resource data.

The small/large bit is included in the descriptor Id, but the size bits are not included for small resource data elements.

Parameters
[in]HeaderPointer to the first byte of a resource data.
Returns
A descriptor Id.

Definition at line 58 of file AmlResourceData.c.

◆ AmlRdGetSize()

UINT32 EFIAPI AmlRdGetSize ( IN CONST AML_RD_HEADER Header)

Get the size of a resource data element.

If the resource data element is of the large type, the Header is expected to be at least 3 bytes long.

Parameters
[in]HeaderPointer to the first byte of a resource data.
Returns
The size of the resource data element.

Definition at line 86 of file AmlResourceData.c.