TianoCore EDK2 master
Loading...
Searching...
No Matches
PiSmmCpuDxeSmm.c File Reference

Go to the source code of this file.

Functions

BOOLEAN IsSmmProfileEnabled (VOID)
 
VOID PerformRemainingTasks (VOID)
 
VOID GetSmiCommandPort (VOID)
 
EFI_STATUS EFIAPI SmmReadyToLockEventNotify (IN CONST EFI_GUID *Protocol, IN VOID *Interface, IN EFI_HANDLE Handle)
 
VOID GetSmmCpuSyncConfigData (IN OUT BOOLEAN *RelaxedMode, OPTIONAL IN OUT UINT64 *SyncTimeout, OPTIONAL IN OUT UINT64 *SyncTimeout2 OPTIONAL)
 
VOID GetAcpiS3EnableFlag (VOID)
 
UINTN GetSupportedMaxLogicalProcessorNumber (VOID)
 
EFI_PROCESSOR_INFORMATIONGetMpInformationFromMpServices (OUT UINTN *NumberOfCpus, OUT UINTN *MaxNumberOfCpus)
 
EFI_STATUS EFIAPI PiCpuSmmEntry (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

const BOOLEAN mIsStandaloneMm = FALSE
 
BOOLEAN mSmmReadyToLock = FALSE
 

Detailed Description

Agent Module to load other modules to deploy SMM Entry Vector for X86 CPU.

Copyright (c) 2009 - 2024, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
Copyright (C) 2023 - 2024 Advanced Micro Devices, Inc. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PiSmmCpuDxeSmm.c.

Function Documentation

◆ GetAcpiS3EnableFlag()

VOID GetAcpiS3EnableFlag ( VOID  )

Get ACPI S3 enable flag.

Definition at line 230 of file PiSmmCpuDxeSmm.c.

◆ GetMpInformationFromMpServices()

EFI_PROCESSOR_INFORMATION * GetMpInformationFromMpServices ( OUT UINTN NumberOfCpus,
OUT UINTN MaxNumberOfCpus 
)

Extract NumberOfCpus, MaxNumberOfCpus and EFI_PROCESSOR_INFORMATION for all CPU from gEfiMpServiceProtocolGuid.

Parameters
[out]NumberOfCpusPointer to NumberOfCpus.
[out]MaxNumberOfCpusPointer to MaxNumberOfCpus.
Return values
ProcessorInfoPointer to EFI_PROCESSOR_INFORMATION buffer.

Get the MP Services Protocol

Get the number of processors

Allocate buffer for processor information

Get processor information

Definition at line 260 of file PiSmmCpuDxeSmm.c.

◆ GetSmiCommandPort()

VOID GetSmiCommandPort ( VOID  )

To get system port address of the SMI Command Port in FADT table.

Definition at line 130 of file PiSmmCpuDxeSmm.c.

◆ GetSmmCpuSyncConfigData()

VOID GetSmmCpuSyncConfigData ( IN OUT BOOLEAN *  RelaxedMode,
OPTIONAL IN OUT UINT64 *  SyncTimeout,
OPTIONAL IN OUT UINT64 *SyncTimeout2  OPTIONAL 
)

Get SmmCpuSyncConfig data: RelaxedMode, SyncTimeout, SyncTimeout2.

Parameters
[in,out]RelaxedModeIt indicates if Relaxed CPU synchronization method or traditional CPU synchronization method is used when processing an SMI.
[in,out]SyncTimeoutIt indicates the 1st BSP/AP synchronization timeout value in SMM.
[in,out]SyncTimeout2It indicates the 2nd BSP/AP synchronization timeout value in SMM.

Definition at line 206 of file PiSmmCpuDxeSmm.c.

◆ GetSupportedMaxLogicalProcessorNumber()

UINTN GetSupportedMaxLogicalProcessorNumber ( VOID  )

Get the maximum number of logical processors supported by the system.

Return values
Themaximum number of logical processors supported by the system is indicated by the return value.

Definition at line 244 of file PiSmmCpuDxeSmm.c.

◆ IsSmmProfileEnabled()

BOOLEAN IsSmmProfileEnabled ( VOID  )

Check SmmProfile is enabled or not.

Returns
TRUE SmmProfile is enabled. FALSE SmmProfile is not enabled.

Definition at line 34 of file PiSmmCpuDxeSmm.c.

◆ PerformRemainingTasks()

VOID PerformRemainingTasks ( VOID  )

Perform the remaining tasks.

Definition at line 46 of file PiSmmCpuDxeSmm.c.

◆ PiCpuSmmEntry()

EFI_STATUS EFIAPI PiCpuSmmEntry ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE SystemTable 
)

The module Entry Point of the CPU SMM driver.

Parameters
ImageHandleThe firmware allocated handle for the EFI image.
SystemTableA pointer to the EFI System Table.
Return values
EFI_SUCCESSThe entry point is executed successfully.
OtherSome error occurs when executing this entry point.

Definition at line 342 of file PiSmmCpuDxeSmm.c.

◆ SmmReadyToLockEventNotify()

EFI_STATUS EFIAPI SmmReadyToLockEventNotify ( IN CONST EFI_GUID Protocol,
IN VOID *  Interface,
IN EFI_HANDLE  Handle 
)

SMM Ready To Lock event notification handler.

mSmmReadyToLock is set to perform additional lock actions that must be performed from SMM on the next SMI.

Parameters
[in]ProtocolPoints to the protocol's unique identifier.
[in]InterfacePoints to the interface instance.
[in]HandleThe handle on which the interface was installed.
Return values
EFI_SUCCESSNotification handler runs successfully.

Definition at line 163 of file PiSmmCpuDxeSmm.c.

Variable Documentation

◆ mIsStandaloneMm

const BOOLEAN mIsStandaloneMm = FALSE

Definition at line 19 of file PiSmmCpuDxeSmm.c.

◆ mSmmReadyToLock

BOOLEAN mSmmReadyToLock = FALSE

Definition at line 24 of file PiSmmCpuDxeSmm.c.