TianoCore EDK2 master
Loading...
Searching...
No Matches
AmlApiHelper.c File Reference
#include <Api/AmlApiHelper.h>
#include <AmlCoreInterface.h>
#include <AmlInclude.h>
#include <String/AmlString.h>

Go to the source code of this file.

Functions

BOOLEAN EFIAPI AmlNameOpCompareName (IN AML_OBJECT_NODE_HANDLE NameOpNode, IN CHAR8 *AslName)
 
BOOLEAN EFIAPI AmlNodeHasOpCode (IN AML_OBJECT_NODE_HANDLE ObjectNode, IN UINT8 OpCode, IN UINT8 SubOpCode)
 
BOOLEAN EFIAPI AmlNodeHasDataType (IN AML_DATA_NODE_HANDLE DataNode, IN EAML_NODE_DATA_TYPE DataType)
 
BOOLEAN EFIAPI AmlNodeHasRdDataType (IN AML_DATA_NODE_HANDLE RdNode, IN AML_RD_HEADER RdDataType)
 

Detailed Description

AML Helper.

Copyright (c) 2020, Arm Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file AmlApiHelper.c.

Function Documentation

◆ AmlNameOpCompareName()

BOOLEAN EFIAPI AmlNameOpCompareName ( IN AML_OBJECT_NODE_HANDLE  NameOpNode,
IN CHAR8 *  AslName 
)

Compare the NameString defined by the "Name ()" ASL function, and stored in the NameOpNode, with the input NameString.

An ASL NameString is expected to be NULL terminated, and can be composed of NameSegs that have less that 4 chars, like "DEV". "DEV" will be expanded as "DEV_".

An AML NameString is not NULL terminated and is only composed of 4 chars long NameSegs.

Parameters
[in]NameOpNodeNameOp object node defining a variable. Must have an AML_NAME_OP/0 OpCode/SubOpCode. NameOp object nodes are defined in ASL using the "Name ()" function.
[in]AslNameASL NameString to compare the NameOp's name with. Must be NULL terminated.
Return values
TRUEIf the AslName and the AmlName defined by the NameOp node are similar.
FALSEOtherwise.

Definition at line 46 of file AmlApiHelper.c.

◆ AmlNodeHasDataType()

BOOLEAN EFIAPI AmlNodeHasDataType ( IN AML_DATA_NODE_HANDLE  DataNode,
IN EAML_NODE_DATA_TYPE  DataType 
)

Check whether DataNode has the input DataType.

Parameters
[in]DataNodePointer to a data node.
[in]DataTypeDataType to check.
Return values
TRUEThe node is a data node and the DataType match.
FALSEOtherwise.

Definition at line 168 of file AmlApiHelper.c.

◆ AmlNodeHasOpCode()

BOOLEAN EFIAPI AmlNodeHasOpCode ( IN AML_OBJECT_NODE_HANDLE  ObjectNode,
IN UINT8  OpCode,
IN UINT8  SubOpCode 
)

Check whether ObjectNode has the input OpCode/SubOpcode couple.

Parameters
[in]ObjectNodePointer to an object node.
[in]OpCodeOpCode to check
[in]SubOpCodeSubOpCode to check
Return values
TRUEThe node is an object node and the Opcode and SubOpCode match.
FALSEOtherwise.

Definition at line 124 of file AmlApiHelper.c.

◆ AmlNodeHasRdDataType()

BOOLEAN EFIAPI AmlNodeHasRdDataType ( IN AML_DATA_NODE_HANDLE  RdNode,
IN AML_RD_HEADER  RdDataType 
)

Check whether RdNode has the input RdDataType.

Parameters
[in]RdNodePointer to a data node.
[in]RdDataTypeDataType to check.
Return values
TRUEThe node is a Resource Data node and the RdDataType match.
FALSEOtherwise.

Definition at line 202 of file AmlApiHelper.c.