/** @file\r
\r
- Copyright (c) 2017 - 2019, ARM Limited. All rights reserved.\r
+ Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.<BR>\r
\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ @par Glossary:\r
+ - PFN - Pointer to a Function\r
\r
**/\r
\r
IN CONST UINT32 Length\r
);\r
\r
+/**\r
+ Function prototype for testing if two arbitrary objects are equal.\r
+\r
+ @param [in] Object1 Pointer to the first object to compare.\r
+ @param [in] Object2 Pointer to the second object to compare.\r
+ @param [in] Index1 Index of Object1. This value is optional and\r
+ can be ignored by the specified implementation.\r
+ @param [in] Index2 Index of Object2. This value is optional and\r
+ can be ignored by the specified implementation.\r
+\r
+ @retval TRUE Object1 and Object2 are equal.\r
+ @retval FALSE Object1 and Object2 are NOT equal.\r
+**/\r
+typedef\r
+BOOLEAN\r
+(EFIAPI *PFN_IS_EQUAL)(\r
+ IN CONST VOID * Object1,\r
+ IN CONST VOID * Object2,\r
+ IN UINTN Index1 OPTIONAL,\r
+ IN UINTN Index2 OPTIONAL\r
+ );\r
+\r
+/**\r
+ Test and report if a duplicate entry exists in the given array of comparable\r
+ elements.\r
+\r
+ @param [in] Array Array of elements to test for duplicates.\r
+ @param [in] Count Number of elements in Array.\r
+ @param [in] ElementSize Size of an element in bytes\r
+ @param [in] EqualTestFunction The function to call to check if any two\r
+ elements are equal.\r
+\r
+ @retval TRUE A duplicate element was found or one of\r
+ the input arguments is invalid.\r
+ @retval FALSE Every element in Array is unique.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+FindDuplicateValue (\r
+ IN CONST VOID * Array,\r
+ IN CONST UINTN Count,\r
+ IN CONST UINTN ElementSize,\r
+ IN PFN_IS_EQUAL EqualTestFunction\r
+ );\r
+\r
+/** Parse and print a CmObjDesc.\r
+\r
+ @param [in] CmObjDesc The CmObjDesc to parse and print.\r
+**/\r
+VOID\r
+EFIAPI\r
+ParseCmObjDesc (\r
+ IN CONST CM_OBJ_DESCRIPTOR * CmObjDesc\r
+ );\r
+\r
#endif // TABLE_HELPER_LIB_H_\r