EfiMpServicesUnitTestCommom.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. /** @file
  2. Common header file for EfiMpServiceProtocolUnitTest DXE driver.
  3. Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef EFI_MP_SERVICES_UNIT_TEST_COMMOM_H_
  7. #define EFI_MP_SERVICES_UNIT_TEST_COMMOM_H_
  8. #include <PiPei.h>
  9. #include <Ppi/MpServices2.h>
  10. #include <Protocol/MpService.h>
  11. #include <Library/BaseLib.h>
  12. #include <Library/DebugLib.h>
  13. #include <Library/ReportStatusCodeLib.h>
  14. #include <Library/BaseMemoryLib.h>
  15. #include <Library/MemoryAllocationLib.h>
  16. #include <Library/UnitTestLib.h>
  17. #define RUN_PROCEDURE_TIMEOUT_VALUE 100000 // microseconds
  18. typedef union {
  19. EDKII_PEI_MP_SERVICES2_PPI *Ppi;
  20. EFI_MP_SERVICES_PROTOCOL *Protocol;
  21. } MP_SERVICES;
  22. typedef struct {
  23. MP_SERVICES MpServices;
  24. UINTN BspNumber;
  25. UINTN ApNumber;
  26. UINTN NumberOfProcessors;
  27. UINTN NumberOfEnabledProcessors;
  28. UINTN *CommonBuffer;
  29. EFI_STATUS ApProcedureReturnStatus;
  30. UINTN *DisabledApNumber;
  31. } MP_SERVICE_UT_CONTEXT;
  32. /**
  33. Get EFI_MP_SERVICES_PROTOCOL pointer.
  34. @param[out] MpServices Pointer to the buffer where EFI_MP_SERVICES_PROTOCOL is stored
  35. @retval EFI_SUCCESS EFI_MP_SERVICES_PROTOCOL interface is returned
  36. @retval EFI_NOT_FOUND EFI_MP_SERVICES_PROTOCOL interface is not found
  37. **/
  38. EFI_STATUS
  39. MpServicesUnitTestGetMpServices (
  40. OUT MP_SERVICES *MpServices
  41. );
  42. /**
  43. Retrieve the number of logical processor in the platform and the number of those logical processors that
  44. are enabled on this boot.
  45. @param[in] MpServices MP_SERVICES structure.
  46. @param[out] NumberOfProcessors Pointer to the total number of logical processors in the system, including
  47. the BSP and disabled APs.
  48. @param[out] NumberOfEnabledProcessors Pointer to the number of processors in the system that are enabled.
  49. @retval EFI_SUCCESS Retrieve the number of logical processor successfully
  50. @retval Others Retrieve the number of logical processor unsuccessfully
  51. **/
  52. EFI_STATUS
  53. MpServicesUnitTestGetNumberOfProcessors (
  54. IN MP_SERVICES MpServices,
  55. OUT UINTN *NumberOfProcessors,
  56. OUT UINTN *NumberOfEnabledProcessors
  57. );
  58. /**
  59. Get detailed information on the requested logical processor.
  60. @param[in] MpServices MP_SERVICES structure.
  61. @param[in] ProcessorNumber The handle number of the processor.
  62. @param[out] ProcessorInfoBuffer Pointer to the buffer where the processor information is stored.
  63. @retval EFI_SUCCESS Get information on the requested logical processor successfully
  64. @retval Others Get information on the requested logical processor unsuccessfully
  65. **/
  66. EFI_STATUS
  67. MpServicesUnitTestGetProcessorInfo (
  68. IN MP_SERVICES MpServices,
  69. IN UINTN ProcessorNumber,
  70. OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer
  71. );
  72. /**
  73. Execute a caller provided function on all enabled APs.
  74. @param[in] MpServices MP_SERVICES structure.
  75. @param[in] Procedure Pointer to the function to be run on enabled APs of the system.
  76. @param[in] SingleThread If TRUE, then all the enabled APs execute the function specified by Procedure
  77. one by one, in ascending order of processor handle number.
  78. If FALSE, then all the enabled APs execute the function specified by Procedure
  79. simultaneously.
  80. @param[in] TimeoutInMicroSeconds Indicates the time limit in microseconds for APs to return from Procedure,
  81. for blocking mode only. Zero means infinity.
  82. @param[in] ProcedureArgument The parameter passed into Procedure for all APs.
  83. @retval EFI_SUCCESS Execute a caller provided function on all enabled APs successfully
  84. @retval Others Execute a caller provided function on all enabled APs unsuccessfully
  85. **/
  86. EFI_STATUS
  87. MpServicesUnitTestStartupAllAPs (
  88. IN MP_SERVICES MpServices,
  89. IN EFI_AP_PROCEDURE Procedure,
  90. IN BOOLEAN SingleThread,
  91. IN UINTN TimeoutInMicroSeconds,
  92. IN VOID *ProcedureArgument
  93. );
  94. /**
  95. Caller gets one enabled AP to execute a caller-provided function.
  96. @param[in] MpServices MP_SERVICES structure.
  97. @param[in] Procedure Pointer to the function to be run on enabled APs of the system.
  98. @param[in] ProcessorNumber The handle number of the AP.
  99. @param[in] TimeoutInMicroSeconds Indicates the time limit in microseconds for APs to return from Procedure,
  100. for blocking mode only. Zero means infinity.
  101. @param[in] ProcedureArgument The parameter passed into Procedure for all APs.
  102. @retval EFI_SUCCESS Caller gets one enabled AP to execute a caller-provided function successfully
  103. @retval Others Caller gets one enabled AP to execute a caller-provided function unsuccessfully
  104. **/
  105. EFI_STATUS
  106. MpServicesUnitTestStartupThisAP (
  107. IN MP_SERVICES MpServices,
  108. IN EFI_AP_PROCEDURE Procedure,
  109. IN UINTN ProcessorNumber,
  110. IN UINTN TimeoutInMicroSeconds,
  111. IN VOID *ProcedureArgument
  112. );
  113. /**
  114. Switch the requested AP to be the BSP from that point onward.
  115. @param[in] MpServices MP_SERVICES structure.
  116. @param[in] ProcessorNumber The handle number of AP that is to become the new BSP.
  117. @param[in] EnableOldBSP If TRUE, the old BSP will be listed as an enabled AP. Otherwise, it will be disabled.
  118. @retval EFI_SUCCESS Switch the requested AP to be the BSP successfully
  119. @retval Others Switch the requested AP to be the BSP unsuccessfully
  120. **/
  121. EFI_STATUS
  122. MpServicesUnitTestSwitchBSP (
  123. IN MP_SERVICES MpServices,
  124. IN UINTN ProcessorNumber,
  125. IN BOOLEAN EnableOldBSP
  126. );
  127. /**
  128. Caller enables or disables an AP from this point onward.
  129. @param[in] MpServices MP_SERVICES structure.
  130. @param[in] ProcessorNumber The handle number of the AP.
  131. @param[in] EnableAP Specifies the new state for the processor for enabled, FALSE for disabled.
  132. @param[in] HealthFlag If not NULL, a pointer to a value that specifies the new health status of the AP.
  133. @retval EFI_SUCCESS Caller enables or disables an AP successfully.
  134. @retval Others Caller enables or disables an AP unsuccessfully.
  135. **/
  136. EFI_STATUS
  137. MpServicesUnitTestEnableDisableAP (
  138. IN MP_SERVICES MpServices,
  139. IN UINTN ProcessorNumber,
  140. IN BOOLEAN EnableAP,
  141. IN UINT32 *HealthFlag
  142. );
  143. /**
  144. Get the handle number for the calling processor.
  145. @param[in] MpServices MP_SERVICES structure.
  146. @param[out] ProcessorNumber The handle number for the calling processor.
  147. @retval EFI_SUCCESS Get the handle number for the calling processor successfully.
  148. @retval Others Get the handle number for the calling processor unsuccessfully.
  149. **/
  150. EFI_STATUS
  151. MpServicesUnitTestWhoAmI (
  152. IN MP_SERVICES MpServices,
  153. OUT UINTN *ProcessorNumber
  154. );
  155. /**
  156. Empty procedure to be run on specified CPU.
  157. @param[in,out] Buffer The pointer to private data buffer.
  158. **/
  159. VOID
  160. EmptyProcedure (
  161. IN OUT VOID *Buffer
  162. );
  163. /**
  164. Produce to store ProcessorNumber in CommonBuffer and be run on specified CPU.
  165. @param[in,out] Buffer The pointer to private data buffer.
  166. **/
  167. VOID
  168. StoreCpuNumbers (
  169. IN OUT VOID *Buffer
  170. );
  171. /**
  172. Prep routine for Unit test function.
  173. To save the ProcessorNumber of disabled AP and temporarily enable it.
  174. @param[in] Context Context pointer for this test.
  175. @retval UNIT_TEST_PASSED Prep routine runs successful.
  176. @retval UNIT_TEST_ERROR_TEST_FAILED Prep routine runs unsuccessful.
  177. **/
  178. UNIT_TEST_STATUS
  179. EFIAPI
  180. InitUTContext (
  181. IN UNIT_TEST_CONTEXT Context
  182. );
  183. /**
  184. Cleanup routine for Unit test function.
  185. If any processor is disabled unexpectedly then reenable it.
  186. @param[in] Context Context pointer for this test.
  187. **/
  188. VOID
  189. EFIAPI
  190. CheckUTContext (
  191. IN UNIT_TEST_CONTEXT Context
  192. );
  193. /**
  194. Cleanup routine for Unit test function.
  195. It will be called by the last "AddTestCase" to restore AP state and free pointer.
  196. @param[in] Context Context pointer for this test.
  197. **/
  198. VOID
  199. EFIAPI
  200. FreeUTContext (
  201. IN UNIT_TEST_CONTEXT Context
  202. );
  203. /**
  204. Unit test of MP service WhoAmI.
  205. The range of ProcessorNumber should be from 0 to NumberOfCPUs minus 1.
  206. The ProcessorNumbers of all CPUs are unique.
  207. @param[in] Context Context pointer for this test.
  208. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  209. case was successful.
  210. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  211. **/
  212. UNIT_TEST_STATUS
  213. EFIAPI
  214. TestWhoAmI1 (
  215. IN UNIT_TEST_CONTEXT Context
  216. );
  217. /**
  218. Unit test of MP service GetNumberOfProcessors.
  219. NumberOfProcessors should be greater that 0 and not less than NumberOfEnabledProcessors.
  220. @param[in] Context Context pointer for this test.
  221. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  222. case was successful.
  223. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  224. **/
  225. UNIT_TEST_STATUS
  226. EFIAPI
  227. TestGetNumberOfProcessors1 (
  228. IN UNIT_TEST_CONTEXT Context
  229. );
  230. /**
  231. Unit test of MP service GetNumberOfProcessors.
  232. When this service is called from an AP, the return status should be EFI_DEVICE_ERROR.
  233. @param[in] Context Context pointer for this test.
  234. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  235. case was successful.
  236. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  237. **/
  238. UNIT_TEST_STATUS
  239. EFIAPI
  240. TestGetNumberOfProcessors2 (
  241. IN UNIT_TEST_CONTEXT Context
  242. );
  243. /**
  244. Unit test of MP service GetNumberOfProcessors.
  245. Call EnableDisableAP() to change the number of enabled AP.
  246. @param[in] Context Context pointer for this test.
  247. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  248. case was successful.
  249. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  250. **/
  251. UNIT_TEST_STATUS
  252. EFIAPI
  253. TestGetNumberOfProcessors3 (
  254. IN UNIT_TEST_CONTEXT Context
  255. );
  256. /**
  257. Unit test of MP service GetProcessorInfo.
  258. When all the parameters are valid, all reserved bits of StatusFlag in ProcessorInfoBuffer should be set to zero.
  259. When all the parameters are valid, the StatusFlag should not have an invalid value (The BSP can never be in the disabled state.).
  260. When called with nonexistent processor handle, the return status should be EFI_NOT_FOUND.
  261. @param[in] Context Context pointer for this test.
  262. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  263. case was successful.
  264. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  265. **/
  266. UNIT_TEST_STATUS
  267. EFIAPI
  268. TestGetProcessorInfo1 (
  269. IN UNIT_TEST_CONTEXT Context
  270. );
  271. /**
  272. Unit test of MP service GetProcessorInfo.
  273. When this service is called from an AP, the return status should be EFI_DEVICE_ERROR.
  274. @param[in] Context Context pointer for this test.
  275. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  276. case was successful.
  277. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  278. **/
  279. UNIT_TEST_STATUS
  280. EFIAPI
  281. TestGetProcessorInfo2 (
  282. IN UNIT_TEST_CONTEXT Context
  283. );
  284. /**
  285. Unit test of MP service EnableDisableAP.
  286. When called with BSP number, the return status should be EFI_INVALID_PARAMETER.
  287. When called with a nonexistent processor handle, the return status should be EFI_NOT_FOUND.
  288. The AP should be really Enable/Disabled.
  289. @param[in] Context Context pointer for this test.
  290. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  291. case was successful.
  292. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  293. **/
  294. UNIT_TEST_STATUS
  295. EFIAPI
  296. TestEnableDisableAP1 (
  297. IN UNIT_TEST_CONTEXT Context
  298. );
  299. /**
  300. Unit test of MP service EnableDisableAP.
  301. When run this procedure on AP, the return status should be EFI_DEVICE_ERROR.
  302. @param[in] Context Context pointer for this test.
  303. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  304. case was successful.
  305. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  306. **/
  307. UNIT_TEST_STATUS
  308. EFIAPI
  309. TestEnableDisableAP2 (
  310. IN UNIT_TEST_CONTEXT Context
  311. );
  312. /**
  313. Unit test of MP service EnableDisableAP.
  314. When run this procedure on AP, the return status should be EFI_DEVICE_ERROR.
  315. @param[in] Context Context pointer for this test.
  316. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  317. case was successful.
  318. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  319. **/
  320. UNIT_TEST_STATUS
  321. EFIAPI
  322. TestEnableDisableAP3 (
  323. IN UNIT_TEST_CONTEXT Context
  324. );
  325. /**
  326. Unit test of MP service StartupThisAP.
  327. When called to startup a BSP, the return status should be EFI_INVALID_PARAMETER.
  328. When called with a nonexistent processor handle, the return status should be EFI_NOT_FOUND.
  329. The requested AP should execute the Procedure when called by StartupThisAP.
  330. @param[in] Context Context pointer for this test.
  331. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  332. case was successful.
  333. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  334. **/
  335. UNIT_TEST_STATUS
  336. EFIAPI
  337. TestStartupThisAP1 (
  338. IN UNIT_TEST_CONTEXT Context
  339. );
  340. /**
  341. Unit test of MP service StartupThisAP.
  342. When this service is called from an AP, the return status should be EFI_DEVICE_ERROR.
  343. @param[in] Context Context pointer for this test.
  344. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  345. case was successful.
  346. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  347. **/
  348. UNIT_TEST_STATUS
  349. EFIAPI
  350. TestStartupThisAP2 (
  351. IN UNIT_TEST_CONTEXT Context
  352. );
  353. /**
  354. Unit test of MP service StartupThisAP.
  355. When timeout expired before the requested AP has finished, the return status should be EFI_TIMEOUT.
  356. @param[in] Context Context pointer for this test.
  357. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  358. case was successful.
  359. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  360. **/
  361. UNIT_TEST_STATUS
  362. EFIAPI
  363. TestStartupThisAP3 (
  364. IN UNIT_TEST_CONTEXT Context
  365. );
  366. /**
  367. Unit test of MP service StartupThisAP.
  368. When called with disabled AP, the return status should be EFI_INVALID_PARAMETER.
  369. @param[in] Context Context pointer for this test.
  370. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  371. case was successful.
  372. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  373. **/
  374. UNIT_TEST_STATUS
  375. EFIAPI
  376. TestStartupThisAP4 (
  377. IN UNIT_TEST_CONTEXT Context
  378. );
  379. /**
  380. Unit test of MP service StartupAllAPs.
  381. All APs should execute the Procedure when called by StartupAllAPs.
  382. @param[in] Context Context pointer for this test.
  383. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  384. case was successful.
  385. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  386. **/
  387. UNIT_TEST_STATUS
  388. EFIAPI
  389. TestStartupAllAPs1 (
  390. IN UNIT_TEST_CONTEXT Context
  391. );
  392. /**
  393. Unit test of MP service StartupAllAPs.
  394. When called in single thread, the return status should be EFI_SUCCESS and AP executes in ascending order
  395. of processor handle number.
  396. @param[in] Context Context pointer for this test.
  397. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  398. case was successful.
  399. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  400. **/
  401. UNIT_TEST_STATUS
  402. EFIAPI
  403. TestStartupAllAPs2 (
  404. IN UNIT_TEST_CONTEXT Context
  405. );
  406. /**
  407. Unit test of MP service StartupAllAPs.
  408. When this service is called from an AP, the return status should be EFI_DEVICE_ERROR.
  409. @param[in] Context Context pointer for this test.
  410. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  411. case was successful.
  412. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  413. **/
  414. UNIT_TEST_STATUS
  415. EFIAPI
  416. TestStartupAllAPs3 (
  417. IN UNIT_TEST_CONTEXT Context
  418. );
  419. /**
  420. Unit test of MP service StartupAllAPs.
  421. When called with all AP timeout, the return status should be EFI_TIMEOUT.
  422. @param[in] Context Context pointer for this test.
  423. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  424. case was successful.
  425. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  426. **/
  427. UNIT_TEST_STATUS
  428. EFIAPI
  429. TestStartupAllAPs4 (
  430. IN UNIT_TEST_CONTEXT Context
  431. );
  432. /**
  433. Unit test of MP service StartupAllAPs.
  434. When called with the empty Procedure on all disabled APs, the return status should be EFI_NOT_STARTED.
  435. @param[in] Context Context pointer for this test.
  436. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  437. case was successful.
  438. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  439. **/
  440. UNIT_TEST_STATUS
  441. EFIAPI
  442. TestStartupAllAPs5 (
  443. IN UNIT_TEST_CONTEXT Context
  444. );
  445. /**
  446. Unit test of MP service SwitchBSP.
  447. When switch current BSP to be BSP, the return status should be EFI_INVALID_PARAMETER.
  448. When switch nonexistent processor to be BSP, the return status should be EFI_NOT_FOUND.
  449. After switch BSP, all APs(includes new AP) should execute the Procedure when called by StartupAllAP.
  450. @param[in] Context Context pointer for this test.
  451. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  452. case was successful.
  453. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  454. **/
  455. UNIT_TEST_STATUS
  456. EFIAPI
  457. TestSwitchBSP1 (
  458. IN UNIT_TEST_CONTEXT Context
  459. );
  460. /**
  461. Unit test of MP service SwitchBSP.
  462. When run this procedure on AP, the return status should be EFI_DEVICE_ERROR.
  463. @param[in] Context Context pointer for this test.
  464. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  465. case was successful.
  466. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  467. **/
  468. UNIT_TEST_STATUS
  469. EFIAPI
  470. TestSwitchBSP2 (
  471. IN UNIT_TEST_CONTEXT Context
  472. );
  473. /**
  474. Unit test of MP service SwitchBSP.
  475. When switch a disabled AP to be BSP, the return status should be EFI_INVALID_PARAMETER.
  476. @param[in] Context Context pointer for this test.
  477. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  478. case was successful.
  479. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  480. **/
  481. UNIT_TEST_STATUS
  482. EFIAPI
  483. TestSwitchBSP3 (
  484. IN UNIT_TEST_CONTEXT Context
  485. );
  486. /**
  487. Unit test of MP service SwitchBSP.
  488. When SwitchBSP and EnableOldBSP is TRUE, the new BSP should be in the enabled state and the old BSP should
  489. be in the enabled state.
  490. When SwitchBSP and EnableOldBSP is False, the new BSP should be in the enabled state and the old BSP should
  491. be in the disabled state.
  492. @param[in] Context Context pointer for this test.
  493. @retval UNIT_TEST_PASSED The Unit test has completed and the test
  494. case was successful.
  495. @retval UNIT_TEST_ERROR_TEST_FAILED A test case assertion has failed.
  496. **/
  497. UNIT_TEST_STATUS
  498. EFIAPI
  499. TestSwitchBSP4 (
  500. IN UNIT_TEST_CONTEXT Context
  501. );
  502. /**
  503. Create test suite and unit tests for both EdkiiPeiMpServices2Ppi and EfiMpServiceProtocol.
  504. @param[in] Framework A pointer to the framework that is being persisted.
  505. @param[in] Context A pointer to the private data buffer.
  506. @retval EFI_SUCCESS Create test suite and unit tests successfully.
  507. @retval Others Create test suite and unit tests unsuccessfully.
  508. **/
  509. EFI_STATUS
  510. AddCommonTestCase (
  511. IN UNIT_TEST_FRAMEWORK_HANDLE Framework,
  512. IN MP_SERVICE_UT_CONTEXT *Context
  513. );
  514. #endif