UefiCpuPkg/Test: Add unit tests for MP service PPI and Protocol

The code changes add unit tests based on current UnitTestFramework.
EdkiiPeiMpServices2PpiPeiUnitTest PEI module is used to test
EdkiiPeiMpServices2Ppi and EfiMpServiceProtocolDxeUnitTest DXE driver is
used to test EfiMpServiceProtocol.

Signed-off-by: Jason Lou <yun.lou@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
This commit is contained in:
Jason Lou
2022-10-10 21:52:42 +08:00
committed by mergify[bot]
parent 6f1bb567aa
commit 9d6915ca91
7 changed files with 3218 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
## @file
# PEIM that unit tests the EdkiiPeiMpServices2Ppi
#
# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = EdkiiPeiMpServices2PpiPeiUnitTest
FILE_GUID = A4914810-4D1E-445E-BD6F-F6821B852B5D
MODULE_TYPE = PEIM
VERSION_STRING = 1.0
ENTRY_POINT = PeiEntryPoint
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64
#
[Sources]
EfiMpServicesUnitTestCommom.c
EfiMpServicesUnitTestCommom.h
EdkiiPeiMpServices2PpiUnitTest.c
[Packages]
MdePkg/MdePkg.dec
UefiCpuPkg/UefiCpuPkg.dec
[LibraryClasses]
BaseLib
DebugLib
BaseMemoryLib
MemoryAllocationLib
PeimEntryPoint
PeiServicesLib
UnitTestPersistenceLib
UnitTestLib
[Ppis]
gEdkiiPeiMpServices2PpiGuid ## CONSUMES
[Depex]
gEdkiiPeiMpServices2PpiGuid