TianoCore EDK2 master
|
#include "RegisterCpuFeatures.h"
Go to the source code of this file.
Functions | |
VOID | SetCapabilityPcd (IN UINT8 *SupportedFeatureMask, IN UINTN BitMaskSize) |
VOID | SetSettingPcd (IN UINT8 *SupportedFeatureMask, IN UINTN BitMaskSize) |
VOID | FillProcessorInfo (IN OUT REGISTER_CPU_FEATURE_INFORMATION *CpuInfo) |
VOID | CpuInitDataInitialize (VOID) |
VOID | SupportedMaskOr (IN UINT8 *SupportedFeatureMask, IN UINT8 *OrFeatureBitMask, IN UINT32 BitMaskSize) |
VOID | SupportedMaskAnd (IN UINT8 *SupportedFeatureMask, IN CONST UINT8 *AndFeatureBitMask, IN UINT32 BitMaskSize) |
VOID | SupportedMaskCleanBit (IN UINT8 *SupportedFeatureMask, IN UINT8 *AndFeatureBitMask, IN UINT32 BitMaskSize) |
BOOLEAN | IsBitMaskMatch (IN UINT8 *SupportedFeatureMask, IN UINT8 *ComparedFeatureBitMask, IN UINT32 BitMaskSize) |
VOID EFIAPI | CollectProcessorData (IN OUT VOID *Buffer) |
VOID | DumpRegisterTableOnProcessor (IN UINTN ProcessorNumber) |
CPU_FEATURE_DEPENDENCE_TYPE | BiggestDep (IN CPU_FEATURE_DEPENDENCE_TYPE BeforeDep, IN CPU_FEATURE_DEPENDENCE_TYPE AfterDep, IN CPU_FEATURE_DEPENDENCE_TYPE NoneNeibBeforeDep, IN CPU_FEATURE_DEPENDENCE_TYPE NoneNeibAfterDep) |
VOID | AnalysisProcessorFeatures (IN UINTN NumberOfCpus) |
VOID | LibReleaseSemaphore (IN OUT volatile UINT32 *Sem) |
VOID | LibWaitForSemaphore (IN OUT volatile UINT32 *Sem) |
UINTN | ReadWriteCr (IN UINT32 CrIndex, IN BOOLEAN Read, IN OUT UINTN *CrValue) |
VOID | ProgramProcessorRegister (IN CPU_REGISTER_TABLE *RegisterTable, IN EFI_CPU_PHYSICAL_LOCATION *ApLocation, IN CPU_STATUS_INFORMATION *CpuStatus, IN PROGRAM_CPU_REGISTER_FLAGS *CpuFlags) |
VOID EFIAPI | SetProcessorRegister (IN OUT VOID *Buffer) |
VOID EFIAPI | CpuFeaturesDetect (VOID) |
Variables | |
CHAR16 * | mDependTypeStr [] = { L"None", L"Thread", L"Core", L"Package", L"Invalid" } |
CPU Features Initialize functions.
Copyright (c) 2017 - 2023, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CpuFeaturesInitialize.c.
Analysis register CPU features on each processor and save CPU setting in CPU register table.
[in] | NumberOfCpus | Number of processor in system |
Definition at line 714 of file CpuFeaturesInitialize.c.
CPU_FEATURE_DEPENDENCE_TYPE BiggestDep | ( | IN CPU_FEATURE_DEPENDENCE_TYPE | BeforeDep, |
IN CPU_FEATURE_DEPENDENCE_TYPE | AfterDep, | ||
IN CPU_FEATURE_DEPENDENCE_TYPE | NoneNeibBeforeDep, | ||
IN CPU_FEATURE_DEPENDENCE_TYPE | NoneNeibAfterDep | ||
) |
Get the biggest dependence type. PackageDepType > CoreDepType > ThreadDepType > NoneDepType.
[in] | BeforeDep | Before dependence type. |
[in] | AfterDep | After dependence type. |
[in] | NoneNeibBeforeDep | Before dependence type for not neighborhood features. |
[in] | NoneNeibAfterDep | After dependence type for not neighborhood features. |
Return | the biggest dependence type. |
Definition at line 693 of file CpuFeaturesInitialize.c.
Collects processor data for calling processor.
[in,out] | Buffer | The pointer to private data buffer. |
Definition at line 544 of file CpuFeaturesInitialize.c.
VOID EFIAPI CpuFeaturesDetect | ( | VOID | ) |
Performs CPU features detection.
This service will invoke MP service to check CPU features' capabilities on BSP/APs.
Definition at line 1304 of file CpuFeaturesInitialize.c.
VOID CpuInitDataInitialize | ( | VOID | ) |
Prepares for private data used for CPU features.
Definition at line 91 of file CpuFeaturesInitialize.c.
Dump the contents of a CPU register table.
[in] | ProcessorNumber | The index of the CPU to show the register table contents |
Definition at line 593 of file CpuFeaturesInitialize.c.
VOID FillProcessorInfo | ( | IN OUT REGISTER_CPU_FEATURE_INFORMATION * | CpuInfo | ) |
Collects CPU type and feature information.
[in,out] | CpuInfo | The pointer to CPU feature information |
Definition at line 56 of file CpuFeaturesInitialize.c.
BOOLEAN IsBitMaskMatch | ( | IN UINT8 * | SupportedFeatureMask, |
IN UINT8 * | ComparedFeatureBitMask, | ||
IN UINT32 | BitMaskSize | ||
) |
Worker function to check if the compared CPU feature set in the CPU feature supported bits mask buffer.
[in] | SupportedFeatureMask | The pointer to CPU feature bits mask buffer |
[in] | ComparedFeatureBitMask | The feature bit mask to be compared |
[in] | BitMaskSize | CPU feature bits mask buffer size. |
TRUE | The ComparedFeatureBitMask is set in CPU feature supported bits mask buffer. |
FALSE | The ComparedFeatureBitMask is not set in CPU feature supported bits mask buffer. |
Definition at line 516 of file CpuFeaturesInitialize.c.
Increment semaphore by 1.
Sem | IN: 32-bit unsigned integer |
Definition at line 907 of file CpuFeaturesInitialize.c.
Decrement the semaphore by 1 if it is not zero.
Performs an atomic decrement operation for semaphore. The compare exchange operation must be performed using MP safe mechanisms.
Sem | IN: 32-bit unsigned integer |
Definition at line 925 of file CpuFeaturesInitialize.c.
VOID ProgramProcessorRegister | ( | IN CPU_REGISTER_TABLE * | RegisterTable, |
IN EFI_CPU_PHYSICAL_LOCATION * | ApLocation, | ||
IN CPU_STATUS_INFORMATION * | CpuStatus, | ||
IN PROGRAM_CPU_REGISTER_FLAGS * | CpuFlags | ||
) |
Initialize the CPU registers from a register table.
[in] | RegisterTable | The register table for this AP. |
[in] | ApLocation | AP location info for this ap. |
[in] | CpuStatus | CPU status info for this CPU. |
[in] | CpuFlags | Flags data structure used when program the register. |
Definition at line 1008 of file CpuFeaturesInitialize.c.
Read / write CR value.
[in] | CrIndex | The CR index which need to read/write. |
[in] | Read | Read or write. TRUE is read. |
[in,out] | CrValue | CR value. |
EFI_SUCCESS | means read/write success, else return EFI_UNSUPPORTED. |
Definition at line 951 of file CpuFeaturesInitialize.c.
Worker function to save PcdCpuFeaturesCapability.
[in] | SupportedFeatureMask | The pointer to CPU feature bits mask buffer |
[in] | BitMaskSize | CPU feature bits mask buffer size. |
Definition at line 21 of file CpuFeaturesInitialize.c.
Programs registers for the calling processor.
[in,out] | Buffer | The pointer to private data buffer. |
Definition at line 1256 of file CpuFeaturesInitialize.c.
Worker function to save PcdCpuFeaturesSetting.
[in] | SupportedFeatureMask | The pointer to CPU feature bits mask buffer |
[in] | BitMaskSize | CPU feature bits mask buffer size. |
Definition at line 39 of file CpuFeaturesInitialize.c.
VOID SupportedMaskAnd | ( | IN UINT8 * | SupportedFeatureMask, |
IN CONST UINT8 * | AndFeatureBitMask, | ||
IN UINT32 | BitMaskSize | ||
) |
Worker function to do AND operation on CPU feature supported bits mask buffer.
[in] | SupportedFeatureMask | The pointer to CPU feature bits mask buffer |
[in] | AndFeatureBitMask | The feature bit mask to do AND operation |
[in] | BitMaskSize | CPU feature bits mask buffer size. |
Definition at line 460 of file CpuFeaturesInitialize.c.
VOID SupportedMaskCleanBit | ( | IN UINT8 * | SupportedFeatureMask, |
IN UINT8 * | AndFeatureBitMask, | ||
IN UINT32 | BitMaskSize | ||
) |
Worker function to clean bit operation on CPU feature supported bits mask buffer.
[in] | SupportedFeatureMask | The pointer to CPU feature bits mask buffer |
[in] | AndFeatureBitMask | The feature bit mask to do XOR operation |
[in] | BitMaskSize | CPU feature bits mask buffer size. |
Definition at line 485 of file CpuFeaturesInitialize.c.
VOID SupportedMaskOr | ( | IN UINT8 * | SupportedFeatureMask, |
IN UINT8 * | OrFeatureBitMask, | ||
IN UINT32 | BitMaskSize | ||
) |
Worker function to do OR operation on CPU feature supported bits mask buffer.
[in] | SupportedFeatureMask | The pointer to CPU feature bits mask buffer |
[in] | OrFeatureBitMask | The feature bit mask to do OR operation |
[in] | BitMaskSize | The CPU feature bits mask buffer size. |
Definition at line 434 of file CpuFeaturesInitialize.c.
CHAR16* mDependTypeStr[] = { L"None", L"Thread", L"Core", L"Package", L"Invalid" } |
Definition at line 11 of file CpuFeaturesInitialize.c.