TianoCore EDK2 master
MpInitLibUp.c
Go to the documentation of this file.
1
9#include <PiDxe.h>
11#include <Protocol/MpService.h>
12#include <Library/DebugLib.h>
14#include <Library/HobLib.h>
15
30EFIAPI
32 VOID
33 )
34{
35 //
36 // Enable the local APIC for Virtual Wire Mode.
37 //
39
40 return EFI_SUCCESS;
41}
42
64EFIAPI
66 OUT UINTN *NumberOfProcessors OPTIONAL,
67 OUT UINTN *NumberOfEnabledProcessors OPTIONAL
68 )
69{
70 *NumberOfProcessors = 1;
71 *NumberOfEnabledProcessors = 1;
72 return EFI_SUCCESS;
73}
74
93EFIAPI
95 IN UINTN ProcessorNumber,
96 OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer,
97 OUT EFI_HEALTH_FLAGS *HealthData OPTIONAL
98 )
99{
100 EFI_HOB_GUID_TYPE *GuidHob;
102
103 if (ProcessorInfoBuffer == NULL) {
104 return EFI_INVALID_PARAMETER;
105 }
106
107 if (ProcessorNumber != 0) {
108 return EFI_NOT_FOUND;
109 }
110
111 ProcessorInfoBuffer->ProcessorId = 0;
112 ProcessorInfoBuffer->StatusFlag = PROCESSOR_AS_BSP_BIT |
115 ProcessorInfoBuffer->Location.Package = 0;
116 ProcessorInfoBuffer->Location.Core = 0;
117 ProcessorInfoBuffer->Location.Thread = 0;
118 if (HealthData != NULL) {
119 GuidHob = GetFirstGuidHob (&gEfiSecPlatformInformationPpiGuid);
120 if (GuidHob != NULL) {
122 HealthData->Uint32 = SecPlatformInformation->IA32HealthFlags.Uint32;
123 } else {
124 DEBUG ((DEBUG_INFO, "Does not find any HOB stored CPU BIST information!\n"));
125 HealthData->Uint32 = 0;
126 }
127 }
128
129 return EFI_SUCCESS;
130}
131
208EFIAPI
210 IN EFI_AP_PROCEDURE Procedure,
211 IN BOOLEAN SingleThread,
212 IN EFI_EVENT WaitEvent OPTIONAL,
213 IN UINTN TimeoutInMicroseconds,
214 IN VOID *ProcedureArgument OPTIONAL,
215 OUT UINTN **FailedCpuList OPTIONAL
216 )
217{
218 return EFI_NOT_STARTED;
219}
220
293EFIAPI
295 IN EFI_AP_PROCEDURE Procedure,
296 IN UINTN ProcessorNumber,
297 IN EFI_EVENT WaitEvent OPTIONAL,
298 IN UINTN TimeoutInMicroseconds,
299 IN VOID *ProcedureArgument OPTIONAL,
300 OUT BOOLEAN *Finished OPTIONAL
301 )
302{
303 return EFI_INVALID_PARAMETER;
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}
382
400EFIAPI
402 OUT UINTN *ProcessorNumber
403 )
404{
405 if (ProcessorNumber == NULL) {
406 return EFI_INVALID_PARAMETER;
407 }
408
409 *ProcessorNumber = 0;
410 return EFI_SUCCESS;
411}
412
432EFIAPI
434 IN EFI_AP_PROCEDURE Procedure,
435 IN UINTN TimeoutInMicroseconds,
436 IN VOID *ProcedureArgument OPTIONAL
437 )
438{
439 if (Procedure == NULL) {
440 return EFI_INVALID_PARAMETER;
441 }
442
443 Procedure (ProcedureArgument);
444
445 return EFI_SUCCESS;
446}
UINT64 UINTN
VOID *EFIAPI GetFirstGuidHob(IN CONST EFI_GUID *Guid)
Definition: HobLib.c:215
#define NULL
Definition: Base.h:312
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define DEBUG(Expression)
Definition: DebugLib.h:417
EFI_STATUS EFIAPI SecPlatformInformation(IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT UINT64 *StructureSize, OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord)
#define GET_GUID_HOB_DATA(HobStart)
Definition: HobLib.h:544
VOID EFIAPI ProgramVirtualWireMode(VOID)
Definition: BaseXApicLib.c:617
EFI_STATUS EFIAPI MpInitLibEnableDisableAP(IN UINTN ProcessorNumber, IN BOOLEAN EnableAP, IN UINT32 *HealthFlag OPTIONAL)
Definition: MpInitLibUp.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: MpInitLibUp.c:209
EFI_STATUS EFIAPI MpInitLibWhoAmI(OUT UINTN *ProcessorNumber)
Definition: MpInitLibUp.c:401
EFI_STATUS EFIAPI MpInitLibGetNumberOfProcessors(OUT UINTN *NumberOfProcessors OPTIONAL, OUT UINTN *NumberOfEnabledProcessors OPTIONAL)
Definition: MpInitLibUp.c:65
EFI_STATUS EFIAPI MpInitLibSwitchBSP(IN UINTN ProcessorNumber, IN BOOLEAN EnableOldBSP)
Definition: MpInitLibUp.c:334
EFI_STATUS EFIAPI MpInitLibStartupAllCPUs(IN EFI_AP_PROCEDURE Procedure, IN UINTN TimeoutInMicroseconds, IN VOID *ProcedureArgument OPTIONAL)
Definition: MpInitLibUp.c:433
EFI_STATUS EFIAPI MpInitLibGetProcessorInfo(IN UINTN ProcessorNumber, OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer, OUT EFI_HEALTH_FLAGS *HealthData OPTIONAL)
Definition: MpInitLibUp.c:94
EFI_STATUS EFIAPI MpInitLibInitialize(VOID)
Definition: MpInitLibUp.c:31
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: MpInitLibUp.c:294
#define PROCESSOR_HEALTH_STATUS_BIT
Definition: MpService.h:84
#define PROCESSOR_AS_BSP_BIT
Definition: MpService.h:70
#define PROCESSOR_ENABLED_BIT
Definition: MpService.h:77
VOID(EFIAPI * EFI_AP_PROCEDURE)(IN OUT VOID *Buffer)
Definition: PiMultiPhase.h:191
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:28
VOID * EFI_EVENT
Definition: UefiBaseType.h:36
#define EFI_SUCCESS
Definition: UefiBaseType.h:111