TianoCore EDK2 master
|
#include "AcpiTable.h"
Go to the source code of this file.
Functions | |
EFI_ACPI_TABLE_INSTANCE * | SdtGetAcpiTableInstance (VOID) |
EFI_ACPI_TABLE_LIST * | FindTableByBuffer (IN VOID *Buffer) |
EFI_STATUS | SdtUpdateAmlChecksum (IN VOID *Buffer) |
EFI_STATUS | SdtGetMaxAmlBufferSize (IN VOID *Buffer, OUT UINTN *MaxSize) |
VOID | SdtNotifyAcpiList (IN EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance, IN EFI_ACPI_TABLE_VERSION Version, IN UINTN Handle) |
EFI_STATUS | SdtGetAcpiTable (IN EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance, IN UINTN Index, OUT EFI_ACPI_SDT_HEADER **Table, OUT EFI_ACPI_TABLE_VERSION *Version, OUT UINTN *TableKey) |
EFI_STATUS EFIAPI | GetAcpiTable2 (IN UINTN Index, OUT EFI_ACPI_SDT_HEADER **Table, OUT EFI_ACPI_TABLE_VERSION *Version, OUT UINTN *TableKey) |
VOID | SdtRegisterNotify (IN EFI_ACPI_NOTIFICATION_FN Notification) |
EFI_STATUS | SdtUnregisterNotify (IN EFI_ACPI_NOTIFICATION_FN Notification) |
EFI_STATUS EFIAPI | RegisterNotify (IN BOOLEAN Register, IN EFI_ACPI_NOTIFICATION_FN Notification) |
EFI_STATUS | SdtOpenSdtTable (IN UINTN TableKey, OUT EFI_ACPI_HANDLE *Handle) |
EFI_STATUS EFIAPI | OpenSdt (IN UINTN TableKey, OUT EFI_ACPI_HANDLE *Handle) |
EFI_STATUS | SdtOpenEx (IN VOID *Buffer, IN UINTN BufferSize, 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 | SdtFindPathFromNonRoot (IN EFI_ACPI_HANDLE HandleIn, IN UINT8 *AmlPath, OUT EFI_ACPI_HANDLE *HandleOut) |
EFI_AML_HANDLE * | SdtDuplicateHandle (IN EFI_AML_HANDLE *AmlHandle) |
EFI_STATUS | SdtFindPathFromRoot (IN EFI_ACPI_HANDLE HandleIn, IN UINT8 *AmlPath, OUT EFI_ACPI_HANDLE *HandleOut) |
EFI_STATUS EFIAPI | FindPath (IN EFI_ACPI_HANDLE HandleIn, IN VOID *AcpiPath, OUT EFI_ACPI_HANDLE *HandleOut) |
VOID | SdtAcpiTableAcpiSdtConstructor (IN EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance) |
Variables | |
GLOBAL_REMOVE_IF_UNREFERENCED EFI_ACPI_SDT_PROTOCOL | mAcpiSdtProtocolTemplate |
ACPI Sdt Protocol Driver
Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file AcpiSdt.c.
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_ACPI_TABLE_LIST * FindTableByBuffer | ( | IN VOID * | Buffer | ) |
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. |
VOID SdtAcpiTableAcpiSdtConstructor | ( | IN EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance | ) |
EFI_AML_HANDLE * SdtDuplicateHandle | ( | IN EFI_AML_HANDLE * | AmlHandle | ) |
EFI_STATUS SdtFindPathFromNonRoot | ( | IN EFI_ACPI_HANDLE | HandleIn, |
IN UINT8 * | AmlPath, | ||
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] | AmlPath | Points to the AML path. |
[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 SdtFindPathFromRoot | ( | IN EFI_ACPI_HANDLE | HandleIn, |
IN UINT8 * | AmlPath, | ||
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] | AmlPath | Points to the AML path. |
[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 SdtGetAcpiTable | ( | IN EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance, |
IN UINTN | Index, | ||
OUT EFI_ACPI_SDT_HEADER ** | Table, | ||
OUT EFI_ACPI_TABLE_VERSION * | Version, | ||
OUT UINTN * | TableKey | ||
) |
Returns a requested ACPI table.
The following structures are not considered elements in the list of ACPI tables:
[in] | AcpiTableInstance | ACPI table Instance. |
[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_ACPI_TABLE_INSTANCE * SdtGetAcpiTableInstance | ( | VOID | ) |
EFI_STATUS SdtGetMaxAmlBufferSize | ( | IN VOID * | Buffer, |
OUT UINTN * | MaxSize | ||
) |
This function finds MAX AML buffer size. It will search the ACPI table installed by ACPI_TABLE protocol.
[in] | Buffer | A piece of AML code buffer pointer. |
[out] | MaxSize | On return it holds the MAX size of buffer. |
EFI_SUCCESS | The table holds the AML buffer is found, and MAX size if returned. |
EFI_NOT_FOUND | The table holds the AML buffer is not found. |
VOID SdtNotifyAcpiList | ( | IN EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance, |
IN EFI_ACPI_TABLE_VERSION | Version, | ||
IN UINTN | Handle | ||
) |
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 SdtOpenSdtTable | ( | 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. |
VOID SdtRegisterNotify | ( | IN EFI_ACPI_NOTIFICATION_FN | Notification | ) |
EFI_STATUS SdtUnregisterNotify | ( | IN EFI_ACPI_NOTIFICATION_FN | Notification | ) |
Unregister a callback when an ACPI table is installed.
This function unregisters a function which will be called whenever a new ACPI table is installed.
[in] | Notification | Points to the callback function to be unregistered. |
EFI_SUCCESS | Callback successfully unregistered. |
EFI_INVALID_PARAMETER | Notification does not match a known registration function. |
EFI_STATUS SdtUpdateAmlChecksum | ( | IN VOID * | Buffer | ) |
This function updates AML table checksum. It will search the ACPI table installed by ACPI_TABLE protocol.
[in] | Buffer | A piece of AML code buffer pointer. |
EFI_SUCCESS | The table holds the AML buffer is found, and checksum is updated. |
EFI_NOT_FOUND | The table holds the AML buffer is not found. |
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. |
GLOBAL_REMOVE_IF_UNREFERENCED EFI_ACPI_SDT_PROTOCOL mAcpiSdtProtocolTemplate |