3 Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
8 - PFN - Pointer to a Function
12 #ifndef TABLE_HELPER_LIB_H_
13 #define TABLE_HELPER_LIB_H_
15 /** The GetCgfMgrInfo function gets the CM_STD_OBJ_CONFIGURATION_MANAGER_INFO
16 object from the Configuration Manager.
18 @param [in] CfgMgrProtocol Pointer to the Configuration Manager protocol
20 @param [out] CfgMfrInfo Pointer to the Configuration Manager Info
23 @retval EFI_SUCCESS The object is returned.
24 @retval EFI_INVALID_PARAMETER The Object ID is invalid.
25 @retval EFI_NOT_FOUND The requested Object is not found.
26 @retval EFI_BAD_BUFFER_SIZE The size returned by the Configuration
27 Manager is less than the Object size.
32 IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL
* CONST CfgMgrProtocol
,
33 OUT CM_STD_OBJ_CONFIGURATION_MANAGER_INFO
** CfgMfrInfo
36 /** The AddAcpiHeader function updates the ACPI header structure. It uses the
37 ACPI table Generator and the Configuration Manager protocol to obtain the
38 information required for constructing the header.
40 @param [in] CfgMgrProtocol Pointer to the Configuration Manager
42 @param [in] Generator Pointer to the ACPI table Generator.
43 @param [in,out] AcpiHeader Pointer to the ACPI table header to be
45 @param [in] AcpiTableInfo Pointer to the ACPI table info structure.
46 @param [in] Length Length of the ACPI table.
48 @retval EFI_SUCCESS The ACPI table is updated successfully.
49 @retval EFI_INVALID_PARAMETER A parameter is invalid.
50 @retval EFI_NOT_FOUND The required object information is not found.
51 @retval EFI_BAD_BUFFER_SIZE The size returned by the Configuration
52 Manager is less than the Object size for the
58 IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL
* CONST CfgMgrProtocol
,
59 IN CONST ACPI_TABLE_GENERATOR
* CONST Generator
,
60 IN OUT EFI_ACPI_DESCRIPTION_HEADER
* CONST AcpiHeader
,
61 IN CONST CM_STD_OBJ_ACPI_TABLE_INFO
* CONST AcpiTableInfo
,
62 IN CONST UINT32 Length
66 Function prototype for testing if two arbitrary objects are equal.
68 @param [in] Object1 Pointer to the first object to compare.
69 @param [in] Object2 Pointer to the second object to compare.
70 @param [in] Index1 Index of Object1. This value is optional and
71 can be ignored by the specified implementation.
72 @param [in] Index2 Index of Object2. This value is optional and
73 can be ignored by the specified implementation.
75 @retval TRUE Object1 and Object2 are equal.
76 @retval FALSE Object1 and Object2 are NOT equal.
80 (EFIAPI
*PFN_IS_EQUAL
)(
81 IN CONST VOID
* Object1
,
82 IN CONST VOID
* Object2
,
83 IN UINTN Index1 OPTIONAL
,
84 IN UINTN Index2 OPTIONAL
88 Test and report if a duplicate entry exists in the given array of comparable
91 @param [in] Array Array of elements to test for duplicates.
92 @param [in] Count Number of elements in Array.
93 @param [in] ElementSize Size of an element in bytes
94 @param [in] EqualTestFunction The function to call to check if any two
97 @retval TRUE A duplicate element was found or one of
98 the input arguments is invalid.
99 @retval FALSE Every element in Array is unique.
104 IN CONST VOID
* Array
,
105 IN CONST UINTN Count
,
106 IN CONST UINTN ElementSize
,
107 IN PFN_IS_EQUAL EqualTestFunction
110 #endif // TABLE_HELPER_LIB_H_