TianoCore EDK2 master
Loading...
Searching...
No Matches
RegisterCpuFeatures.h File Reference

Go to the source code of this file.

Data Structures

struct  CPU_FEATURES_INIT_ORDER
 
struct  CPU_FEATURES_ENTRY
 
struct  PROGRAM_CPU_REGISTER_FLAGS
 
union  MP_SERVICES
 
struct  CPU_FEATURES_DATA
 

Macros

#define CPU_FEATURE_ENTRY_SIGNATURE   SIGNATURE_32 ('C', 'F', 'E', 'S')
 
#define CPU_FEATURE_NAME_SIZE   128
 
#define CPU_FEATURE_ENTRY_FROM_LINK(a)
 

Functions

CPU_FEATURES_DATAGetCpuFeaturesData (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 GetNumberOfProcessor (OUT UINTN *NumberOfCpus, OUT UINTN *NumberOfEnabledProcessors)
 
VOID SwitchNewBsp (IN UINTN ProcessorNumber)
 
VOID DumpCpuFeatureMask (IN UINT8 *FeatureMask, IN UINT32 BitMaskSize)
 
VOID DumpCpuFeature (IN CPU_FEATURES_ENTRY *CpuFeature, IN UINT32 BitMaskSize)
 
CPU_FEATURE_DEPENDENCE_TYPE DetectFeatureScope (IN CPU_FEATURES_ENTRY *CpuFeature, IN BOOLEAN Before, IN UINT8 *NextCpuFeatureMask)
 
CPU_FEATURE_DEPENDENCE_TYPE DetectNoneNeighborhoodFeatureScope (IN CPU_FEATURES_ENTRY *CpuFeature, IN BOOLEAN Before, IN LIST_ENTRY *FeatureList)
 
VOID EFIAPI SetProcessorRegister (IN OUT VOID *Buffer)
 
ACPI_CPU_DATAGetAcpiCpuData (VOID)
 
MP_SERVICES GetMpService (VOID)
 

Detailed Description

CPU Register Table Library definitions.

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

Definition in file RegisterCpuFeatures.h.

Macro Definition Documentation

◆ CPU_FEATURE_ENTRY_FROM_LINK

#define CPU_FEATURE_ENTRY_FROM_LINK (   a)
Value:
CR ( \
(a), \
Link, \
CPU_FEATURE_ENTRY_SIGNATURE \
)
#define CR(Record, TYPE, Field, TestSignature)
Definition: DebugLib.h:659

Definition at line 92 of file RegisterCpuFeatures.h.

◆ CPU_FEATURE_ENTRY_SIGNATURE

#define CPU_FEATURE_ENTRY_SIGNATURE   SIGNATURE_32 ('C', 'F', 'E', 'S')

Definition at line 28 of file RegisterCpuFeatures.h.

◆ CPU_FEATURE_NAME_SIZE

#define CPU_FEATURE_NAME_SIZE   128

Definition at line 30 of file RegisterCpuFeatures.h.

Function Documentation

◆ DetectFeatureScope()

CPU_FEATURE_DEPENDENCE_TYPE DetectFeatureScope ( IN CPU_FEATURES_ENTRY CpuFeature,
IN BOOLEAN  Before,
IN UINT8 *  NextCpuFeatureMask 
)

Return feature dependence result.

Parameters
[in]CpuFeaturePointer to CPU feature.
[in]BeforeCheck before dependence or after.
[in]NextCpuFeatureMaskPointer to next CPU feature Mask.
Return values
returnthe dependence result.

Definition at line 168 of file RegisterCpuFeaturesLib.c.

◆ DetectNoneNeighborhoodFeatureScope()

CPU_FEATURE_DEPENDENCE_TYPE DetectNoneNeighborhoodFeatureScope ( IN CPU_FEATURES_ENTRY CpuFeature,
IN BOOLEAN  Before,
IN LIST_ENTRY FeatureList 
)

Return feature dependence result.

Parameters
[in]CpuFeaturePointer to CPU feature.
[in]BeforeCheck before dependence or after.
[in]FeatureListPointer to CPU feature list.
Return values
returnthe dependence result.

Definition at line 240 of file RegisterCpuFeaturesLib.c.

◆ DumpCpuFeature()

VOID DumpCpuFeature ( IN CPU_FEATURES_ENTRY CpuFeature,
IN UINT32  BitMaskSize 
)

Dump CPU feature name or CPU feature bit mask.

Parameters
[in]CpuFeaturePointer to CPU_FEATURES_ENTRY
[in]BitMaskSizeCPU feature bits mask buffer size.

Definition at line 43 of file RegisterCpuFeaturesLib.c.

◆ DumpCpuFeatureMask()

VOID DumpCpuFeatureMask ( IN UINT8 *  FeatureMask,
IN UINT32  BitMaskSize 
)

Function that uses DEBUG() macros to display the contents of a a CPU feature bit mask.

Parameters
[in]FeatureMaskA pointer to the CPU feature bit mask.
[in]BitMaskSizeCPU feature bits mask buffer size.

Definition at line 19 of file RegisterCpuFeaturesLib.c.

◆ GetAcpiCpuData()

ACPI_CPU_DATA * GetAcpiCpuData ( VOID  )

Return ACPI_CPU_DATA data.

Returns
Pointer to ACPI_CPU_DATA data.

Return ACPI_CPU_DATA data.

Returns
Pointer to ACPI_CPU_DATA data. NULL if the ACPI CPU data structure cannot be allocated.

Definition at line 973 of file RegisterCpuFeaturesLib.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 MP service pointer.

Returns
MP_SERVICES variable.

Worker function to get EFI_MP_SERVICES_PROTOCOL pointer.

Returns
MP_SERVICES variable.

Worker function to get MP PPI service 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().

Worker function to 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.

◆ SetProcessorRegister()

VOID EFIAPI SetProcessorRegister ( IN OUT VOID *  Buffer)

Programs registers for the calling processor.

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

Definition at line 1256 of file CpuFeaturesInitialize.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.

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]MpEventThe Event used to sync the result.

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.