TianoCore EDK2 master
Loading...
Searching...
No Matches
EfiMpServicesUnitTestCommom.h
Go to the documentation of this file.
1
10#ifndef EFI_MP_SERVICES_UNIT_TEST_COMMOM_H_
11#define EFI_MP_SERVICES_UNIT_TEST_COMMOM_H_
12
13#include <PiPei.h>
14#include <Ppi/MpServices2.h>
15#include <Protocol/MpService.h>
16#include <Library/BaseLib.h>
17#include <Library/DebugLib.h>
21#include <Library/UnitTestLib.h>
22
23#define RUN_PROCEDURE_TIMEOUT_VALUE 100000 // microseconds
24
25typedef union {
29
30typedef struct {
31 MP_SERVICES MpServices;
32 UINTN BspNumber;
33 UINTN ApNumber;
34 UINTN NumberOfProcessors;
35 UINTN NumberOfEnabledProcessors;
36 UINTN *CommonBuffer;
37 EFI_STATUS ApProcedureReturnStatus;
38 UINTN *DisabledApNumber;
40
51 OUT MP_SERVICES *MpServices
52 );
53
68 IN MP_SERVICES MpServices,
69 OUT UINTN *NumberOfProcessors,
70 OUT UINTN *NumberOfEnabledProcessors
71 );
72
85 IN MP_SERVICES MpServices,
86 IN UINTN ProcessorNumber,
87 OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer
88 );
89
108 IN MP_SERVICES MpServices,
109 IN EFI_AP_PROCEDURE Procedure,
110 IN BOOLEAN SingleThread,
111 IN UINTN TimeoutInMicroSeconds,
112 IN VOID *ProcedureArgument
113 );
114
130 IN MP_SERVICES MpServices,
131 IN EFI_AP_PROCEDURE Procedure,
132 IN UINTN ProcessorNumber,
133 IN UINTN TimeoutInMicroSeconds,
134 IN VOID *ProcedureArgument
135 );
136
149 IN MP_SERVICES MpServices,
150 IN UINTN ProcessorNumber,
151 IN BOOLEAN EnableOldBSP
152 );
153
167 IN MP_SERVICES MpServices,
168 IN UINTN ProcessorNumber,
169 IN BOOLEAN EnableAP,
170 IN UINT32 *HealthFlag
171 );
172
184 IN MP_SERVICES MpServices,
185 OUT UINTN *ProcessorNumber
186 );
187
193VOID
195 IN OUT VOID *Buffer
196 );
197
203VOID
205 IN OUT VOID *Buffer
206 );
207
218EFIAPI
220 IN UNIT_TEST_CONTEXT Context
221 );
222
229VOID
230EFIAPI
232 IN UNIT_TEST_CONTEXT Context
233 );
234
241VOID
242EFIAPI
244 IN UNIT_TEST_CONTEXT Context
245 );
246
259EFIAPI
261 IN UNIT_TEST_CONTEXT Context
262 );
263
275EFIAPI
277 IN UNIT_TEST_CONTEXT Context
278 );
279
291EFIAPI
293 IN UNIT_TEST_CONTEXT Context
294 );
295
307EFIAPI
309 IN UNIT_TEST_CONTEXT Context
310 );
311
325EFIAPI
327 IN UNIT_TEST_CONTEXT Context
328 );
329
341EFIAPI
343 IN UNIT_TEST_CONTEXT Context
344 );
345
359EFIAPI
361 IN UNIT_TEST_CONTEXT Context
362 );
363
375EFIAPI
377 IN UNIT_TEST_CONTEXT Context
378 );
379
391EFIAPI
393 IN UNIT_TEST_CONTEXT Context
394 );
395
409EFIAPI
411 IN UNIT_TEST_CONTEXT Context
412 );
413
425EFIAPI
427 IN UNIT_TEST_CONTEXT Context
428 );
429
441EFIAPI
443 IN UNIT_TEST_CONTEXT Context
444 );
445
457EFIAPI
459 IN UNIT_TEST_CONTEXT Context
460 );
461
473EFIAPI
475 IN UNIT_TEST_CONTEXT Context
476 );
477
490EFIAPI
492 IN UNIT_TEST_CONTEXT Context
493 );
494
506EFIAPI
508 IN UNIT_TEST_CONTEXT Context
509 );
510
522EFIAPI
524 IN UNIT_TEST_CONTEXT Context
525 );
526
538EFIAPI
540 IN UNIT_TEST_CONTEXT Context
541 );
542
556EFIAPI
558 IN UNIT_TEST_CONTEXT Context
559 );
560
572EFIAPI
574 IN UNIT_TEST_CONTEXT Context
575 );
576
588EFIAPI
590 IN UNIT_TEST_CONTEXT Context
591 );
592
607EFIAPI
609 IN UNIT_TEST_CONTEXT Context
610 );
611
623 IN UNIT_TEST_FRAMEWORK_HANDLE Framework,
625 );
626
627#endif
UINT64 UINTN
EFI_STATUS MpServicesUnitTestWhoAmI(IN MP_SERVICES MpServices, OUT UINTN *ProcessorNumber)
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)
UNIT_TEST_STATUS EFIAPI TestStartupAllAPs5(IN UNIT_TEST_CONTEXT Context)
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)
EFI_STATUS MpServicesUnitTestGetProcessorInfo(IN MP_SERVICES MpServices, IN UINTN ProcessorNumber, OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer)
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)
EFI_STATUS MpServicesUnitTestStartupAllAPs(IN MP_SERVICES MpServices, IN EFI_AP_PROCEDURE Procedure, IN BOOLEAN SingleThread, IN UINTN TimeoutInMicroSeconds, IN VOID *ProcedureArgument)
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)
UNIT_TEST_STATUS EFIAPI TestGetNumberOfProcessors1(IN UNIT_TEST_CONTEXT Context)
EFI_STATUS MpServicesUnitTestGetNumberOfProcessors(IN MP_SERVICES MpServices, OUT UINTN *NumberOfProcessors, OUT UINTN *NumberOfEnabledProcessors)
UNIT_TEST_STATUS EFIAPI TestStartupAllAPs2(IN UNIT_TEST_CONTEXT Context)
EFI_STATUS MpServicesUnitTestEnableDisableAP(IN MP_SERVICES MpServices, IN UINTN ProcessorNumber, IN BOOLEAN EnableAP, IN UINT32 *HealthFlag)
UNIT_TEST_STATUS EFIAPI TestSwitchBSP4(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestSwitchBSP3(IN UNIT_TEST_CONTEXT Context)
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)
EFI_STATUS MpServicesUnitTestSwitchBSP(IN MP_SERVICES MpServices, IN UINTN ProcessorNumber, IN BOOLEAN EnableOldBSP)
UNIT_TEST_STATUS EFIAPI TestEnableDisableAP2(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestStartupAllAPs4(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestSwitchBSP1(IN UNIT_TEST_CONTEXT Context)
EFI_STATUS MpServicesUnitTestStartupThisAP(IN MP_SERVICES MpServices, IN EFI_AP_PROCEDURE Procedure, IN UINTN ProcessorNumber, IN UINTN TimeoutInMicroSeconds, IN VOID *ProcedureArgument)
EFI_STATUS MpServicesUnitTestGetMpServices(OUT MP_SERVICES *MpServices)
UNIT_TEST_STATUS EFIAPI TestSwitchBSP2(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI TestGetNumberOfProcessors3(IN UNIT_TEST_CONTEXT Context)
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
VOID(EFIAPI * EFI_AP_PROCEDURE)(IN OUT VOID *Buffer)
Definition: PiMultiPhase.h:198
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * UNIT_TEST_CONTEXT
Definition: UnitTestLib.h:54
UINT32 UNIT_TEST_STATUS
Definition: UnitTestLib.h:16