TianoCore EDK2 master
Loading...
Searching...
No Matches
PeiMpLib.c
Go to the documentation of this file.
1
9#include "MpLib.h"
10
15VOID
17 VOID
18 )
19{
20}
21
29 VOID
30 )
31{
32 CPU_MP_DATA *CpuMpData;
33
34 CpuMpData = GetCpuMpDataFromGuidedHob ();
35 ASSERT (CpuMpData != NULL);
36 return CpuMpData;
37}
38
44VOID
46 IN CPU_MP_DATA *CpuMpData
47 )
48{
49 UINT64 Data64;
50
51 //
52 // Build location of CPU MP DATA buffer in HOB
53 //
54 Data64 = (UINT64)(UINTN)CpuMpData;
56 &mCpuInitMpLibHobGuid,
57 (VOID *)&Data64,
58 sizeof (UINT64)
59 );
60}
61
76 IN UINTN BufferSize
77 )
78{
79 //
80 // PEI phase doesn't need to do such transition. So simply return 0.
81 //
82 return 0;
83}
84
89VOID
91 VOID
92 )
93{
94}
95
101VOID
103 IN CPU_MP_DATA *CpuMpData
104 )
105{
106 SaveCpuMpData (CpuMpData);
107}
108
185EFIAPI
187 IN EFI_AP_PROCEDURE Procedure,
188 IN BOOLEAN SingleThread,
189 IN EFI_EVENT WaitEvent OPTIONAL,
190 IN UINTN TimeoutInMicroseconds,
191 IN VOID *ProcedureArgument OPTIONAL,
192 OUT UINTN **FailedCpuList OPTIONAL
193 )
194{
195 if (WaitEvent != NULL) {
196 return EFI_UNSUPPORTED;
197 }
198
199 return StartupAllCPUsWorker (
200 Procedure,
201 SingleThread,
202 TRUE,
203 NULL,
204 TimeoutInMicroseconds,
205 ProcedureArgument,
206 FailedCpuList
207 );
208}
209
282EFIAPI
284 IN EFI_AP_PROCEDURE Procedure,
285 IN UINTN ProcessorNumber,
286 IN EFI_EVENT WaitEvent OPTIONAL,
287 IN UINTN TimeoutInMicroseconds,
288 IN VOID *ProcedureArgument OPTIONAL,
289 OUT BOOLEAN *Finished OPTIONAL
290 )
291{
292 if (WaitEvent != NULL) {
293 return EFI_UNSUPPORTED;
294 }
295
296 return StartupThisAPWorker (
297 Procedure,
298 ProcessorNumber,
299 NULL,
300 TimeoutInMicroseconds,
301 ProcedureArgument,
302 Finished
303 );
304}
305
333EFIAPI
335 IN UINTN ProcessorNumber,
336 IN BOOLEAN EnableOldBSP
337 )
338{
339 return EFI_UNSUPPORTED;
340}
341
373EFIAPI
375 IN UINTN ProcessorNumber,
376 IN BOOLEAN EnableAP,
377 IN UINT32 *HealthFlag OPTIONAL
378 )
379{
380 return EFI_UNSUPPORTED;
381}
UINT64 UINTN
VOID *EFIAPI BuildGuidDataHob(IN CONST EFI_GUID *Guid, IN VOID *Data, IN UINTN DataLength)
Definition: HobLib.c:375
EFI_STATUS StartupThisAPWorker(IN EFI_AP_PROCEDURE Procedure, IN UINTN ProcessorNumber, IN EFI_EVENT WaitEvent OPTIONAL, IN UINTN TimeoutInMicroseconds, IN VOID *ProcedureArgument OPTIONAL, OUT BOOLEAN *Finished OPTIONAL)
Definition: MpLib.c:1176
CPU_MP_DATA * GetCpuMpDataFromGuidedHob(VOID)
Definition: MpLib.c:1609
EFI_STATUS StartupAllCPUsWorker(IN EFI_AP_PROCEDURE Procedure, IN BOOLEAN SingleThread, IN BOOLEAN ExcludeBsp, IN EFI_EVENT WaitEvent OPTIONAL, IN UINTN TimeoutInMicroseconds, IN VOID *ProcedureArgument OPTIONAL, OUT UINTN **FailedCpuList OPTIONAL)
Definition: MpLib.c:1019
EFI_STATUS EFIAPI MpInitLibEnableDisableAP(IN UINTN ProcessorNumber, IN BOOLEAN EnableAP, IN UINT32 *HealthFlag OPTIONAL)
Definition: PeiMpLib.c:374
EFI_STATUS EFIAPI MpInitLibStartupAllAPs(IN EFI_AP_PROCEDURE Procedure, IN BOOLEAN SingleThread, IN EFI_EVENT WaitEvent OPTIONAL, IN UINTN TimeoutInMicroseconds, IN VOID *ProcedureArgument OPTIONAL, OUT UINTN **FailedCpuList OPTIONAL)
Definition: PeiMpLib.c:186
VOID CheckAndUpdateApsStatus(VOID)
Definition: PeiMpLib.c:90
EFI_STATUS EFIAPI MpInitLibSwitchBSP(IN UINTN ProcessorNumber, IN BOOLEAN EnableOldBSP)
Definition: PeiMpLib.c:334
UINTN GetModeTransitionBuffer(IN UINTN BufferSize)
Definition: PeiMpLib.c:75
CPU_MP_DATA * GetCpuMpData(VOID)
Definition: PeiMpLib.c:28
VOID InitMpGlobalData(IN CPU_MP_DATA *CpuMpData)
Definition: PeiMpLib.c:102
VOID EnableDebugAgent(VOID)
Definition: PeiMpLib.c:16
EFI_STATUS EFIAPI MpInitLibStartupThisAP(IN EFI_AP_PROCEDURE Procedure, IN UINTN ProcessorNumber, IN EFI_EVENT WaitEvent OPTIONAL, IN UINTN TimeoutInMicroseconds, IN VOID *ProcedureArgument OPTIONAL, OUT BOOLEAN *Finished OPTIONAL)
Definition: PeiMpLib.c:283
VOID SaveCpuMpData(IN CPU_MP_DATA *CpuMpData)
Definition: PeiMpLib.c:45
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#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 * EFI_EVENT
Definition: UefiBaseType.h:37