TianoCore EDK2 master
|
#include "AcpiTable.h"
Go to the source code of this file.
Variables | |
UINTN | mEfiAcpiMaxNumTables = EFI_ACPI_MAX_NUM_TABLES |
STATIC EFI_ALLOCATE_TYPE | mAcpiTableAllocType |
ACPI Table Protocol Implementation
Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
Copyright (c) 2016, Linaro Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file AcpiTableProtocol.c.
This function calculates and updates an UINT8 checksum.
Buffer | Pointer to buffer to checksum |
Size | Number of bytes to checksum |
ChecksumOffset | Offset to place the checksum result in |
Definition at line 1666 of file AcpiTableProtocol.c.
EFI_STATUS AcpiTableAcpiTableConstructor | ( | EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance | ) |
Constructor for the ACPI table protocol. Initializes instance data.
AcpiTableInstance | Instance to construct |
Definition at line 2062 of file AcpiTableProtocol.c.
EFI_STATUS AddTableToList | ( | IN EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance, |
IN VOID * | Table, | ||
IN BOOLEAN | Checksum, | ||
IN EFI_ACPI_TABLE_VERSION | Version, | ||
IN BOOLEAN | IsFromHob, | ||
OUT UINTN * | Handle | ||
) |
This function adds an ACPI table to the table list. It will detect FACS and allocate the correct type of memory and properly align the table.
AcpiTableInstance | Instance of the protocol. |
Table | Table to add. |
Checksum | Does the table require checksumming. |
Version | The version of the list to add the table to. |
IsFromHob | True, if add Apci Table from Hob List. |
Handle | Pointer for returning the handle. |
This function adds an ACPI table to the table list. It will detect FACS and allocate the correct type of memory and properly align the table.
AcpiTableInstance | Instance of the protocol. |
Table | Table to add. |
Checksum | Does the table require checksumming. |
Version | The version of the list to add the table to. |
IsFromHob | True, if add Apci Table from Hob List. |
Handle | Pointer for returning the handle. |
EFI_ACCESS_DENIED | The table signature matches a table already present in the system and platform policy does not allow duplicate tables of this type. |
Definition at line 504 of file AcpiTableProtocol.c.
EFI_STATUS ChecksumCommonTables | ( | IN OUT EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance | ) |
Checksum all versions of the common tables, RSDP, RSDT, XSDT.
AcpiTableInstance | Protocol instance private data. |
Definition at line 1711 of file AcpiTableProtocol.c.
EFI_STATUS DeleteTable | ( | IN EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance, |
IN EFI_ACPI_TABLE_VERSION | Version, | ||
IN OUT EFI_ACPI_TABLE_LIST * | Table | ||
) |
This function removes a table and frees any associated memory.
AcpiTableInstance | Instance of the protocol. |
Version | Version(s) to delete. |
Table | Pointer to table found. |
Definition at line 1348 of file AcpiTableProtocol.c.
EFI_STATUS FindTableByHandle | ( | IN UINTN | Handle, |
IN LIST_ENTRY * | TableList, | ||
OUT EFI_ACPI_TABLE_LIST ** | Table | ||
) |
This function finds the table specified by the handle and returns a pointer to it. If the handle is not found, EFI_NOT_FOUND is returned and the contents of Table are undefined.
Handle | Table to find. |
TableList | Table list to search |
Table | Pointer to table found. |
Definition at line 1168 of file AcpiTableProtocol.c.
STATIC VOID FreeTableMemory | ( | EFI_ACPI_TABLE_LIST * | TableEntry | ) |
Free the memory associated with the provided EFI_ACPI_TABLE_LIST instance.
TableEntry | EFI_ACPI_TABLE_LIST instance pointer |
Definition at line 471 of file AcpiTableProtocol.c.
EFI_STATUS EFIAPI InstallAcpiTable | ( | IN EFI_ACPI_TABLE_PROTOCOL * | This, |
IN VOID * | AcpiTableBuffer, | ||
IN UINTN | AcpiTableBufferSize, | ||
OUT UINTN * | TableKey | ||
) |
Installs an ACPI table into the RSDT/XSDT. Note that the ACPI table should be checksumed before installing it. Otherwise it will assert.
This | Protocol instance pointer. |
AcpiTableBuffer | A pointer to a buffer containing the ACPI table to be installed. |
AcpiTableBufferSize | Specifies the size, in bytes, of the AcpiTableBuffer buffer. |
TableKey | Reurns a key to refer to the ACPI table. |
EFI_ACCESS_DENIED | The table signature matches a table already present in the system and platform policy does not allow duplicate tables of this type. |
Definition at line 206 of file AcpiTableProtocol.c.
EFI_STATUS InstallAcpiTableFromAcpiSiliconHob | ( | EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance, |
EFI_HOB_GUID_TYPE * | GuidHob | ||
) |
This function is updating the instance with RSDP and RSDT, these are steps in the constructor that will be skipped if this HOB is available.
AcpiTableInstance | Protocol instance private data. |
GuidHob | GUID HOB header. |
Definition at line 1962 of file AcpiTableProtocol.c.
EFI_STATUS InstallAcpiTableFromHob | ( | EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance | ) |
This function will find gUniversalPayloadAcpiTableGuid Guid Hob, and install Acpi table from it.
AcpiTableInstance | Protocol instance private data. |
Definition at line 1802 of file AcpiTableProtocol.c.
EFI_STATUS EFIAPI PublishTables | ( | IN EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance, |
IN EFI_ACPI_TABLE_VERSION | Version | ||
) |
This function publishes the specified versions of the ACPI tables by installing EFI configuration table entries for them. Any combination of table versions can be published.
AcpiTableInstance | Instance of the protocol. |
Version | Version(s) to publish. |
Definition at line 118 of file AcpiTableProtocol.c.
EFI_STATUS ReallocateAcpiTableBuffer | ( | IN EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance | ) |
If the number of APCI tables exceeds the preallocated max table number, enlarge the table buffer.
AcpiTableInstance | ACPI table protocol instance data structure. |
Definition at line 332 of file AcpiTableProtocol.c.
EFI_STATUS RemoveTableFromList | ( | IN EFI_ACPI_TABLE_INSTANCE * | AcpiTableInstance, |
IN EFI_ACPI_TABLE_VERSION | Version, | ||
IN UINTN | Handle | ||
) |
This function finds and removes the table specified by the handle.
AcpiTableInstance | Instance of the protocol. |
Version | Bitmask of which versions to remove. |
Handle | Table to remove. |
Definition at line 1613 of file AcpiTableProtocol.c.
EFI_STATUS RemoveTableFromRsdt | ( | IN OUT EFI_ACPI_TABLE_LIST * | Table, |
IN OUT UINTN * | NumberOfTableEntries, | ||
IN OUT EFI_ACPI_DESCRIPTION_HEADER *Rsdt | OPTIONAL, | ||
IN OUT EFI_ACPI_DESCRIPTION_HEADER *Xsdt | OPTIONAL | ||
) |
This function removes a basic table from the RSDT and/or XSDT. For Acpi 1.0 tables, pass in the Rsdt. For Acpi 2.0 tables, pass in both Rsdt and Xsdt.
Table | Pointer to table found. |
NumberOfTableEntries | Current number of table entries in the RSDT/XSDT |
Rsdt | Pointer to the RSDT to remove from |
Xsdt | Pointer to the Xsdt to remove from |
Definition at line 1221 of file AcpiTableProtocol.c.
EFI_STATUS EFIAPI UninstallAcpiTable | ( | IN EFI_ACPI_TABLE_PROTOCOL * | This, |
IN UINTN | TableKey | ||
) |
Removes an ACPI table from the RSDT/XSDT.
This | Protocol instance pointer. |
TableKey | Specifies the table to uninstall. The key was returned from InstallAcpiTable(). |
Definition at line 284 of file AcpiTableProtocol.c.
STATIC EFI_ALLOCATE_TYPE mAcpiTableAllocType |
Definition at line 23 of file AcpiTableProtocol.c.
UINTN mEfiAcpiMaxNumTables = EFI_ACPI_MAX_NUM_TABLES |
Definition at line 17 of file AcpiTableProtocol.c.