TianoCore EDK2 master
Loading...
Searching...
No Matches
SmmCpuService.h File Reference
#include <Protocol/MpService.h>
#include <Protocol/Cpu.h>

Go to the source code of this file.

Data Structures

struct  _EFI_SMM_CPU_SERVICE_PROTOCOL
 
struct  _EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL
 

Macros

#define EFI_SMM_CPU_SERVICE_PROTOCOL_GUID
 
#define EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL_GUID
 

Typedefs

typedef struct _EFI_SMM_CPU_SERVICE_PROTOCOL EFI_SMM_CPU_SERVICE_PROTOCOL
 
typedef EFI_STATUS(EFIAPI * EFI_SMM_GET_PROCESSOR_INFO) (IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This, IN UINTN ProcessorNumber, OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer)
 
typedef EFI_STATUS(EFIAPI * EFI_SMM_SWITCH_BSP) (IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This, IN UINTN ProcessorNumber)
 
typedef EFI_STATUS(EFIAPI * EFI_SMM_ADD_PROCESSOR) (IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This, IN UINT64 ProcessorId, OUT UINTN *ProcessorNumber)
 
typedef EFI_STATUS(EFIAPI * EFI_SMM_REMOVE_PROCESSOR) (IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This, IN UINTN ProcessorNumber)
 
typedef EFI_STATUS(EFIAPI * EFI_SMM_WHOAMI) (IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This, OUT UINTN *ProcessorNumber)
 
typedef EFI_STATUS(EFIAPI * EFI_SMM_REGISTER_EXCEPTION_HANDLER) (IN EFI_SMM_CPU_SERVICE_PROTOCOL *This, IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler)
 
typedef struct _EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL
 
typedef EFI_STATUS(EFIAPI * EDKII_WAIT_FOR_ALL_PROCESSOR) (IN EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL *This, IN BOOLEAN BlockingMode)
 

Variables

EFI_GUID gEfiSmmCpuServiceProtocolGuid
 
EFI_GUID gEdkiiSmmCpuRendezvousProtocolGuid
 

Detailed Description

SMM CPU Service protocol definition.

Copyright (c) 2013 - 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file SmmCpuService.h.

Macro Definition Documentation

◆ EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL_GUID

#define EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL_GUID
Value:
{ \
0xaa00d50b, 0x4911, 0x428f, { 0xb9, 0x1a, 0xa5, 0x9d, 0xdb, 0x13, 0xe2, 0x4c } \
}

Definition at line 207 of file SmmCpuService.h.

◆ EFI_SMM_CPU_SERVICE_PROTOCOL_GUID

#define EFI_SMM_CPU_SERVICE_PROTOCOL_GUID
Value:
{ \
0x1d202cab, 0xc8ab, 0x4d5c, { 0x94, 0xf7, 0x3c, 0xfc, 0xc0, 0xd3, 0xd3, 0x35 } \
}

Definition at line 18 of file SmmCpuService.h.

Typedef Documentation

◆ EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL

◆ EDKII_WAIT_FOR_ALL_PROCESSOR

typedef EFI_STATUS(EFIAPI * EDKII_WAIT_FOR_ALL_PROCESSOR) (IN EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL *This, IN BOOLEAN BlockingMode)

Wait for all APs to arrive SMM mode in given timeout constraint.

Parameters
[in]ThisA pointer to the EDKII_SMM_CPU_RENDEZVOUS_PROTOCOL instance.
[in]BlockingModeBlock or non-block mode.
Return values
EFI_SUCCESSAll APs have arrived SMM mode except SMI disabled APs.
EFI_TIMEOUTThere are APs not in SMM mode in given timeout constraint.

Definition at line 225 of file SmmCpuService.h.

◆ EFI_SMM_ADD_PROCESSOR

typedef EFI_STATUS(EFIAPI * EFI_SMM_ADD_PROCESSOR) (IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This, IN UINT64 ProcessorId, OUT UINTN *ProcessorNumber)

Notify that a new processor has been added to the system.

The SMM CPU driver should add the processor to the SMM CPU list.

If the processor is disabled it won't participate any SMI handler during subsequent SMIs.

Parameters
ThisA pointer to the EFI_SMM_CPU_SERVICE_PROTOCOL instance.
ProcessorIdThe hardware ID of the processor.
ProcessorNumberThe handle number of processor.
ProcessorResourceA pointer to EFI_SMM_PROCESSOR_RESOURCE which holds the assigned resources.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_ALREADY_STARTEDProcessor already present.
EFI_NOT_READYSpace for a new handle could not be allocated.

Definition at line 108 of file SmmCpuService.h.

◆ EFI_SMM_CPU_SERVICE_PROTOCOL

◆ EFI_SMM_GET_PROCESSOR_INFO

typedef EFI_STATUS(EFIAPI * EFI_SMM_GET_PROCESSOR_INFO) (IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This, IN UINTN ProcessorNumber, OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer)

Gets processor information on the requested processor at the instant this call is made. This service may only be called from the BSP.

Parameters
[in]ThisA pointer to the EFI_SMM_CPU_SERVICE_PROTOCOL instance.
[in]ProcessorNumberThe handle number of processor.
[out]ProcessorInfoBufferA pointer to the buffer where information for the requested processor is deposited.
Return values
EFI_SUCCESSProcessor information was returned.
EFI_DEVICE_ERRORThe calling processor is an AP.
EFI_INVALID_PARAMETERProcessorInfoBuffer is NULL.
EFI_NOT_FOUNDThe processor with the handle specified by ProcessorNumber does not exist in the platform.

Definition at line 46 of file SmmCpuService.h.

◆ EFI_SMM_REGISTER_EXCEPTION_HANDLER

typedef EFI_STATUS(EFIAPI * EFI_SMM_REGISTER_EXCEPTION_HANDLER) (IN EFI_SMM_CPU_SERVICE_PROTOCOL *This, IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler)

Register exception handler.

Parameters
ThisA pointer to the SMM_CPU_SERVICE_PROTOCOL instance.
ExceptionTypeDefines which interrupt or exception to hook. Type EFI_EXCEPTION_TYPE and the valid values for this parameter are defined in EFI_DEBUG_SUPPORT_PROTOCOL of the UEFI 2.0 specification.
InterruptHandlerA pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called when a processor interrupt occurs. If this parameter is NULL, then the handler will be uninstalled.
Return values
EFI_SUCCESSThe handler for the processor interrupt was successfully installed or uninstalled.
EFI_ALREADY_STARTEDInterruptHandler is not NULL, and a handler for InterruptType was previously installed.
EFI_INVALID_PARAMETERInterruptHandler is NULL, and a handler for InterruptType was not previously installed.
EFI_UNSUPPORTEDThe interrupt specified by InterruptType is not supported.

Definition at line 182 of file SmmCpuService.h.

◆ EFI_SMM_REMOVE_PROCESSOR

typedef EFI_STATUS(EFIAPI * EFI_SMM_REMOVE_PROCESSOR) (IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This, IN UINTN ProcessorNumber)

Notify that a processor is hot-removed.

Remove a processor from the CPU list of the SMM CPU driver. After this API is called, the removed processor must not respond to SMIs in the coherence domain.

Parameters
ThisA pointer to the EFI_SMM_CPU_SERVICE_PROTOCOL instance.
ProcessorIdThe hardware ID of the processor.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_NOT_FOUNDProcessor with the hardware ID specified by ProcessorId does not exist.
EFI_NOT_READYSpecified AP is busy.

Definition at line 130 of file SmmCpuService.h.

◆ EFI_SMM_SWITCH_BSP

typedef EFI_STATUS(EFIAPI * EFI_SMM_SWITCH_BSP) (IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This, IN UINTN ProcessorNumber)

This service switches the requested AP to be the BSP from that point onward. This service changes the BSP for all purposes. This call can only be performed by the current BSP.

This service switches the requested AP to be the BSP from that point onward. This service changes the BSP for all purposes. The new BSP can take over the execution of the old BSP and continue seamlessly from where the old one left off.

If the BSP cannot be switched prior to the return from this service, then EFI_UNSUPPORTED must be returned.

Parameters
[in]ThisA pointer to the EFI_SMM_CPU_SERVICE_PROTOCOL instance.
[in]ProcessorNumberThe handle number of AP that is to become the new BSP. The range is from 0 to the total number of logical processors minus 1.
Return values
EFI_SUCCESSBSP successfully switched.
EFI_UNSUPPORTEDSwitching the BSP cannot be completed prior to this service returning.
EFI_UNSUPPORTEDSwitching the BSP is not supported.
EFI_SUCCESSThe calling processor is an AP.
EFI_NOT_FOUNDThe processor with the handle specified by ProcessorNumber does not exist.
EFI_INVALID_PARAMETERProcessorNumber specifies the current BSP or a disabled AP.
EFI_NOT_READYThe specified AP is busy.

Definition at line 84 of file SmmCpuService.h.

◆ EFI_SMM_WHOAMI

typedef EFI_STATUS(EFIAPI * EFI_SMM_WHOAMI) (IN CONST EFI_SMM_CPU_SERVICE_PROTOCOL *This, OUT UINTN *ProcessorNumber)

This return the handle number for the calling processor. This service may be called from the BSP and APs.

This service returns the processor handle number for the calling processor. The returned value is in the range from 0 to the total number of logical processors minus 1. This service may be called from the BSP and APs. If ProcessorNumber is NULL, then EFI_INVALID_PARAMETER is returned. Otherwise, the current processors handle number is returned in ProcessorNumber, and EFI_SUCCESS is returned.

Parameters
[in]ThisA pointer to the EFI_SMM_CPU_SERVICE_PROTOCOL instance.
[in]ProcessorNumberThe handle number of AP that is to become the new BSP. The range is from 0 to the total number of logical processors minus 1.
Return values
EFI_SUCCESSThe current processor handle number was returned in ProcessorNumber.
EFI_INVALID_PARAMETERProcessorNumber is NULL.

Definition at line 158 of file SmmCpuService.h.