TianoCore EDK2 master
Loading...
Searching...
No Matches
AmlOption.c File Reference
#include "AcpiTable.h"

Go to the source code of this file.

Functions

EFI_STATUS AmlParseOptionTerm (IN AML_BYTE_ENCODING *AmlByteEncoding, IN UINT8 *Buffer, IN UINTN MaxBufferSize, IN AML_OP_PARSE_INDEX TermIndex, OUT EFI_ACPI_DATA_TYPE *DataType, OUT VOID **Data, OUT UINTN *DataSize)
 
EFI_STATUS AmlParseOptionCommon (IN AML_BYTE_ENCODING *AmlByteEncoding, IN UINT8 *Buffer, IN UINTN MaxBufferSize, IN AML_OP_PARSE_INDEX Index, OUT EFI_ACPI_DATA_TYPE *DataType, OUT VOID **Data, OUT UINTN *DataSize)
 
UINTN AmlGetObjectSize (IN AML_BYTE_ENCODING *AmlByteEncoding, IN UINT8 *Buffer, IN UINTN MaxBufferSize)
 
CHAR8 * AmlGetObjectName (IN EFI_AML_HANDLE *AmlHandle)
 
EFI_STATUS AmlGetOffsetAfterLastOption (IN EFI_AML_HANDLE *AmlHandle, OUT UINT8 **Buffer)
 
EFI_STATUS AmlParseOptionHandleCommon (IN EFI_AML_HANDLE *AmlHandle, IN AML_OP_PARSE_INDEX Index, OUT EFI_ACPI_DATA_TYPE *DataType, OUT VOID **Data, OUT UINTN *DataSize)
 

Detailed Description

ACPI Sdt Protocol Driver

Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file AmlOption.c.

Function Documentation

◆ AmlGetObjectName()

CHAR8 * AmlGetObjectName ( IN EFI_AML_HANDLE AmlHandle)

Return object name.

Parameters
[in]AmlHandleAML handle.
Returns
Name of the object.

Definition at line 341 of file AmlOption.c.

◆ AmlGetObjectSize()

UINTN AmlGetObjectSize ( IN AML_BYTE_ENCODING AmlByteEncoding,
IN UINT8 *  Buffer,
IN UINTN  MaxBufferSize 
)

Return object size.

Parameters
[in]AmlByteEncodingAML Byte Encoding.
[in]BufferAML object buffer.
[in]MaxBufferSizeAML object buffer MAX size. The parser can not parse any data exceed this region.
Returns
Size of the object.

Definition at line 308 of file AmlOption.c.

◆ AmlGetOffsetAfterLastOption()

EFI_STATUS AmlGetOffsetAfterLastOption ( IN EFI_AML_HANDLE AmlHandle,
OUT UINT8 **  Buffer 
)

Return offset of last option.

Parameters
[in]AmlHandleAML Handle.
[out]BufferUpon return, points to the offset after last option.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERAmlHandle does not refer to a valid ACPI object.

Definition at line 398 of file AmlOption.c.

◆ AmlParseOptionCommon()

EFI_STATUS AmlParseOptionCommon ( IN AML_BYTE_ENCODING AmlByteEncoding,
IN UINT8 *  Buffer,
IN UINTN  MaxBufferSize,
IN AML_OP_PARSE_INDEX  Index,
OUT EFI_ACPI_DATA_TYPE *  DataType,
OUT VOID **  Data,
OUT UINTN DataSize 
)

Retrieve information according to AmlByteEncoding and Buffer.

Parameters
[in]AmlByteEncodingAML Byte Encoding.
[in]BufferAML buffer.
[in]MaxBufferSizeAML buffer MAX size. The parser can not parse any data exceed this region.
[in]IndexIndex of the data to retrieve from the object. In general, indexes read from left-to-right in the ACPI encoding, with index 0 always being the ACPI opcode.
[out]DataTypePoints to the returned data type or EFI_ACPI_DATA_TYPE_NONE if no data exists for the specified index.
[out]DataUpon return, points to the pointer to the data.
[out]DataSizeUpon return, points to the size of Data.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERBuffer does not refer to a valid ACPI object.

Definition at line 145 of file AmlOption.c.

◆ AmlParseOptionHandleCommon()

EFI_STATUS AmlParseOptionHandleCommon ( IN EFI_AML_HANDLE AmlHandle,
IN AML_OP_PARSE_INDEX  Index,
OUT EFI_ACPI_DATA_TYPE *  DataType,
OUT VOID **  Data,
OUT UINTN DataSize 
)

Retrieve information according to AmlHandle

Parameters
[in]AmlHandleAML handle.
[in]IndexIndex of the data to retrieve from the object. In general, indexes read from left-to-right in the ACPI encoding, with index 0 always being the ACPI opcode.
[out]DataTypePoints to the returned data type or EFI_ACPI_DATA_TYPE_NONE if no data exists for the specified index.
[out]DataUpon return, points to the pointer to the data.
[out]DataSizeUpon return, points to the size of Data.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERAmlHandle does not refer to a valid ACPI object.

Definition at line 449 of file AmlOption.c.

◆ AmlParseOptionTerm()

EFI_STATUS AmlParseOptionTerm ( IN AML_BYTE_ENCODING AmlByteEncoding,
IN UINT8 *  Buffer,
IN UINTN  MaxBufferSize,
IN AML_OP_PARSE_INDEX  TermIndex,
OUT EFI_ACPI_DATA_TYPE *  DataType,
OUT VOID **  Data,
OUT UINTN DataSize 
)

Retrieve option term according to AmlByteEncoding and Buffer.

Parameters
[in]AmlByteEncodingAML Byte Encoding.
[in]BufferAML buffer.
[in]MaxBufferSizeAML buffer MAX size. The parser can not parse any data exceed this region.
[in]TermIndexIndex of the data to retrieve from the object.
[out]DataTypePoints to the returned data type or EFI_ACPI_DATA_TYPE_NONE if no data exists for the specified index.
[out]DataUpon return, points to the pointer to the data.
[out]DataSizeUpon return, points to the size of Data.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERBuffer does not refer to a valid ACPI object.

Definition at line 27 of file AmlOption.c.