TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | EFI_ACPI_NOTIFY_LIST |
struct | _EFI_AML_NODE_LIST |
struct | EFI_AML_HANDLE |
struct | _AML_BYTE_ENCODING |
Typedefs | |
typedef struct _AML_BYTE_ENCODING | AML_BYTE_ENCODING |
typedef struct _EFI_AML_NODE_LIST | EFI_AML_NODE_LIST |
typedef UINT32 | AML_OP_PARSE_INDEX |
typedef UINT32 | AML_OP_PARSE_FORMAT |
typedef UINT32 | AML_OP_ATTRIBUTE |
Functions | |
EFI_STATUS EFIAPI | GetAcpiTable2 (IN UINTN Index, OUT EFI_ACPI_SDT_HEADER **Table, OUT EFI_ACPI_TABLE_VERSION *Version, OUT UINTN *TableKey) |
EFI_STATUS EFIAPI | RegisterNotify (IN BOOLEAN Register, IN EFI_ACPI_NOTIFICATION_FN Notification) |
EFI_STATUS EFIAPI | OpenSdt (IN UINTN TableKey, OUT EFI_ACPI_HANDLE *Handle) |
EFI_STATUS EFIAPI | Open (IN VOID *Buffer, OUT EFI_ACPI_HANDLE *Handle) |
EFI_STATUS EFIAPI | Close (IN EFI_ACPI_HANDLE Handle) |
EFI_STATUS EFIAPI | GetOption (IN EFI_ACPI_HANDLE Handle, IN UINTN Index, OUT EFI_ACPI_DATA_TYPE *DataType, OUT CONST VOID **Data, OUT UINTN *DataSize) |
EFI_STATUS EFIAPI | SetOption (IN EFI_ACPI_HANDLE Handle, IN UINTN Index, IN CONST VOID *Data, IN UINTN DataSize) |
EFI_STATUS EFIAPI | GetChild (IN EFI_ACPI_HANDLE ParentHandle, IN OUT EFI_ACPI_HANDLE *Handle) |
EFI_STATUS EFIAPI | FindPath (IN EFI_ACPI_HANDLE HandleIn, IN VOID *AcpiPath, OUT EFI_ACPI_HANDLE *HandleOut) |
EFI_STATUS | SdtOpenEx (IN VOID *Buffer, IN UINTN BufferSize, OUT EFI_ACPI_HANDLE *Handle) |
EFI_STATUS | AmlGetNameStringSize (IN UINT8 *Buffer, OUT UINTN *BufferSize) |
UINTN | AmlGetPkgLength (IN UINT8 *Buffer, OUT UINTN *PkgLength) |
EFI_ACPI_DATA_TYPE | AmlTypeToAcpiType (IN AML_OP_PARSE_FORMAT AmlType) |
AML_BYTE_ENCODING * | AmlSearchByOpByte (IN UINT8 *OpByteBuffer) |
UINTN | AmlGetObjectSize (IN AML_BYTE_ENCODING *AmlByteEncoding, IN UINT8 *Buffer, IN UINTN MaxBufferSize) |
CHAR8 * | AmlGetObjectName (IN EFI_AML_HANDLE *AmlHandle) |
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) |
EFI_STATUS | AmlGetOffsetAfterLastOption (IN EFI_AML_HANDLE *AmlHandle, OUT UINT8 **Buffer) |
EFI_STATUS | AmlGetChildFromRoot (IN EFI_AML_HANDLE *AmlParentHandle, IN EFI_AML_HANDLE *AmlHandle, OUT VOID **Buffer) |
EFI_STATUS | AmlGetChildFromNonRoot (IN EFI_AML_HANDLE *AmlParentHandle, IN EFI_AML_HANDLE *AmlHandle, OUT VOID **Buffer) |
UINT8 * | AmlNameFromAslName (IN UINT8 *AslPath) |
EFI_STATUS | AmlFindPath (IN EFI_AML_HANDLE *AmlHandle, IN UINT8 *AmlPath, OUT VOID **Buffer, IN BOOLEAN FromRoot) |
VOID | AmlPrintNameString (IN UINT8 *Buffer) |
VOID | AmlPrintNameSeg (IN UINT8 *Buffer) |
BOOLEAN | AmlIsRootPath (IN UINT8 *Buffer) |
ACPI Sdt Protocol Driver
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file AcpiSdt.h.
#define AML_OP_PARSE_INDEX_GET_SIZE (AML_OP_PARSE_INDEX)-1 |
#define EFI_ACPI_NOTIFY_LIST_FROM_LINK | ( | _link | ) | CR (_link, EFI_ACPI_NOTIFY_LIST, Link, EFI_ACPI_NOTIFY_LIST_SIGNATURE) |
#define EFI_ACPI_NOTIFY_LIST_SIGNATURE SIGNATURE_32 ('E', 'A', 'N', 'L') |
#define EFI_AML_HANDLE_SIGNATURE SIGNATURE_32 ('E', 'A', 'H', 'S') |
#define EFI_AML_NODE_LIST_FROM_LINK | ( | _link | ) | CR (_link, EFI_AML_NODE_LIST, Link, EFI_AML_NODE_LIST_SIGNATURE) |
#define EFI_AML_NODE_LIST_SIGNATURE SIGNATURE_32 ('E', 'A', 'M', 'L') |
#define EFI_AML_ROOT_HANDLE_SIGNATURE SIGNATURE_32 ('E', 'A', 'R', 'H') |
typedef struct _AML_BYTE_ENCODING AML_BYTE_ENCODING |
typedef UINT32 AML_OP_ATTRIBUTE |
typedef struct _EFI_AML_NODE_LIST EFI_AML_NODE_LIST |
EFI_STATUS AmlFindPath | ( | IN EFI_AML_HANDLE * | AmlHandle, |
IN UINT8 * | AmlPath, | ||
OUT VOID ** | Buffer, | ||
IN BOOLEAN | FromRoot | ||
) |
Returns the handle of the ACPI object representing the specified ACPI AML path
[in] | AmlHandle | Points to the handle of the object representing the starting point for the path search. |
[in] | AmlPath | Points to the ACPI AML path. |
[out] | Buffer | On return, points to the ACPI object which represents AcpiPath, relative to HandleIn. |
[in] | FromRoot | TRUE means to find AML path from \ (Root) Node. FALSE means to find AML path from this Node (The HandleIn). |
EFI_SUCCESS | Success |
EFI_INVALID_PARAMETER | HandleIn does not refer to a valid ACPI object. |
Definition at line 517 of file AmlNamespace.c.
EFI_STATUS AmlGetChildFromNonRoot | ( | IN EFI_AML_HANDLE * | AmlParentHandle, |
IN EFI_AML_HANDLE * | AmlHandle, | ||
OUT VOID ** | Buffer | ||
) |
Return the child ACPI objects from Non-Root Handle.
[in] | AmlParentHandle | Parent handle. It is Non-Root Handle. |
[in] | AmlHandle | The previously returned handle or NULL to start with the first handle. |
[out] | Buffer | On return, points to the next returned ACPI handle or NULL if there are no child objects. |
EFI_SUCCESS | Success |
EFI_INVALID_PARAMETER | ParentHandle is NULL or does not refer to a valid ACPI object. |
Definition at line 249 of file AmlChild.c.
EFI_STATUS AmlGetChildFromRoot | ( | IN EFI_AML_HANDLE * | AmlParentHandle, |
IN EFI_AML_HANDLE * | AmlHandle, | ||
OUT VOID ** | Buffer | ||
) |
Return the child ACPI objects from Root Handle.
[in] | AmlParentHandle | Parent handle. It is Root Handle. |
[in] | AmlHandle | The previously returned handle or NULL to start with the first handle. |
[out] | Buffer | On return, points to the next returned ACPI handle or NULL if there are no child objects. |
EFI_SUCCESS | Success |
EFI_INVALID_PARAMETER | ParentHandle is NULL or does not refer to a valid ACPI object. |
Definition at line 81 of file AmlChild.c.
EFI_STATUS AmlGetNameStringSize | ( | IN UINT8 * | Buffer, |
OUT UINTN * | BufferSize | ||
) |
Get AML NameString size.
[in] | Buffer | AML NameString. |
[out] | BufferSize | AML NameString size |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | Buffer does not refer to a valid AML NameString. |
Definition at line 109 of file AmlString.c.
CHAR8 * AmlGetObjectName | ( | IN EFI_AML_HANDLE * | AmlHandle | ) |
Return object name.
[in] | AmlHandle | AML handle. |
Definition at line 341 of file AmlOption.c.
UINTN AmlGetObjectSize | ( | IN AML_BYTE_ENCODING * | AmlByteEncoding, |
IN UINT8 * | Buffer, | ||
IN UINTN | MaxBufferSize | ||
) |
Return object size.
[in] | AmlByteEncoding | AML Byte Encoding. |
[in] | Buffer | AML object buffer. |
[in] | MaxBufferSize | AML object buffer MAX size. The parser can not parse any data exceed this region. |
Definition at line 308 of file AmlOption.c.
EFI_STATUS AmlGetOffsetAfterLastOption | ( | IN EFI_AML_HANDLE * | AmlHandle, |
OUT UINT8 ** | Buffer | ||
) |
Return offset of last option.
[in] | AmlHandle | AML Handle. |
[out] | Buffer | Upon return, points to the offset after last option. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | AmlHandle does not refer to a valid ACPI object. |
Definition at line 398 of file AmlOption.c.
BOOLEAN AmlIsRootPath | ( | IN UINT8 * | Buffer | ) |
Check if it is AML Root name
[in] | Buffer | AML path. |
TRUE | AML path is root. |
FALSE | AML path is not root. |
Definition at line 20 of file AmlString.c.
UINT8 * AmlNameFromAslName | ( | IN UINT8 * | AslPath | ) |
Return AML name according to ASL name. The caller need free the AmlName returned.
[in] | AslPath | ASL name. |
Definition at line 385 of file AmlString.c.
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
[in] | AmlHandle | AML handle. |
[in] | Index | Index 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] | DataType | Points to the returned data type or EFI_ACPI_DATA_TYPE_NONE if no data exists for the specified index. |
[out] | Data | Upon return, points to the pointer to the data. |
[out] | DataSize | Upon return, points to the size of Data. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | AmlHandle does not refer to a valid ACPI object. |
Definition at line 449 of file AmlOption.c.
VOID AmlPrintNameSeg | ( | IN UINT8 * | Buffer | ) |
VOID AmlPrintNameString | ( | IN UINT8 * | Buffer | ) |
Print AML NameString.
[in] | Buffer | AML NameString. |
Definition at line 495 of file AmlString.c.
AML_BYTE_ENCODING * AmlSearchByOpByte | ( | IN UINT8 * | OpByteBuffer | ) |
EFI_ACPI_DATA_TYPE AmlTypeToAcpiType | ( | IN AML_OP_PARSE_FORMAT | AmlType | ) |
EFI_STATUS EFIAPI Close | ( | IN EFI_ACPI_HANDLE | Handle | ) |
EFI_STATUS EFIAPI FindPath | ( | IN EFI_ACPI_HANDLE | HandleIn, |
IN VOID * | AcpiPath, | ||
OUT EFI_ACPI_HANDLE * | HandleOut | ||
) |
Returns the handle of the ACPI object representing the specified ACPI path
[in] | HandleIn | Points to the handle of the object representing the starting point for the path search. |
[in] | AcpiPath | Points to the ACPI path, which conforms to the ACPI encoded path format. |
[out] | HandleOut | On return, points to the ACPI object which represents AcpiPath, relative to HandleIn. |
EFI_SUCCESS | Success |
EFI_INVALID_PARAMETER | HandleIn is NULL or does not refer to a valid ACPI object. |
EFI_STATUS EFIAPI GetAcpiTable2 | ( | IN UINTN | Index, |
OUT EFI_ACPI_SDT_HEADER ** | Table, | ||
OUT EFI_ACPI_TABLE_VERSION * | Version, | ||
OUT UINTN * | TableKey | ||
) |
Returns a requested ACPI table.
The GetAcpiTable() function returns a pointer to a buffer containing the ACPI table associated with the Index that was input. The following structures are not considered elements in the list of ACPI tables:
[in] | Index | The zero-based index of the table to retrieve. |
[out] | Table | Pointer for returning the table buffer. |
[out] | Version | On return, updated with the ACPI versions to which this table belongs. Type EFI_ACPI_TABLE_VERSION is defined in "Related Definitions" in the EFI_ACPI_SDT_PROTOCOL. |
[out] | TableKey | On return, points to the table key for the specified ACPI system definition table. This is identical to the table key used in the EFI_ACPI_TABLE_PROTOCOL. The TableKey can be passed to EFI_ACPI_TABLE_PROTOCOL.UninstallAcpiTable() to uninstall the table. |
EFI_SUCCESS | The function completed successfully. |
EFI_NOT_FOUND | The requested index is too large and a table was not found. |
EFI_STATUS EFIAPI GetChild | ( | IN EFI_ACPI_HANDLE | ParentHandle, |
IN OUT EFI_ACPI_HANDLE * | Handle | ||
) |
Return the child ACPI objects.
[in] | ParentHandle | Parent handle. |
[in,out] | Handle | On entry, points to the previously returned handle or NULL to start with the first handle. On return, points to the next returned ACPI handle or NULL if there are no child objects. |
EFI_SUCCESS | Success |
EFI_INVALID_PARAMETER | ParentHandle is NULL or does not refer to a valid ACPI object. |
EFI_STATUS EFIAPI GetOption | ( | IN EFI_ACPI_HANDLE | Handle, |
IN UINTN | Index, | ||
OUT EFI_ACPI_DATA_TYPE * | DataType, | ||
OUT CONST VOID ** | Data, | ||
OUT UINTN * | DataSize | ||
) |
Retrieve information about an ACPI object.
[in] | Handle | ACPI object handle. |
[in] | Index | Index 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] | DataType | Points to the returned data type or EFI_ACPI_DATA_TYPE_NONE if no data exists for the specified index. |
[out] | Data | Upon return, points to the pointer to the data. |
[out] | DataSize | Upon return, points to the size of Data. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | Handle is NULL or does not refer to a valid ACPI object. |
EFI_STATUS EFIAPI Open | ( | IN VOID * | Buffer, |
OUT EFI_ACPI_HANDLE * | Handle | ||
) |
EFI_STATUS EFIAPI OpenSdt | ( | IN UINTN | TableKey, |
OUT EFI_ACPI_HANDLE * | Handle | ||
) |
Create a handle for the first ACPI opcode in an ACPI system description table.
[in] | TableKey | The table key for the ACPI table, as returned by GetTable(). |
[out] | Handle | On return, points to the newly created ACPI handle. |
EFI_SUCCESS | Handle created successfully. |
EFI_NOT_FOUND | TableKey does not refer to a valid ACPI table. |
EFI_STATUS EFIAPI RegisterNotify | ( | IN BOOLEAN | Register, |
IN EFI_ACPI_NOTIFICATION_FN | Notification | ||
) |
Register or unregister a callback when an ACPI table is installed.
This function registers or unregisters a function which will be called whenever a new ACPI table is installed.
[in] | Register | If TRUE, then the specified function will be registered. If FALSE, then the specified function will be unregistered. |
[in] | Notification | Points to the callback function to be registered or unregistered. |
EFI_SUCCESS | Callback successfully registered or unregistered. |
EFI_INVALID_PARAMETER | Notification is NULL |
EFI_INVALID_PARAMETER | Register is FALSE and Notification does not match a known registration function. |
EFI_STATUS SdtOpenEx | ( | IN VOID * | Buffer, |
IN UINTN | BufferSize, | ||
OUT EFI_ACPI_HANDLE * | Handle | ||
) |
Create a handle from an ACPI opcode
[in] | Buffer | Points to the ACPI opcode. |
[in] | BufferSize | Max buffer size. |
[out] | Handle | Upon return, holds the handle. |
EFI_SUCCESS | Success |
EFI_INVALID_PARAMETER | Buffer is NULL or Handle is NULL or Buffer points to an invalid opcode. |
EFI_STATUS EFIAPI SetOption | ( | IN EFI_ACPI_HANDLE | Handle, |
IN UINTN | Index, | ||
IN CONST VOID * | Data, | ||
IN UINTN | DataSize | ||
) |
Change information about an ACPI object.
[in] | Handle | ACPI object handle. |
[in] | Index | Index 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. |
[in] | Data | Points to the data. |
[in] | DataSize | The size of the Data. |
EFI_SUCCESS | Success |
EFI_INVALID_PARAMETER | Handle is NULL or does not refer to a valid ACPI object. |
EFI_BAD_BUFFER_SIZE | Data cannot be accommodated in the space occupied by the option. |