OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
FrameworkMpService.h File Reference

Go to the source code of this file.

Data Structures

union  EFI_MP_HEALTH_FLAGS
 
struct  EFI_MP_HEALTH
 
struct  EFI_MP_PROC_CONTEXT
 
struct  _FRAMEWORK_EFI_MP_SERVICES_PROTOCOL
 

Macros

#define FRAMEWORK_EFI_MP_SERVICES_PROTOCOL_GUID
 
#define DELIVERY_MODE_FIXED   0x0
 
#define DELIVERY_MODE_LOWEST_PRIORITY   0x1
 
#define DELIVERY_MODE_SMI   0x2
 
#define DELIVERY_MODE_REMOTE_READ   0x3
 
#define DELIVERY_MODE_NMI   0x4
 
#define DELIVERY_MODE_INIT   0x5
 
#define DELIVERY_MODE_SIPI   0x6
 
#define DELIVERY_MODE_MAX   0x7
 
#define EFI_MP_HEALTH_FLAGS_STATUS_HEALTHY   0x0
 
#define EFI_MP_HEALTH_FLAGS_STATUS_PERFORMANCE_RESTRICTED   0x1
 
#define EFI_MP_HEALTH_FLAGS_STATUS_FUNCTIONALLY_RESTRICTED   0x2
 

Typedefs

typedef struct _FRAMEWORK_EFI_MP_SERVICES_PROTOCOL FRAMEWORK_EFI_MP_SERVICES_PROTOCOL
 
typedef VOID(EFIAPI * EFI_AP_PROCEDURE) (IN OUT VOID *Buffer)
 
typedef VOID(EFIAPI * FRAMEWORK_EFI_AP_PROCEDURE) (IN VOID *Buffer)
 
typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_GET_GENERAL_MP_INFO) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, OUT UINTN *NumberOfCPUs OPTIONAL, OUT UINTN *MaximumNumberOfCPUs OPTIONAL, OUT UINTN *NumberOfEnabledCPUs OPTIONAL, OUT UINTN *RendezvousIntNumber OPTIONAL, OUT UINTN *RendezvousProcLength OPTIONAL)
 
typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_GET_PROCESSOR_CONTEXT) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN UINTN ProcessorNumber, IN OUT UINTN *BufferLength, OUT EFI_MP_PROC_CONTEXT *ProcessorContextBuffer)
 
typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_STARTUP_ALL_APS) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN FRAMEWORK_EFI_AP_PROCEDURE Procedure, IN BOOLEAN SingleThread, IN EFI_EVENT WaitEvent OPTIONAL, IN UINTN TimeoutInMicroSecs, IN VOID *ProcArguments OPTIONAL, OUT UINTN *FailedCPUList OPTIONAL)
 
typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_STARTUP_THIS_AP) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN FRAMEWORK_EFI_AP_PROCEDURE Procedure, IN UINTN ProcessorNumber, IN EFI_EVENT WaitEvent OPTIONAL, IN UINTN TimeoutInMicroSecs, IN OUT VOID *ProcArguments OPTIONAL)
 
typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_SWITCH_BSP) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN UINTN ProcessorNumber, IN BOOLEAN EnableOldBSP)
 
typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_SEND_IPI) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN UINTN ProcessorNumber, IN UINTN VectorNumber, IN UINTN DeliveryMode)
 
typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_ENABLEDISABLEAP) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN UINTN ProcessorNumber, IN BOOLEAN NewAPState, IN EFI_MP_HEALTH *HealthState OPTIONAL)
 
typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_WHOAMI) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, OUT UINTN *ProcessorNumber)
 

Enumerations

enum  EFI_CPU_DESIGNATION { EfiCpuAP = 0 , EfiCpuBSP , EfiCpuDesignationMaximum }
 

Variables

EFI_GUID gFrameworkEfiMpServiceProtocolGuid
 

Detailed Description

When installed, the Framework MP Services Protocol produces a collection of services that are needed for MP management, such as initialization and management of application processors.

Note:
This protocol has been deprecated and has been replaced by the MP Services Protocol from the UEFI Platform Initialization Specification 1.2, Volume 2: Driver Execution Environment Core Interface.

The MP Services Protocol provides a generalized way of performing following tasks:

  • Retrieving information of multi-processor environment and MP-related status of specific processors.
  • Dispatching user-provided function to APs.
  • Maintain MP-related processor status.

The MP Services Protocol must be produced on any system with more than one logical processor.

The Protocol is available only during boot time.

MP Services Protocol is hardware-independent. Most of the logic of this protocol is architecturally neutral. It abstracts the multi-processor environment and status of processors, and provides interfaces to retrieve information, maintain, and dispatch.

MP Services Protocol may be consumed by ACPI module. The ACPI module may use this protocol to retrieve data that are needed for an MP platform and report them to OS. MP Services Protocol may also be used to program and configure processors, such as MTRR synchronization for memory space attributes setting in DXE Services. MP Services Protocol may be used by non-CPU DXE drivers to speed up platform boot by taking advantage of the processing capabilities of the APs, for example, using APs to help test system memory in parallel with other device initialization. Diagnostics applications may also use this protocol for multi-processor.

Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php.

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file FrameworkMpService.h.

Macro Definition Documentation

◆ DELIVERY_MODE_FIXED

#define DELIVERY_MODE_FIXED   0x0

Fixed delivery mode that may be used as the DeliveryMode parameter in SendIpi().

Definition at line 66 of file FrameworkMpService.h.

◆ DELIVERY_MODE_INIT

#define DELIVERY_MODE_INIT   0x5

INIT delivery mode that may be used as the DeliveryMode parameter in SendIpi().

Definition at line 91 of file FrameworkMpService.h.

◆ DELIVERY_MODE_LOWEST_PRIORITY

#define DELIVERY_MODE_LOWEST_PRIORITY   0x1

Lowest priority delivery mode that may be used as the DeliveryMode parameter in SendIpi().

Definition at line 71 of file FrameworkMpService.h.

◆ DELIVERY_MODE_MAX

#define DELIVERY_MODE_MAX   0x7

The DeliveryMode parameter in SendIpi() must be less than this maximum value.

Definition at line 101 of file FrameworkMpService.h.

◆ DELIVERY_MODE_NMI

#define DELIVERY_MODE_NMI   0x4

NMI delivery mode that may be used as the DeliveryMode parameter in SendIpi().

Definition at line 86 of file FrameworkMpService.h.

◆ DELIVERY_MODE_REMOTE_READ

#define DELIVERY_MODE_REMOTE_READ   0x3

Remote read delivery mode that may be used as the DeliveryMode parameter in SendIpi().

Definition at line 81 of file FrameworkMpService.h.

◆ DELIVERY_MODE_SIPI

#define DELIVERY_MODE_SIPI   0x6

Startup IPI delivery mode that may be used as the DeliveryMode parameter in SendIpi().

Definition at line 96 of file FrameworkMpService.h.

◆ DELIVERY_MODE_SMI

#define DELIVERY_MODE_SMI   0x2

SMI delivery mode that may be used as the DeliveryMode parameter in SendIpi().

Definition at line 76 of file FrameworkMpService.h.

◆ EFI_MP_HEALTH_FLAGS_STATUS_FUNCTIONALLY_RESTRICTED

#define EFI_MP_HEALTH_FLAGS_STATUS_FUNCTIONALLY_RESTRICTED   0x2

IPF specific value for the state field of the Self Test State Parameter.

Definition at line 116 of file FrameworkMpService.h.

◆ EFI_MP_HEALTH_FLAGS_STATUS_HEALTHY

#define EFI_MP_HEALTH_FLAGS_STATUS_HEALTHY   0x0

IPF specific value for the state field of the Self Test State Parameter.

Definition at line 106 of file FrameworkMpService.h.

◆ EFI_MP_HEALTH_FLAGS_STATUS_PERFORMANCE_RESTRICTED

#define EFI_MP_HEALTH_FLAGS_STATUS_PERFORMANCE_RESTRICTED   0x1

IPF specific value for the state field of the Self Test State Parameter.

Definition at line 111 of file FrameworkMpService.h.

◆ FRAMEWORK_EFI_MP_SERVICES_PROTOCOL_GUID

#define FRAMEWORK_EFI_MP_SERVICES_PROTOCOL_GUID
Value:
{ \
0xf33261e7, 0x23cb, 0x11d5, {0xbd, 0x5c, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} \
}

Global ID for the FRAMEWORK_EFI_MP_SERVICES_PROTOCOL.

Definition at line 53 of file FrameworkMpService.h.

Typedef Documentation

◆ EFI_AP_PROCEDURE

typedef VOID(EFIAPI * EFI_AP_PROCEDURE) (IN OUT VOID *Buffer)

The function prototype for invoking a function on an Application Processor.

This definition is used by the UEFI MP Serices Protocol, and the PI SMM System Table.

Parameters
[in,out]BufferThe pointer to private data buffer.

Definition at line 235 of file FrameworkMpService.h.

◆ FRAMEWORK_EFI_AP_PROCEDURE

typedef VOID(EFIAPI * FRAMEWORK_EFI_AP_PROCEDURE) (IN VOID *Buffer)

Functions of this type are used with the Framework MP Services Protocol and the SMM Services Table to execute a procedure on enabled APs. The context the AP should use durng execution is specified by Buffer.

Parameters
[in]BufferThe pointer to the procedure's argument.

Definition at line 248 of file FrameworkMpService.h.

◆ FRAMEWORK_EFI_MP_SERVICES_ENABLEDISABLEAP

typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_ENABLEDISABLEAP) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN UINTN ProcessorNumber, IN BOOLEAN NewAPState, IN EFI_MP_HEALTH *HealthState OPTIONAL)

This service lets the caller enable or disable an AP. The caller can optionally specify the health status of the AP by Health. It is usually used to update the health status of the processor after some processor test.

Parameters
[in]ThisThe pointer to the FRAMEWORK_EFI_MP_SERVICES_PROTOCOL instance.
[in]ProcessorNumberThe handle number of AP. The range is from 0 to the total number of logical processors minus 1. The total number of logical processors can be retrieved by GetGeneralMPInfo().
[in]NewAPStateIndicates whether the new, desired state of the AP is enabled or disabled. TRUE for enabling, FALSE otherwise.
[in]HealthStateIf not NULL, it points to the value that specifies the new health status of the AP. If it is NULL, this parameter is ignored.
Return values
EFI_SUCCESSAP successfully enabled or disabled.
EFI_INVALID_PARAMETERProcessorNumber specifies the BSP.
EFI_INVALID_PARAMETERIA32, X64: Processor with the handle specified by ProcessorNumber does not exist.
EFI_INVALID_PARAMETERIPF: If an unhealthy or untested AP is to be enabled.

Definition at line 639 of file FrameworkMpService.h.

◆ FRAMEWORK_EFI_MP_SERVICES_GET_GENERAL_MP_INFO

typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_GET_GENERAL_MP_INFO) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, OUT UINTN *NumberOfCPUs OPTIONAL, OUT UINTN *MaximumNumberOfCPUs OPTIONAL, OUT UINTN *NumberOfEnabledCPUs OPTIONAL, OUT UINTN *RendezvousIntNumber OPTIONAL, OUT UINTN *RendezvousProcLength OPTIONAL)

This service retrieves general information of multiprocessors in the system.

This function is used to get the following information:

  • Number of logical processors in system
  • Maximal number of logical processors supported by system
  • Number of enabled logical processors.
  • Rendezvous interrupt number (IPF-specific)
  • Length of the rendezvous procedure.
Parameters
[in]ThisThe pointer to the FRAMEWORK_EFI_MP_SERVICES_PROTOCOL instance.
[out]NumberOfCPUsThe pointer to the total number of logical processors in the system, including the BSP and disabled APs. If NULL, this parameter is ignored.
[out]MaximumNumberOfCPUsPointer to the maximum number of processors supported by the system. If NULL, this parameter is ignored.
[out]NumberOfEnabledCPUsThe pointer to the number of enabled logical processors that exist in system, including the BSP. If NULL, this parameter is ignored.
[out]RendezvousIntNumberThis parameter is only meaningful for IPF.
  • IA32, X64: The returned value is zero. If NULL, this parameter is ignored.
  • IPF: Pointer to the rendezvous interrupt number that is used for AP wake-up.
[out]RendezvousProcLengthThe pointer to the length of rendezvous procedure.
  • IA32, X64: The returned value is 0x1000. If NULL, this parameter is ignored.
  • IPF: The returned value is zero.
Return values
EFI_SUCCESSMultiprocessor general information was successfully retrieved.

Definition at line 288 of file FrameworkMpService.h.

◆ FRAMEWORK_EFI_MP_SERVICES_GET_PROCESSOR_CONTEXT

typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_GET_PROCESSOR_CONTEXT) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN UINTN ProcessorNumber, IN OUT UINTN *BufferLength, OUT EFI_MP_PROC_CONTEXT *ProcessorContextBuffer)

This service gets detailed MP-related information of the requested processor.

This service gets detailed MP-related information of the requested processor at the instant this call is made. Note the following:

  • The processor information may change during the course of a boot session.
  • The data of information presented here is entirely MP related. Information regarding the number of caches and their sizes, frequency of operation, slot numbers is all considered platform-related information and will not be presented here.
Parameters
[in]ThisThe pointer to the FRAMEWORK_EFI_MP_SERVICES_PROTOCOL instance.
[in]ProcessorNumberThe handle number of the processor. The range is from 0 to the total number of logical processors minus 1. The total number of logical processors can be retrieved by GetGeneralMPInfo().
[in,out]BufferLengthOn input, pointer to the size in bytes of ProcessorContextBuffer. On output, if the size of ProcessorContextBuffer is not large enough, the value pointed by this parameter is updated to size in bytes that is needed. If the size of ProcessorContextBuffer is sufficient, the value is not changed from input.
[out]ProcessorContextBufferThe pointer to the buffer where the data of requested processor will be deposited. The buffer is allocated by caller.
Return values
EFI_SUCCESSProcessor information was successfully returned.
EFI_BUFFER_TOO_SMALLThe size of ProcessorContextBuffer is too small. The value pointed by BufferLength has been updated to size in bytes that is needed.
EFI_INVALID_PARAMETERIA32, X64:BufferLength is NULL.
EFI_INVALID_PARAMETERIA32, X64:ProcessorContextBuffer is NULL.
EFI_INVALID_PARAMETERIA32, X64:Processor with the handle specified by ProcessorNumber does not exist.
EFI_NOT_FOUNDIPF: Processor with the handle specified by ProcessorNumber does not exist.

Definition at line 341 of file FrameworkMpService.h.

◆ FRAMEWORK_EFI_MP_SERVICES_PROTOCOL

Forward declaration for the EFI_MP_SERVICES_PROTOCOL.

Definition at line 61 of file FrameworkMpService.h.

◆ FRAMEWORK_EFI_MP_SERVICES_SEND_IPI

typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_SEND_IPI) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN UINTN ProcessorNumber, IN UINTN VectorNumber, IN UINTN DeliveryMode)

This service sends an IPI to a specified AP. Caller can specify vector number and delivery mode of the interrupt.

Parameters
[in]ThisThe pointer to the FRAMEWORK_EFI_MP_SERVICES_PROTOCOL instance.
[in]ProcessorNumberThe handle number of AP. The range is from 0 to the total number of logical processors minus 1. The total number of logical processors can be retrieved by GetGeneralMPInfo().
[in]VectorNumberThe vector number of the interrupt.
[in]DeliveryModeThe delivery mode of the interrupt.
Return values
EFI_SUCCESSIPI was successfully sent.
EFI_INVALID_PARAMETERProcessorNumber specifies the BSP.
EFI_INVALID_PARAMETERIA32, X64: Processor with the handle specified by ProcessorNumber does not exist.
EFI_INVALID_PARAMETERIA32, X64: VectorNumber is greater than 255.
EFI_INVALID_PARAMETERIA32, X64: DeliveryMode is greater than or equal to DELIVERY_MODE_MAX.
EFI_NOT_READYIA32, X64: IPI is not accepted by the target processor within 10 microseconds.
EFI_INVALID_PARAMETERIPF: Specified AP is disabled.
EFI_INVALID_PARAMETERIPF: Specified AP is unhealthy or untested.
EFI_NOT_READYIPF: Specified AP is busy.

Definition at line 604 of file FrameworkMpService.h.

◆ FRAMEWORK_EFI_MP_SERVICES_STARTUP_ALL_APS

typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_STARTUP_ALL_APS) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN FRAMEWORK_EFI_AP_PROCEDURE Procedure, IN BOOLEAN SingleThread, IN EFI_EVENT WaitEvent OPTIONAL, IN UINTN TimeoutInMicroSecs, IN VOID *ProcArguments OPTIONAL, OUT UINTN *FailedCPUList OPTIONAL)

This function is used to dispatch all enabled APs to the function specified by Procedure. APs can run either simultaneously or one by one. The caller can also configure the BSP to either wait for APs or just proceed with the next task. It is the responsibility of the caller of the StartupAllAPs() to make sure that the nature of the code that will be run on the BSP and the dispatched APs is well controlled. The MP Services Protocol does not guarantee that the function that either processor is executing is MP-safe. Hence, the tasks that can be run in parallel are limited to certain independent tasks and well- controlled exclusive code. EFI services and protocols may not be called by APs unless otherwise specified.

Parameters
[in]ThisThe pointer to the FRAMEWORK_EFI_MP_SERVICES_PROTOCOL instance.
[in]ProcedureA pointer to the function to be run on enabled APs of the system.
[in]SingleThreadFlag that requests APs to execute one at a time or simultaneously.
  • IA32, X64: If TRUE, then all the enabled APs execute the function specified by Procedure one by one, in ascending order of processor handle number. If FALSE, then all the enabled APs execute the function specified by Procedure simultaneously.
  • IPF: If TRUE, then all the enabled APs execute the function specified by Procedure simultaneously. If FALSE, then all the enabled APs execute the function specified by Procedure one by one, in ascending order of processor handle number. The time interval of AP dispatching is determined by WaitEvent and TimeoutInMicrosecs.
[in]WaitEventEvent to signal when APs have finished.
  • IA32, X64: If not NULL, when all APs finish after timeout expires, the event will be signaled. If NULL, the parameter is ignored.
  • IPF: If SingleThread is TRUE, this parameter is ignored. If SingleThread is FALSE (i.e. dispatch APs one by one), this parameter determines whether the BSP waits after each AP is dispatched. If it is NULL, the BSP does not wait after each AP is dispatched. If it is not NULL, the BSP waits after each AP is dispatched, and the time interval is determined by TimeoutInMicrosecs. Type EFI_EVENT is defined in CreateEvent() in the Unified Extensible Firmware Interface Specification.
[in]TimeoutInMicroSecsTime to wait for APs to finish.
  • IA32, X64: If the value is zero, it means no timeout limit. The BSP waits until all APs finish. If the value is not zero, the BSP waits until all APs finish or timeout expires. If timeout expires, EFI_TIMEOUT is returned, and the BSP will then check APs?status periodically, with time interval of 16 microseconds.
  • IPF: If SingleThread is TRUE and FailedCPUList is NULL, this parameter is ignored. If SingleThread is TRUE and FailedCPUList is not NULL, this parameter determines whether the BSP waits until all APs finish their procedure. If it is zero, the BSP does not wait for APs. If it is non-zero, it waits until all APs finish. If SingleThread is FALSE and WaitEvent is NULL, this parameter is ignored. If SingleThread is FALSE and WaitEvent is not NULL, the BSP waits after each AP is dispatched and this value determines time interval. If the value is zero, the length of time interval is 10ms. If the value is non-zero, the BSP waits until dispatched AP finishes and then dispatch the next.
[in]ProcArgumentsThe pointer to the optional parameter of the function specified by Procedure.
[out]FailedCPUListList of APs that did not finish.
  • IA32, X64: If not NULL, it records handle numbers of all logical processors that fail to accept caller-provided function (busy or disabled). If NULL, this parameter is ignored.
  • IPF: If not NULL, it records status of all logical processors, with processor handle number as index. If a logical processor fails to accept caller-provided function because it is busy, the status is EFI_NOT_READY. If it fails to accept function due to other reasons, the status is EFI_NOT_AVAILABLE_YET. If timeout expires, the status is EFI_TIMEOUT. Otherwise, the value is EFI_SUCCESS. If NULL, this parameter is ignored.
Return values
EFI_SUCCESSIA32, X64: All dispatched APs have finished before the timeout expires.
EFI_SUCCESSIA32, X64: Only 1 logical processor exists in system.
EFI_INVALID_PARAMETERIA32, X64: Procedure is NULL.
EFI_TIMEOUTIA32, X64: The timeout expires before all dispatched APs have finished.
EFI_SUCCESSIPF: This function always returns EFI_SUCCESS.

Definition at line 459 of file FrameworkMpService.h.

◆ FRAMEWORK_EFI_MP_SERVICES_STARTUP_THIS_AP

typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_STARTUP_THIS_AP) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN FRAMEWORK_EFI_AP_PROCEDURE Procedure, IN UINTN ProcessorNumber, IN EFI_EVENT WaitEvent OPTIONAL, IN UINTN TimeoutInMicroSecs, IN OUT VOID *ProcArguments OPTIONAL)

This function is used to dispatch one enabled AP to the function provided by the caller. The caller can request the BSP to either wait for the AP or just proceed with the next task.

Parameters
[in]ThisThe pointer to the FRAMEWORK_EFI_MP_SERVICES_PROTOCOL instance.
[in]ProcedureA pointer to the function to be run on the designated AP.
[in]ProcessorNumberThe handle number of AP. The range is from 0 to the total number of logical processors minus 1. The total number of logical processors can be retrieved by GetGeneralMPInfo().
[in]WaitEventEvent to signal when APs have finished.
  • IA32, X64: If not NULL, when the AP finishes after timeout expires, the event will be signaled. If NULL, the parameter is ignored.
  • IPF: This parameter determines whether the BSP waits after the AP is dispatched. If it is NULL, the BSP does not wait after the AP is dispatched. If it is not NULL, the BSP waits after the AP is dispatched, and the time interval is determined by TimeoutInMicrosecs. Type EFI_EVENT is defined in CreateEvent() in the Unified Extensible Firmware Interface Specification.
[in]TimeoutInMicroSecsTime to wait for APs to finish.
  • IA32, X64: If the value is zero, it means no timeout limit. The BSP waits until the AP finishes. If the value is not zero, the BSP waits until the AP finishes or timeout expires. If timeout expires, EFI_TIMEOUT is returned, and the BSP will then check the AP's status periodically, with time interval of 16 microseconds.
  • IPF: If WaitEvent is NULL, this parameter is ignored. If WaitEvent is not NULL, the BSP waits after the AP is dispatched and this value determines time interval. If the value is zero, the length of time interval is 10ms. If the value is non-zero, the BSP waits until the AP finishes.
[in]ProcArgumentsThe pointer to the optional parameter of the function specified by Procedure.
Return values
EFI_SUCCESSSpecified AP has finished before the timeout expires.
EFI_TIMEOUTThe timeout expires before specified AP has finished.
EFI_INVALID_PARAMETERIA32, X64: Processor with the handle specified by ProcessorNumber does not exist.
EFI_INVALID_PARAMETERIA32, X64: Specified AP is busy or disabled.
EFI_INVALID_PARAMETERIA32, X64: Procedure is NULL.
EFI_INVALID_PARAMETERIA32, X64: ProcessorNumber specifies the BSP
EFI_NOT_READYIPF: Specified AP is busy
EFI_NOT_AVAILABLE_YETIPF: ProcessorNumber specifies the BSP
EFI_NOT_AVAILABLE_YETIPF: Specified AP is disabled.
EFI_NOT_AVAILABLE_YETIPF: Specified AP is unhealthy or untested.

Definition at line 533 of file FrameworkMpService.h.

◆ FRAMEWORK_EFI_MP_SERVICES_SWITCH_BSP

typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_SWITCH_BSP) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, IN UINTN ProcessorNumber, IN BOOLEAN EnableOldBSP)

This service switches the requested AP to be the BSP from that point onward. The new BSP can take over the execution of the old BSP and continue seamlessly from where the old one left off. This call can only be performed by the current BSP.

Parameters
[in]ThisThe pointer to the FRAMEWORK_EFI_MP_SERVICES_PROTOCOL instance.
[in]ProcessorNumberThe handle number of AP. The range is from 0 to the total number of logical processors minus 1. The total number of logical processors can be retrieved by GetGeneralMPInfo().
[in]EnableOldBSPIf TRUE, then the old BSP will be listed as an enabled AP. Otherwise, it will be disabled.
Return values
EFI_SUCCESSBSP successfully switched.
EFI_INVALID_PARAMETERThe processor with the handle specified by ProcessorNumber does not exist.
EFI_INVALID_PARAMETERProcessorNumber specifies the BSP.
EFI_NOT_READYIA32, X64: Specified AP is busy or disabled.
EFI_INVALID_PARAMETERIPF: Specified AP is disabled.
EFI_INVALID_PARAMETERIPF: Specified AP is unhealthy or untested.
EFI_NOT_READYIPF: Specified AP is busy.

Definition at line 569 of file FrameworkMpService.h.

◆ FRAMEWORK_EFI_MP_SERVICES_WHOAMI

typedef EFI_STATUS(EFIAPI * FRAMEWORK_EFI_MP_SERVICES_WHOAMI) (IN FRAMEWORK_EFI_MP_SERVICES_PROTOCOL *This, OUT UINTN *ProcessorNumber)

This service lets the caller processor get its handle number, with which any processor in the system can be uniquely identified. The range is from 0 to the total number of logical processors minus 1. The total number of logical processors can be retrieved by GetGeneralMPInfo(). This service may be called from the BSP and APs.

Parameters
[in]ThisThe pointer to the FRAMEWORK_EFI_MP_SERVICES_PROTOCOL instance.
[out]ProcessorNumberA pointer to the handle number of AP. The range is from 0 to the total number of logical processors minus 1. The total number of logical processors can be retrieved by GetGeneralMPInfo().
Return values
EFI_SUCCESSThis function always returns EFI_SUCCESS.

Definition at line 665 of file FrameworkMpService.h.

Enumeration Type Documentation

◆ EFI_CPU_DESIGNATION

Enumerator
EfiCpuAP 

The CPU is an AP (Application Processor).

EfiCpuBSP 

The CPU is the BSP (Boot-Strap Processor).

EfiCpuDesignationMaximum 

Definition at line 159 of file FrameworkMpService.h.

Variable Documentation

◆ gFrameworkEfiMpServiceProtocolGuid

EFI_GUID gFrameworkEfiMpServiceProtocolGuid
extern

Definition at line 139 of file UserGlobalVar.c.