TianoCore EDK2 master
|
#include <Protocol/AcpiTable.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <AcpiTableGenerator.h>
#include <ConfigurationManagerObject.h>
#include <Library/AmlLib/AmlLib.h>
#include <Library/TableHelperLib.h>
#include <Protocol/ConfigurationManagerProtocol.h>
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | GetCgfMgrInfo (IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, OUT CM_STD_OBJ_CONFIGURATION_MANAGER_INFO **CfgMfrInfo) |
EFI_STATUS EFIAPI | AddAcpiHeader (IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST ACPI_TABLE_GENERATOR *CONST Generator, IN OUT EFI_ACPI_DESCRIPTION_HEADER *CONST AcpiHeader, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, IN CONST UINT32 Length) |
EFI_STATUS EFIAPI | AddSsdtAcpiHeader (IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST CfgMgrProtocol, IN CONST ACPI_TABLE_GENERATOR *CONST Generator, IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST AcpiTableInfo, OUT AML_ROOT_NODE_HANDLE *RootNode) |
BOOLEAN EFIAPI | FindDuplicateValue (IN CONST VOID *Array, IN CONST UINTN Count, IN CONST UINTN ElementSize, IN PFN_IS_EQUAL EqualTestFunction) |
Table Helper
Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file TableHelper.c.
EFI_STATUS EFIAPI AddAcpiHeader | ( | IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST | CfgMgrProtocol, |
IN CONST ACPI_TABLE_GENERATOR *CONST | Generator, | ||
IN OUT EFI_ACPI_DESCRIPTION_HEADER *CONST | AcpiHeader, | ||
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST | AcpiTableInfo, | ||
IN CONST UINT32 | Length | ||
) |
The AddAcpiHeader function updates the ACPI header structure pointed by the AcpiHeader. It utilizes the ACPI table Generator and the Configuration Manager protocol to obtain any information required for constructing the header.
[in] | CfgMgrProtocol | Pointer to the Configuration Manager protocol interface. |
[in] | Generator | Pointer to the ACPI table Generator. |
[in,out] | AcpiHeader | Pointer to the ACPI table header to be updated. |
[in] | AcpiTableInfo | Pointer to the ACPI table info structure. |
[in] | Length | Length of the ACPI table. |
EFI_SUCCESS | The ACPI table is updated successfully. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | The required object information is not found. |
EFI_BAD_BUFFER_SIZE | The size returned by the Configuration Manager is less than the Object size for the requested object. |
Definition at line 114 of file TableHelper.c.
EFI_STATUS EFIAPI AddSsdtAcpiHeader | ( | IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST | CfgMgrProtocol, |
IN CONST ACPI_TABLE_GENERATOR *CONST | Generator, | ||
IN CONST CM_STD_OBJ_ACPI_TABLE_INFO *CONST | AcpiTableInfo, | ||
OUT AML_ROOT_NODE_HANDLE * | RootNode | ||
) |
Build a RootNode containing SSDT ACPI header information using the AmlLib.
The function utilizes the ACPI table Generator and the Configuration Manager protocol to obtain any information required for constructing the header. It then creates a RootNode. The SSDT ACPI header is part of the RootNode.
This is essentially a wrapper around AmlCodeGenDefinitionBlock () from the AmlLib.
[in] | CfgMgrProtocol | Pointer to the Configuration Manager protocol interface. |
[in] | Generator | Pointer to the ACPI table Generator. |
[in] | AcpiTableInfo | Pointer to the ACPI table info structure. |
[out] | RootNode | If success, contains the created RootNode. The SSDT ACPI header is part of the RootNode. |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | A parameter is invalid. |
EFI_NOT_FOUND | The required object information is not found. |
EFI_BAD_BUFFER_SIZE | The size returned by the Configuration Manager is less than the Object size for the requested object. |
Definition at line 221 of file TableHelper.c.
BOOLEAN EFIAPI FindDuplicateValue | ( | IN CONST VOID * | Array, |
IN CONST UINTN | Count, | ||
IN CONST UINTN | ElementSize, | ||
IN PFN_IS_EQUAL | EqualTestFunction | ||
) |
Test and report if a duplicate entry exists in the given array of comparable elements.
[in] | Array | Array of elements to test for duplicates. |
[in] | Count | Number of elements in Array. |
[in] | ElementSize | Size of an element in bytes |
[in] | EqualTestFunction | The function to call to check if any two elements are equal. |
TRUE | A duplicate element was found or one of the input arguments is invalid. |
FALSE | Every element in Array is unique. |
Definition at line 299 of file TableHelper.c.
EFI_STATUS EFIAPI GetCgfMgrInfo | ( | IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST | CfgMgrProtocol, |
OUT CM_STD_OBJ_CONFIGURATION_MANAGER_INFO ** | CfgMfrInfo | ||
) |
The GetCgfMgrInfo function gets the CM_STD_OBJ_CONFIGURATION_MANAGER_INFO object from the Configuration Manager.
[in] | CfgMgrProtocol | Pointer to the Configuration Manager protocol interface. |
[out] | CfgMfrInfo | Pointer to the Configuration Manager Info object structure. |
EFI_SUCCESS | The object is returned. |
EFI_INVALID_PARAMETER | The Object ID is invalid. |
EFI_NOT_FOUND | The requested Object is not found. |
EFI_BAD_BUFFER_SIZE | The size returned by the Configuration Manager is less than the Object size. |
Definition at line 38 of file TableHelper.c.