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
# DXE driver that unit tests the EfiMpServiceProtocol
#
# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = EfiMpServiceProtocolDxeUnitTest
FILE_GUID = F1E468E2-A32D-4574-895D-6D82B27B08BC
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
ENTRY_POINT = DxeEntryPoint
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = IA32 X64
#
[Sources]
EfiMpServicesUnitTestCommom.c
EfiMpServicesUnitTestCommom.h
EfiMpServiceProtocolUnitTest.c
[Packages]
MdePkg/MdePkg.dec
UefiCpuPkg/UefiCpuPkg.dec
[LibraryClasses]
BaseLib
DebugLib
BaseMemoryLib
MemoryAllocationLib
UefiDriverEntryPoint
UefiBootServicesTableLib
UnitTestPersistenceLib
UnitTestLib
[Protocols]
gEfiMpServiceProtocolGuid ## CONSUMES
[Depex]
gEfiMpServiceProtocolGuid