summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Noh <Phil.Noh@amd.com>2025-03-13 11:13:52 -0500
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-03-14 15:20:24 +0000
commitf47d897f93f1f67d57ca0877daf3f1663823847a (patch)
tree291392bde16060d75bad28aba54b51f67f93055a
parent9ac1704af6645da45d20fb545294e308ef9c887e (diff)
downloadedk2-f47d897f93f1f67d57ca0877daf3f1663823847a.zip
edk2-f47d897f93f1f67d57ca0877daf3f1663823847a.tar.gz
edk2-f47d897f93f1f67d57ca0877daf3f1663823847a.tar.bz2
UnitTestFrameworkPkg: Avoid duplicate library function names
There are duplicate library function names between 2 Unit Test libraries (UnitTestPeiServicesTablePointerLib and UnitTestUefiBootServicesTableLib). There are 3 functions (UnitTestAllocatePages, UnitTestAllocatePool and UnitTestFreePage). This update avoids the duplication and prevents a build error when building a Unit Test application that links the libraries based on UnitTestFrameworkPkg. Signed-off-by: Phil Noh <Phil.Noh@amd.com>
-rw-r--r--UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.c6
-rw-r--r--UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.h6
-rw-r--r--UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLibMisc.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.c b/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.c
index a1b982f..e560bbe 100644
--- a/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.c
+++ b/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.c
@@ -37,8 +37,8 @@ EFI_PEI_SERVICES mPeiServices = {
UnitTestFfsFindSectionData, // FfsFindSectionData
UnitTestInstallPeiMemory, // InstallPeiMemory
- UnitTestAllocatePages, // AllocatePages
- UnitTestAllocatePool, // AllocatePool
+ UnitTestPeiAllocatePages, // AllocatePages
+ UnitTestPeiAllocatePool, // AllocatePool
(EFI_PEI_COPY_MEM)CopyMem,
(EFI_PEI_SET_MEM)SetMem,
@@ -55,7 +55,7 @@ EFI_PEI_SERVICES mPeiServices = {
UnitTestFfsFindSectionData3, // FfsFindSectionData3
UnitTestFfsGetFileInfo2, // FfsGetFileInfo2
UnitTestResetSystem2, // ResetSystem2
- UnitTestFreePages, // FreePages
+ UnitTestPeiFreePages, // FreePages
};
PEI_CORE_INSTANCE mPrivateData;
diff --git a/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.h b/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.h
index e411d08..3f41e43 100644
--- a/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.h
+++ b/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.h
@@ -430,7 +430,7 @@ UnitTestInstallPeiMemory (
**/
EFI_STATUS
EFIAPI
-UnitTestAllocatePages (
+UnitTestPeiAllocatePages (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
@@ -455,7 +455,7 @@ UnitTestAllocatePages (
**/
EFI_STATUS
EFIAPI
-UnitTestAllocatePool (
+UnitTestPeiAllocatePool (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN Size,
OUT VOID **Buffer
@@ -644,7 +644,7 @@ Frees memory pages.
**/
EFI_STATUS
EFIAPI
-UnitTestFreePages (
+UnitTestPeiFreePages (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PHYSICAL_ADDRESS Memory,
IN UINTN Pages
diff --git a/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLibMisc.c b/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLibMisc.c
index 90955bf..938998e 100644
--- a/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLibMisc.c
+++ b/UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLibMisc.c
@@ -176,7 +176,7 @@ UnitTestInstallPeiMemory (
**/
EFI_STATUS
EFIAPI
-UnitTestAllocatePages (
+UnitTestPeiAllocatePages (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
@@ -204,7 +204,7 @@ UnitTestAllocatePages (
**/
EFI_STATUS
EFIAPI
-UnitTestAllocatePool (
+UnitTestPeiAllocatePool (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN Size,
OUT VOID **Buffer
@@ -420,7 +420,7 @@ Frees memory pages.
**/
EFI_STATUS
EFIAPI
-UnitTestFreePages (
+UnitTestPeiFreePages (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PHYSICAL_ADDRESS Memory,
IN UINTN Pages