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

Go to the source code of this file.

Functions

CPU_FEATURES_DATAGetCpuFeaturesData (VOID)
 
MP_SERVICES GetMpService (VOID)
 
UINTN GetProcessorIndex (IN CPU_FEATURES_DATA *CpuFeaturesData)
 
EFI_STATUS GetProcessorInformation (IN UINTN ProcessorNumber, OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer)
 
VOID StartupAllAPsWorker (IN EFI_AP_PROCEDURE Procedure, IN EFI_EVENT MpEvent)
 
VOID SwitchNewBsp (IN UINTN ProcessorNumber)
 
VOID GetNumberOfProcessor (OUT UINTN *NumberOfCpus, OUT UINTN *NumberOfEnabledProcessors)
 
VOID EFIAPI CpuFeaturesInitialize (VOID)
 

Variables

CPU_FEATURES_DATA mCpuFeaturesData = { 0 }
 

Detailed Description

CPU Register Table Library functions.

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

Definition in file DxeRegisterCpuFeaturesLib.c.

Function Documentation

◆ CpuFeaturesInitialize()

VOID EFIAPI CpuFeaturesInitialize ( VOID  )

Performs CPU features Initialization.

This service will invoke MP service to perform CPU features initialization on BSP/APs per user configuration.

Note
This service could be called by BSP only.

Definition at line 218 of file DxeRegisterCpuFeaturesLib.c.

◆ GetCpuFeaturesData()

CPU_FEATURES_DATA * GetCpuFeaturesData ( VOID  )

Worker function to get CPU_FEATURES_DATA pointer.

Returns
Pointer to CPU_FEATURES_DATA.

Definition at line 24 of file DxeRegisterCpuFeaturesLib.c.

◆ GetMpService()

MP_SERVICES GetMpService ( VOID  )

Worker function to get EFI_MP_SERVICES_PROTOCOL pointer.

Returns
MP_SERVICES variable.

Definition at line 37 of file DxeRegisterCpuFeaturesLib.c.

◆ GetNumberOfProcessor()

VOID GetNumberOfProcessor ( OUT UINTN NumberOfCpus,
OUT UINTN NumberOfEnabledProcessors 
)

Worker function to retrieve the number of logical processor in the platform.

Parameters
[out]NumberOfCpusPointer to the total number of logical processors in the system, including the BSP and disabled APs.
[out]NumberOfEnabledProcessorsPointer to the number of enabled logical processors that exist in system, including the BSP.

Definition at line 185 of file DxeRegisterCpuFeaturesLib.c.

◆ GetProcessorIndex()

UINTN GetProcessorIndex ( IN CPU_FEATURES_DATA CpuFeaturesData)

Worker function to return processor index.

Parameters
CpuFeaturesDataCpu Feature Data structure.
Returns
The processor index.

Definition at line 65 of file DxeRegisterCpuFeaturesLib.c.

◆ GetProcessorInformation()

EFI_STATUS GetProcessorInformation ( IN UINTN  ProcessorNumber,
OUT EFI_PROCESSOR_INFORMATION ProcessorInfoBuffer 
)

Gets detailed MP-related information on the requested processor at the instant this call is made.

Parameters
[in]ProcessorNumberThe handle number of processor.
[out]ProcessorInfoBufferA pointer to the buffer where information for the requested processor is deposited.
Returns
Status of MpServices->GetProcessorInfo().

Definition at line 90 of file DxeRegisterCpuFeaturesLib.c.

◆ StartupAllAPsWorker()

VOID StartupAllAPsWorker ( IN EFI_AP_PROCEDURE  Procedure,
IN EFI_EVENT  MpEvent 
)

Worker function to execute a caller provided function on all enabled APs.

Parameters
[in]ProcedureA pointer to the function to be run on enabled APs of the system.
[in]MpEventA pointer to the event to be used later to check whether procedure has done.

Definition at line 119 of file DxeRegisterCpuFeaturesLib.c.

◆ SwitchNewBsp()

VOID SwitchNewBsp ( IN UINTN  ProcessorNumber)

Worker function to switch the requested AP to be the BSP from that point onward.

Parameters
[in]ProcessorNumberThe handle number of AP that is to become the new BSP.

Definition at line 152 of file DxeRegisterCpuFeaturesLib.c.

Variable Documentation

◆ mCpuFeaturesData

CPU_FEATURES_DATA mCpuFeaturesData = { 0 }

Definition at line 16 of file DxeRegisterCpuFeaturesLib.c.