Helper Library for ACPI\r
\r
Copyright (c) 2014-2016, ARM Ltd. All rights reserved.\r
+ Copyright (c) 2021, Ampere Computing LLC. All rights reserved.\r
\r
SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
#include <Uefi.h>\r
\r
#include <IndustryStandard/Acpi10.h>\r
+#include <Protocol/AcpiSystemDescriptionTable.h>\r
\r
//\r
// Macros for the Generic Address Space\r
IN CONST EFI_GUID *AcpiFile\r
);\r
\r
+/**\r
+ This function calculates and updates a UINT8 checksum\r
+ in an ACPI description table header.\r
+\r
+ @param Buffer Pointer to buffer to checksum\r
+ @param Size Number of bytes to checksum\r
+\r
+ @retval EFI_SUCCESS The function completed successfully.\r
+ @retval EFI_INVALID_PARAMETER Invalid parameter.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+AcpiUpdateChecksum (\r
+ IN OUT UINT8 *Buffer,\r
+ IN UINTN Size\r
+ );\r
+\r
+/**\r
+ This function uses the ACPI SDT protocol to search an ACPI table\r
+ with a given signature.\r
+\r
+ @param AcpiTableSdtProtocol Pointer to ACPI SDT protocol.\r
+ @param TableSignature ACPI table signature.\r
+ @param Index The zero-based index of the table where to search the table.\r
+ The index will be updated to the next instance if the table\r
+ is found with the matched TableSignature.\r
+ @param Table Pointer to the table.\r
+ @param TableKey Pointer to the table key.\r
+\r
+ @return EFI_SUCCESS The function completed successfully.\r
+ @return EFI_INVALID_PARAMETER At least one of parameters is invalid.\r
+ @retval EFI_NOT_FOUND The requested index is too large and a table was not found.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+AcpiLocateTableBySignature (\r
+ IN EFI_ACPI_SDT_PROTOCOL *AcpiSdtProtocol,\r
+ IN UINT32 TableSignature,\r
+ IN OUT UINTN *Index,\r
+ OUT EFI_ACPI_DESCRIPTION_HEADER **Table,\r
+ OUT UINTN *TableKey\r
+ );\r
+\r
+/**\r
+ This function updates the integer value of an AML Object.\r
+\r
+ @param AcpiTableSdtProtocol Pointer to ACPI SDT protocol.\r
+ @param TableHandle Points to the table representing the starting point\r
+ for the object path search.\r
+ @param AsciiObjectPath Pointer to the ACPI path of the object being updated.\r
+ @param Value New value to write to the object.\r
+\r
+ @return EFI_SUCCESS The function completed successfully.\r
+ @return EFI_INVALID_PARAMETER At least one of parameters is invalid or the data type\r
+ of the ACPI object is not an integer value.\r
+ @retval EFI_NOT_FOUND The object is not found with the given path.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+AcpiAmlObjectUpdateInteger (\r
+ IN EFI_ACPI_SDT_PROTOCOL *AcpiSdtProtocol,\r
+ IN EFI_ACPI_HANDLE TableHandle,\r
+ IN CHAR8 *AsciiObjectPath,\r
+ IN UINTN Value\r
+ );\r
+\r
#endif // __ACPI_LIB_H__\r