28 UINTN NumberOfProcessors;
29 UINTN NumberOfEnabledProcessors;
30 UINTN NumberOfDisabledAPs;
31 UINTN IndexOfDisabledAPs;
33 UINTN ProcessorNumber;
39 if (LocalContext->MpServices.Ppi !=
NULL) {
40 return UNIT_TEST_PASSED;
48 DEBUG ((DEBUG_INFO,
"%a: BspNumber = 0x%x\n", __func__, BspNumber));
51 LocalContext->MpServices,
53 &NumberOfEnabledProcessors
58 "%a: NumberOfProcessors = 0x%x, NumberOfEnabledProcessors = 0x%x\n",
61 NumberOfEnabledProcessors
64 LocalContext->BspNumber = BspNumber;
65 LocalContext->NumberOfProcessors = NumberOfProcessors;
66 LocalContext->NumberOfEnabledProcessors = NumberOfEnabledProcessors;
71 NumberOfDisabledAPs = NumberOfProcessors - NumberOfEnabledProcessors;
72 if ((NumberOfDisabledAPs > 0) && (LocalContext->DisabledApNumber ==
NULL)) {
75 ZeroMem (LocalContext->DisabledApNumber, NumberOfDisabledAPs * sizeof (*LocalContext->DisabledApNumber));
77 for (ProcessorNumber = 0, IndexOfDisabledAPs = 0; ProcessorNumber < LocalContext->NumberOfProcessors; ProcessorNumber++) {
79 LocalContext->MpServices,
89 LocalContext->DisabledApNumber[IndexOfDisabledAPs] = ProcessorNumber;
92 DEBUG ((DEBUG_INFO,
"%a: AP(0x%x) is disabled and temporarily enable it.\n", __func__, ProcessorNumber));
94 LocalContext->MpServices,
106 return UNIT_TEST_PASSED;
122 UINTN NumberOfProcessors;
123 UINTN NumberOfEnabledProcessors;
125 UINTN ProcessorNumber;
130 ASSERT (LocalContext->MpServices.Ppi !=
NULL);
135 if (BspNumber != LocalContext->BspNumber) {
136 LocalContext->BspNumber = BspNumber;
137 DEBUG ((DEBUG_INFO,
"%a: New BspNumber = 0x%x\n", __func__, BspNumber));
140 ASSERT (BspNumber == LocalContext->BspNumber);
143 LocalContext->MpServices,
145 &NumberOfEnabledProcessors
149 if (NumberOfProcessors != LocalContext->NumberOfProcessors) {
150 LocalContext->NumberOfProcessors = NumberOfProcessors;
151 DEBUG ((DEBUG_INFO,
"%a: New NumberOfProcessors = 0x%x\n", __func__, NumberOfProcessors));
154 if (NumberOfEnabledProcessors != LocalContext->NumberOfProcessors) {
155 DEBUG ((DEBUG_INFO,
"%a: New NumberOfEnabledProcessors = 0x%x\n", __func__, NumberOfEnabledProcessors));
157 for (ProcessorNumber = 0; ProcessorNumber < LocalContext->NumberOfProcessors; ProcessorNumber++) {
159 LocalContext->MpServices,
166 DEBUG ((DEBUG_INFO,
"%a: AP(0x%x) is disabled unexpectedly and reenable it.\n", __func__, ProcessorNumber));
168 LocalContext->MpServices,
192 UINTN NumberOfDisabledAPs;
193 UINTN IndexOfDisabledAPs;
199 ASSERT (LocalContext->MpServices.Ppi !=
NULL);
201 if (LocalContext->DisabledApNumber !=
NULL) {
202 NumberOfDisabledAPs = LocalContext->NumberOfProcessors - LocalContext->NumberOfEnabledProcessors;
203 for (IndexOfDisabledAPs = 0; IndexOfDisabledAPs < NumberOfDisabledAPs; IndexOfDisabledAPs++) {
206 "%a: Disable AP(0x%x) to restore its state.\n",
208 LocalContext->DisabledApNumber[IndexOfDisabledAPs]
212 LocalContext->MpServices,
213 LocalContext->DisabledApNumber[IndexOfDisabledAPs],
220 FreePages (LocalContext->DisabledApNumber,
EFI_SIZE_TO_PAGES (NumberOfDisabledAPs *
sizeof (*LocalContext->DisabledApNumber)));
223 if (LocalContext->CommonBuffer !=
NULL) {
224 FreePages (LocalContext->CommonBuffer,
EFI_SIZE_TO_PAGES (LocalContext->NumberOfProcessors * sizeof (*LocalContext->CommonBuffer)));
239 UINTN ProcessorNumber;
252 if (ProcessorNumber < LocalContext->NumberOfProcessors) {
253 LocalContext->CommonBuffer[ProcessorNumber] = ProcessorNumber;
268 UINTN ProcessorNumber;
282 ApCounter = &(LocalContext->CommonBuffer[LocalContext->NumberOfProcessors - 1]);
283 LocalContext->CommonBuffer[*ApCounter] = ProcessorNumber;
297 volatile BOOLEAN InfiniteLoop;
301 while (InfiniteLoop) {
327 UINTN NumberOfProcessors;
328 UINTN NumberOfEnabledProcessors;
334 LocalContext->MpServices,
336 &NumberOfEnabledProcessors
356 LocalContext->MpServices,
357 LocalContext->ApNumber,
377 LocalContext->MpServices,
378 LocalContext->ApNumber,
399 LocalContext->MpServices,
401 LocalContext->ApNumber,
422 LocalContext->MpServices,
445 LocalContext->MpServices,
446 LocalContext->ApNumber,
469 UINTN ProcessorNumber;
470 UINTN ProcessorIndex;
476 LocalContext->MpServices,
480 UT_ASSERT_TRUE (ProcessorNumber < LocalContext->NumberOfProcessors);
482 SetMem (LocalContext->CommonBuffer, LocalContext->NumberOfProcessors * sizeof (*LocalContext->CommonBuffer), 0xFF);
483 LocalContext->CommonBuffer[ProcessorNumber] = ProcessorNumber;
486 LocalContext->MpServices,
499 for (ProcessorIndex = 0; ProcessorIndex < LocalContext->NumberOfProcessors; ProcessorIndex++) {
500 UT_ASSERT_TRUE (LocalContext->CommonBuffer[ProcessorIndex] == ProcessorIndex);
503 return UNIT_TEST_PASSED;
523 UINTN NumberOfProcessors;
524 UINTN NumberOfEnabledProcessors;
530 LocalContext->MpServices,
532 &NumberOfEnabledProcessors
535 UT_ASSERT_TRUE (NumberOfProcessors > 0 && NumberOfProcessors >= NumberOfEnabledProcessors);
537 return UNIT_TEST_PASSED;
562 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
563 LocalContext->ApNumber = ApNumber;
565 LocalContext->MpServices,
572 if (ApNumber == LocalContext->BspNumber) {
580 return UNIT_TEST_PASSED;
601 UINTN NumberOfProcessors;
602 UINTN NumberOfEnabledProcessors;
607 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
609 LocalContext->MpServices,
615 if (ApNumber == LocalContext->BspNumber) {
621 LocalContext->MpServices,
623 &NumberOfEnabledProcessors
626 UT_ASSERT_TRUE (NumberOfProcessors == LocalContext->NumberOfProcessors);
628 if (ApNumber < LocalContext->BspNumber) {
629 UT_ASSERT_TRUE (NumberOfEnabledProcessors == LocalContext->NumberOfProcessors - (ApNumber + 1));
631 UT_ASSERT_TRUE (NumberOfEnabledProcessors == LocalContext->NumberOfProcessors - ApNumber);
636 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
638 LocalContext->MpServices,
644 if (ApNumber == LocalContext->BspNumber) {
650 LocalContext->MpServices,
652 &NumberOfEnabledProcessors
655 UT_ASSERT_TRUE (NumberOfProcessors == LocalContext->NumberOfProcessors);
657 if (ApNumber < LocalContext->BspNumber) {
665 return UNIT_TEST_PASSED;
687 UINTN ProcessorNumber;
693 for (ProcessorNumber = 0; ProcessorNumber <= LocalContext->NumberOfProcessors; ProcessorNumber++) {
695 LocalContext->MpServices,
700 if (ProcessorNumber == LocalContext->NumberOfProcessors) {
706 if (ProcessorNumber == LocalContext->BspNumber) {
714 return UNIT_TEST_PASSED;
739 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
740 LocalContext->ApNumber = ApNumber;
742 LocalContext->MpServices,
749 if (ApNumber == LocalContext->BspNumber) {
757 return UNIT_TEST_PASSED;
784 for (ApNumber = 0; ApNumber <= LocalContext->NumberOfProcessors; ApNumber++) {
786 LocalContext->MpServices,
792 if (ApNumber == LocalContext->BspNumber) {
794 }
else if (ApNumber == LocalContext->NumberOfProcessors) {
800 LocalContext->MpServices,
809 LocalContext->MpServices,
817 LocalContext->MpServices,
827 return UNIT_TEST_PASSED;
852 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
853 LocalContext->ApNumber = ApNumber;
855 LocalContext->MpServices,
862 if (ApNumber == LocalContext->BspNumber) {
870 return UNIT_TEST_PASSED;
892 UINT32 OldHealthFlag;
893 UINT32 NewHealthFlag;
898 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
900 LocalContext->MpServices,
909 LocalContext->MpServices,
915 if (ApNumber == LocalContext->BspNumber) {
921 LocalContext->MpServices,
929 LocalContext->MpServices,
938 return UNIT_TEST_PASSED;
961 UINTN ProcessorIndex;
966 for (ApNumber = 0; ApNumber <= LocalContext->NumberOfProcessors; ApNumber++) {
967 SetMem (LocalContext->CommonBuffer, LocalContext->NumberOfProcessors * sizeof (*LocalContext->CommonBuffer), 0xFF);
969 LocalContext->MpServices,
976 if (ApNumber == LocalContext->BspNumber) {
978 }
else if (ApNumber == LocalContext->NumberOfProcessors) {
983 for (ProcessorIndex = 0; ProcessorIndex < LocalContext->NumberOfProcessors; ProcessorIndex++) {
985 ((ProcessorIndex == ApNumber) && (LocalContext->CommonBuffer[ProcessorIndex] == ProcessorIndex)) ||
986 ((ProcessorIndex != ApNumber) && (LocalContext->CommonBuffer[ProcessorIndex] == (
UINTN) ~0))
992 return UNIT_TEST_PASSED;
1017 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
1018 LocalContext->ApNumber = ApNumber;
1020 LocalContext->MpServices,
1024 (VOID *)LocalContext
1027 if (ApNumber == LocalContext->BspNumber) {
1035 return UNIT_TEST_PASSED;
1060 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
1062 LocalContext->MpServices,
1065 RUN_PROCEDURE_TIMEOUT_VALUE,
1069 if (ApNumber == LocalContext->BspNumber) {
1076 return UNIT_TEST_PASSED;
1101 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
1103 LocalContext->MpServices,
1109 if (ApNumber == LocalContext->BspNumber) {
1115 LocalContext->MpServices,
1124 LocalContext->MpServices,
1132 LocalContext->MpServices,
1142 return UNIT_TEST_PASSED;
1162 UINTN ProcessorIndex;
1167 SetMem (LocalContext->CommonBuffer, LocalContext->NumberOfProcessors * sizeof (*LocalContext->CommonBuffer), 0xFF);
1169 LocalContext->MpServices,
1173 (VOID *)LocalContext
1177 for (ProcessorIndex = 0; ProcessorIndex < LocalContext->NumberOfProcessors; ProcessorIndex++) {
1179 ((ProcessorIndex == LocalContext->BspNumber) && (LocalContext->CommonBuffer[ProcessorIndex] == (
UINTN) ~0)) ||
1180 ((ProcessorIndex != LocalContext->BspNumber) && (LocalContext->CommonBuffer[ProcessorIndex] == ProcessorIndex))
1184 return UNIT_TEST_PASSED;
1205 UINTN ProcessorIndex;
1210 ZeroMem (LocalContext->CommonBuffer, LocalContext->NumberOfProcessors * sizeof (*LocalContext->CommonBuffer));
1212 LocalContext->MpServices,
1216 (VOID *)LocalContext
1225 for (ProcessorIndex = 0; ProcessorIndex < LocalContext->NumberOfProcessors - 2; ProcessorIndex++) {
1226 UT_ASSERT_TRUE (LocalContext->CommonBuffer[ProcessorIndex] < LocalContext->CommonBuffer[ProcessorIndex + 1]);
1229 UT_ASSERT_EQUAL (LocalContext->CommonBuffer[LocalContext->NumberOfProcessors - 1], LocalContext->NumberOfProcessors - 1);
1231 return UNIT_TEST_PASSED;
1256 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
1257 LocalContext->ApNumber = ApNumber;
1259 LocalContext->MpServices,
1263 (VOID *)LocalContext
1266 if (ApNumber == LocalContext->BspNumber) {
1274 return UNIT_TEST_PASSED;
1299 LocalContext->MpServices,
1302 RUN_PROCEDURE_TIMEOUT_VALUE,
1308 LocalContext->MpServices,
1311 RUN_PROCEDURE_TIMEOUT_VALUE,
1316 return UNIT_TEST_PASSED;
1341 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
1343 LocalContext->MpServices,
1349 if (ApNumber == LocalContext->BspNumber) {
1357 LocalContext->MpServices,
1365 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
1367 LocalContext->MpServices,
1373 if (ApNumber == LocalContext->BspNumber) {
1380 return UNIT_TEST_PASSED;
1403 UINTN ProcessorIndex;
1408 for (NewBspNumber = 0; NewBspNumber <= LocalContext->NumberOfProcessors; NewBspNumber++) {
1410 LocalContext->MpServices,
1415 if (NewBspNumber == LocalContext->BspNumber) {
1417 }
else if (NewBspNumber == LocalContext->NumberOfProcessors) {
1422 SetMem (LocalContext->CommonBuffer, LocalContext->NumberOfProcessors * sizeof (*LocalContext->CommonBuffer), 0xFF);
1424 LocalContext->MpServices,
1428 (VOID *)LocalContext
1432 for (ProcessorIndex = 0; ProcessorIndex < LocalContext->NumberOfProcessors; ProcessorIndex++) {
1434 ((ProcessorIndex == NewBspNumber) && (LocalContext->CommonBuffer[ProcessorIndex] == (
UINTN) ~0)) ||
1435 ((ProcessorIndex != NewBspNumber) && (LocalContext->CommonBuffer[ProcessorIndex] == ProcessorIndex))
1440 LocalContext->MpServices,
1441 LocalContext->BspNumber,
1448 return UNIT_TEST_PASSED;
1473 for (ApNumber = 0; ApNumber < LocalContext->NumberOfProcessors; ApNumber++) {
1474 LocalContext->ApNumber = ApNumber;
1476 LocalContext->MpServices,
1480 (VOID *)LocalContext
1483 if (ApNumber == LocalContext->BspNumber) {
1491 return UNIT_TEST_PASSED;
1516 for (NewBspNumber = 0; NewBspNumber < LocalContext->NumberOfProcessors; NewBspNumber++) {
1518 LocalContext->MpServices,
1524 if (NewBspNumber == LocalContext->BspNumber) {
1530 LocalContext->MpServices,
1537 LocalContext->MpServices,
1546 return UNIT_TEST_PASSED;
1575 for (NewBspNumber = 0; NewBspNumber < LocalContext->NumberOfProcessors; NewBspNumber++) {
1577 LocalContext->MpServices,
1582 if (NewBspNumber == LocalContext->BspNumber) {
1588 LocalContext->MpServices,
1590 &ProcessorInfoBuffer
1599 LocalContext->MpServices,
1600 LocalContext->BspNumber,
1601 &ProcessorInfoBuffer
1610 LocalContext->MpServices,
1611 LocalContext->BspNumber,
1618 LocalContext->MpServices,
1619 LocalContext->BspNumber,
1625 LocalContext->MpServices,
1626 LocalContext->BspNumber,
1627 &ProcessorInfoBuffer
1636 LocalContext->MpServices,
1638 &ProcessorInfoBuffer
1648 return UNIT_TEST_PASSED;
1662 IN UNIT_TEST_FRAMEWORK_HANDLE Framework,
1667 UNIT_TEST_SUITE_HANDLE MpServiceWhoAmITestSuite;
1668 UNIT_TEST_SUITE_HANDLE MpServiceGetNumberOfProcessorsTestSuite;
1669 UNIT_TEST_SUITE_HANDLE MpServiceGetProcessorInfoTestSuite;
1670 UNIT_TEST_SUITE_HANDLE MpServiceEnableDisableAPTestSuite;
1671 UNIT_TEST_SUITE_HANDLE MpServiceStartupThisAPTestSuite;
1672 UNIT_TEST_SUITE_HANDLE MpServiceStartupAllAPsTestSuite;
1673 UNIT_TEST_SUITE_HANDLE MpServiceSwitchBSPTestSuite;
1675 MpServiceWhoAmITestSuite =
NULL;
1676 MpServiceGetNumberOfProcessorsTestSuite =
NULL;
1677 MpServiceGetProcessorInfoTestSuite =
NULL;
1678 MpServiceEnableDisableAPTestSuite =
NULL;
1679 MpServiceStartupThisAPTestSuite =
NULL;
1680 MpServiceStartupAllAPsTestSuite =
NULL;
1681 MpServiceSwitchBSPTestSuite =
NULL;
1686 Status =
CreateUnitTestSuite (&MpServiceWhoAmITestSuite, Framework,
"Identify the currently executing processor",
"MpServices.WhoAmI",
NULL,
NULL);
1687 if (EFI_ERROR (Status)) {
1688 DEBUG ((DEBUG_ERROR,
"Failed in CreateUnitTestSuite for MpServiceWhoAmI Test Suite\n"));
1697 Status =
CreateUnitTestSuite (&MpServiceGetNumberOfProcessorsTestSuite, Framework,
"Retrieve the number of logical processor",
"MpServices.GetNumberOfProcessors",
NULL,
NULL);
1698 if (EFI_ERROR (Status)) {
1699 DEBUG ((DEBUG_ERROR,
"Failed in CreateUnitTestSuite for MpServiceGetNumberOfProcessors Test Suite\n"));
1710 Status =
CreateUnitTestSuite (&MpServiceGetProcessorInfoTestSuite, Framework,
"Get detailed information on the requested logical processor",
"MpServices.GetProcessorInfo",
NULL,
NULL);
1711 if (EFI_ERROR (Status)) {
1712 DEBUG ((DEBUG_ERROR,
"Failed in CreateUnitTestSuite for MpServiceGetProcessorInfo Test Suite\n"));
1722 Status =
CreateUnitTestSuite (&MpServiceEnableDisableAPTestSuite, Framework,
"Caller enables or disables an AP from this point onward",
"MpServices.EnableDisableAP",
NULL,
NULL);
1723 if (EFI_ERROR (Status)) {
1724 DEBUG ((DEBUG_ERROR,
"Failed in CreateUnitTestSuite for MpServiceEnableDisableAP Test Suite\n"));
1735 Status =
CreateUnitTestSuite (&MpServiceStartupThisAPTestSuite, Framework,
"Get the requested AP to execute a caller-provided function",
"MpServices.StartupThisAP",
NULL,
NULL);
1736 if (EFI_ERROR (Status)) {
1737 DEBUG ((DEBUG_ERROR,
"Failed in CreateUnitTestSuite for MpServiceStartupThisAP Test Suite\n"));
1749 Status =
CreateUnitTestSuite (&MpServiceStartupAllAPsTestSuite, Framework,
"Execute a caller provided function on all enabled APs",
"MpServices.StartupAllAPs",
NULL,
NULL);
1750 if (EFI_ERROR (Status)) {
1751 DEBUG ((DEBUG_ERROR,
"Failed in CreateUnitTestSuite for MpServiceStartupAllAPs Test Suite\n"));
1764 Status =
CreateUnitTestSuite (&MpServiceSwitchBSPTestSuite, Framework,
"Switch the requested AP to be the BSP from that point onward",
"MpServices.SwitchBSP",
NULL,
NULL);
1765 if (EFI_ERROR (Status)) {
1766 DEBUG ((DEBUG_ERROR,
"Failed in CreateUnitTestSuite for MpServiceSwitchBSP Test Suite\n"));
VOID *EFIAPI SetMem(OUT VOID *Buffer, IN UINTN Length, IN UINT8 Value)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
EFI_STATUS MpServicesUnitTestWhoAmI(IN MP_SERVICES MpServices, OUT UINTN *ProcessorNumber)
EFI_STATUS MpServicesUnitTestStartupAllAPs(IN MP_SERVICES MpServices, IN EFI_AP_PROCEDURE Procedure, IN BOOLEAN SingleThread, IN UINTN TimeoutInMicroSeconds, IN VOID *ProcedureArgument)
EFI_STATUS MpServicesUnitTestGetNumberOfProcessors(IN MP_SERVICES MpServices, OUT UINTN *NumberOfProcessors, OUT UINTN *NumberOfEnabledProcessors)
EFI_STATUS MpServicesUnitTestStartupThisAP(IN MP_SERVICES MpServices, IN EFI_AP_PROCEDURE Procedure, IN UINTN ProcessorNumber, IN UINTN TimeoutInMicroSeconds, IN VOID *ProcedureArgument)
EFI_STATUS MpServicesUnitTestGetProcessorInfo(IN MP_SERVICES MpServices, IN UINTN ProcessorNumber, OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer)
EFI_STATUS MpServicesUnitTestEnableDisableAP(IN MP_SERVICES MpServices, IN UINTN ProcessorNumber, IN BOOLEAN EnableAP, IN UINT32 *HealthFlag)
EFI_STATUS MpServicesUnitTestSwitchBSP(IN MP_SERVICES MpServices, IN UINTN ProcessorNumber, IN BOOLEAN EnableOldBSP)
EFI_STATUS MpServicesUnitTestGetMpServices(OUT MP_SERVICES *MpServices)
EFI_STATUS AddCommonTestCase(IN UNIT_TEST_FRAMEWORK_HANDLE Framework, IN MP_SERVICE_UT_CONTEXT *Context)
VOID EFIAPI FreeUTContext(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestStartupThisAP3(IN UNIT_TEST_CONTEXT Context)
VOID RunMpServiceStartupThisAPOnAp(IN OUT VOID *Buffer)
UNIT_TEST_STATUS EFIAPI TestStartupAllAPs5(IN UNIT_TEST_CONTEXT Context)
VOID RunMpServiceEnableDisableAPOnAp(IN OUT VOID *Buffer)
VOID StoreCpuNumbers(IN OUT VOID *Buffer)
UNIT_TEST_STATUS EFIAPI TestGetProcessorInfo2(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestStartupThisAP4(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestEnableDisableAP3(IN UNIT_TEST_CONTEXT Context)
VOID RunMpServiceSwitchBSPOnAp(IN OUT VOID *Buffer)
VOID RunMpServiceStartupAllAPsOnAp(IN OUT VOID *Buffer)
UNIT_TEST_STATUS EFIAPI TestStartupAllAPs3(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestEnableDisableAP1(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestStartupThisAP2(IN UNIT_TEST_CONTEXT Context)
VOID EFIAPI CheckUTContext(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI InitUTContext(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestStartupAllAPs1(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestGetNumberOfProcessors2(IN UNIT_TEST_CONTEXT Context)
VOID InfiniteLoopProcedure(IN OUT VOID *Buffer)
UNIT_TEST_STATUS EFIAPI TestGetNumberOfProcessors1(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestStartupAllAPs2(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestSwitchBSP4(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestSwitchBSP3(IN UNIT_TEST_CONTEXT Context)
VOID StoreAPsExecutionOrder(IN OUT VOID *Buffer)
UNIT_TEST_STATUS EFIAPI TestStartupThisAP1(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestWhoAmI1(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestGetProcessorInfo1(IN UNIT_TEST_CONTEXT Context)
VOID EmptyProcedure(IN OUT VOID *Buffer)
UNIT_TEST_STATUS EFIAPI TestEnableDisableAP2(IN UNIT_TEST_CONTEXT Context)
VOID RunMpServiceGetProcessorInfoOnAp(IN OUT VOID *Buffer)
UNIT_TEST_STATUS EFIAPI TestStartupAllAPs4(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestSwitchBSP1(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestSwitchBSP2(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestGetNumberOfProcessors3(IN UNIT_TEST_CONTEXT Context)
VOID RunMpServiceGetNumberOfProcessorsOnAp(IN OUT VOID *Buffer)
VOID EFIAPI FreePages(IN VOID *Buffer, IN UINTN Pages)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PROCESSOR_HEALTH_STATUS_BIT
#define PROCESSOR_AS_BSP_BIT
#define PROCESSOR_ENABLED_BIT
VOID(EFIAPI * EFI_AP_PROCEDURE)(IN OUT VOID *Buffer)
VOID *EFIAPI AllocatePages(IN UINTN Pages)
#define EFI_SIZE_TO_PAGES(Size)
#define UT_ASSERT_NOT_NULL(Pointer)
#define UT_ASSERT_TRUE(Expression)
#define UT_ASSERT_EQUAL(ValueA, ValueB)
#define UT_ASSERT_STATUS_EQUAL(Status, Expected)
EFI_STATUS EFIAPI CreateUnitTestSuite(OUT UNIT_TEST_SUITE_HANDLE *SuiteHandle, IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle, IN CHAR8 *Title, IN CHAR8 *Name, IN UNIT_TEST_SUITE_SETUP Setup OPTIONAL, IN UNIT_TEST_SUITE_TEARDOWN Teardown OPTIONAL)
EFI_STATUS EFIAPI AddTestCase(IN UNIT_TEST_SUITE_HANDLE SuiteHandle, IN CHAR8 *Description, IN CHAR8 *Name, IN UNIT_TEST_FUNCTION Function, IN UNIT_TEST_PREREQUISITE Prerequisite OPTIONAL, IN UNIT_TEST_CLEANUP CleanUp OPTIONAL, IN UNIT_TEST_CONTEXT Context OPTIONAL)
#define UT_ASSERT_NOT_EFI_ERROR(Status)