UefiCpuPkg[all]
0.90
|
Data Structures | |
struct | REGISTER_CPU_FEATURE_FIRST_PROCESSOR |
struct | REGISTER_CPU_FEATURE_INFORMATION |
Typedefs | |
typedef VOID *(EFIAPI * | CPU_FEATURE_GET_CONFIG_DATA )(IN UINTN NumberOfProcessors) |
typedef BOOLEAN(EFIAPI * | CPU_FEATURE_SUPPORT )(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData) |
typedef RETURN_STATUS(EFIAPI * | CPU_FEATURE_INITIALIZE )(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData, IN BOOLEAN State) |
Functions | |
BOOLEAN EFIAPI | IsCpuFeatureSupported (IN UINT32 Feature) |
BOOLEAN EFIAPI | IsCpuFeatureInSetting (IN UINT32 Feature) |
RETURN_STATUS EFIAPI | RegisterCpuFeature (IN CHAR8 *FeatureName, IN CPU_FEATURE_GET_CONFIG_DATA GetConfigDataFunc, IN CPU_FEATURE_SUPPORT SupportFunc, IN CPU_FEATURE_INITIALIZE InitializeFunc,...) |
VOID EFIAPI | CpuFeaturesDetect (VOID) |
VOID EFIAPI | CpuFeaturesInitialize (VOID) |
VOID EFIAPI | SwitchBspAfterFeaturesInitialize (IN UINTN ProcessorNumber) |
VOID EFIAPI | CpuRegisterTableWrite (IN UINTN ProcessorNumber, IN REGISTER_TYPE RegisterType, IN UINT64 Index, IN UINT64 ValueMask, IN UINT64 Value) |
VOID EFIAPI | CpuRegisterTableTestThenWrite (IN UINTN ProcessorNumber, IN REGISTER_TYPE RegisterType, IN UINT64 Index, IN UINT64 ValueMask, IN UINT64 Value) |
VOID EFIAPI | PreSmmCpuRegisterTableWrite (IN UINTN ProcessorNumber, IN REGISTER_TYPE RegisterType, IN UINT64 Index, IN UINT64 ValueMask, IN UINT64 Value) |
Register CPU Features Library to register and manage CPU features.
Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
#define CPU_FEATURE_ACPI 3 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_ADJACENT_CACHE_LINE_PREFETCH (32+3) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_AESNI 0 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_AFTER_ALL BIT24 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_APIC_TPR_UPDATE_MESSAGE (32+9) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_BEFORE_ALL BIT23 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_C1_AUTO_DEMOTION 17 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_C1_UNDEMOTION 19 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_C1E 16 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_C3_AUTO_DEMOTION 18 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_C3_UNDEMOTION 20 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_C_STATE 21 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_CORE_AFTER BIT28 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_CORE_BEFORE BIT27 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_DCU_PREFETCHER (32+4) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_EIST 4 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_END MAX_UINT32 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_ENERGY_PERFORMANCE_BIAS (32+10) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_FASTSTRINGS 6 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_HARDWARE_PREFETCHER (32+2) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_IP_PREFETCHER (32+5) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_L1_DATA_PREFETCHER (32+1) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_L2_PREFETCHER (32+0) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_LIMIT_CPUID_MAX_VAL 11 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_LMCE 9 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_LOCK_FEATURE_CONTROL_REGISTER 10 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_MCA 13 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_MCE 12 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_MCG_CTL 14 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_MLC_SPATIAL_PREFETCHER (32+7) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_MLC_STREAMER_PREFETCHER (32+6) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_MWAIT 2 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_PACKAGE_AFTER BIT30 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_PACKAGE_BEFORE BIT29 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_PENDING_BREAK 15 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_PPIN (32+11) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_PROC_TRACE (32+12) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_RESERVED_25 25 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_RESERVED_26 26 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_RESERVED_27 27 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_RESERVED_28 28 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_RESERVED_29 29 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_RESERVED_30 30 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_RESERVED_31 31 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_RESERVED_5 5 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_SMX 8 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_THREAD_AFTER BIT26 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_THREAD_BEFORE BIT25 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_THREE_STRIKE_COUNTER (32+8) |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_TM 22 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_TM2 23 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_TURBO_MODE 1 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_VMX 7 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_FEATURE_X2APIC 24 |
Defines used to identify a CPU feature. The lower 16-bits are used to identify a unique CPU feature and the value represents a bit number in a bit mask. The upper 16-bits are bit mask values that are used as modifiers of a CPU feature. When used in a list, the define value CPU_FEATURE_END is used to terminate a list of CPU feature values.
#define CPU_REGISTER_TABLE_TEST_THEN_WRITE32 | ( | ProcessorNumber, | |
RegisterType, | |||
Index, | |||
Value | |||
) |
Adds a 32-bit register write entry in specified register table.
This macro adds an entry in specified register table, with given register type, register index, and value.
Driver will test the current value before setting new value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry. |
[in] | RegisterType | Type of the register to program |
[in] | Index | Index of the register to program |
[in] | Value | Value to write |
#define CPU_REGISTER_TABLE_TEST_THEN_WRITE64 | ( | ProcessorNumber, | |
RegisterType, | |||
Index, | |||
Value | |||
) |
Adds a 64-bit register write entry in specified register table.
This macro adds an entry in specified register table, with given register type, register index, and value.
Driver will test the current value before setting new value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry. |
[in] | RegisterType | Type of the register to program |
[in] | Index | Index of the register to program |
[in] | Value | Value to write |
#define CPU_REGISTER_TABLE_TEST_THEN_WRITE_FIELD | ( | ProcessorNumber, | |
RegisterType, | |||
Index, | |||
Type, | |||
Field, | |||
Value | |||
) |
Adds a bit field write entry in specified register table.
This macro adds an entry in specified register table, with given register type, register index, bit field section, and value.
Driver will test the current value before setting new value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry. |
[in] | RegisterType | Type of the register to program. |
[in] | Index | Index of the register to program. |
[in] | Type | The data type name of a register structure. |
[in] | Field | The bit fiel name in register structure to write. |
[in] | Value | Value to write to the bit field. |
#define CPU_REGISTER_TABLE_WRITE32 | ( | ProcessorNumber, | |
RegisterType, | |||
Index, | |||
Value | |||
) |
Adds a 32-bit register write entry in specified register table.
This macro adds an entry in specified register table, with given register type, register index, and value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry. |
[in] | RegisterType | Type of the register to program |
[in] | Index | Index of the register to program |
[in] | Value | Value to write |
#define CPU_REGISTER_TABLE_WRITE64 | ( | ProcessorNumber, | |
RegisterType, | |||
Index, | |||
Value | |||
) |
Adds a 64-bit register write entry in specified register table.
This macro adds an entry in specified register table, with given register type, register index, and value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry. |
[in] | RegisterType | Type of the register to program |
[in] | Index | Index of the register to program |
[in] | Value | Value to write |
#define CPU_REGISTER_TABLE_WRITE_FIELD | ( | ProcessorNumber, | |
RegisterType, | |||
Index, | |||
Type, | |||
Field, | |||
Value | |||
) |
Adds a bit field write entry in specified register table.
This macro adds an entry in specified register table, with given register type, register index, bit field section, and value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry. |
[in] | RegisterType | Type of the register to program. |
[in] | Index | Index of the register to program. |
[in] | Type | The data type name of a register structure. |
[in] | Field | The bit fiel name in register structure to write. |
[in] | Value | Value to write to the bit field. |
#define PRE_SMM_CPU_REGISTER_TABLE_WRITE32 | ( | ProcessorNumber, | |
RegisterType, | |||
Index, | |||
Value | |||
) |
Adds a 32-bit register write entry in specified register table.
This macro adds an entry in specified register table, with given register type, register index, and value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry. |
[in] | RegisterType | Type of the register to program |
[in] | Index | Index of the register to program |
[in] | Value | Value to write |
#define PRE_SMM_CPU_REGISTER_TABLE_WRITE64 | ( | ProcessorNumber, | |
RegisterType, | |||
Index, | |||
Value | |||
) |
Adds a 64-bit register write entry in specified register table.
This macro adds an entry in specified register table, with given register type, register index, and value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry. |
[in] | RegisterType | Type of the register to program |
[in] | Index | Index of the register to program |
[in] | Value | Value to write |
#define PRE_SMM_CPU_REGISTER_TABLE_WRITE_FIELD | ( | ProcessorNumber, | |
RegisterType, | |||
Index, | |||
Type, | |||
Field, | |||
Value | |||
) |
Adds a bit field write entry in specified register table.
This macro adds an entry in specified register table, with given register type, register index, bit field section, and value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry. |
[in] | RegisterType | Type of the register to program. |
[in] | Index | Index of the register to program. |
[in] | Type | The data type name of a register structure. |
[in] | Field | The bit fiel name in register structure to write. |
[in] | Value | Value to write to the bit field. |
typedef VOID*(EFIAPI * CPU_FEATURE_GET_CONFIG_DATA)(IN UINTN NumberOfProcessors) |
Prepares for the data used by CPU feature detection and initialization.
[in] | NumberOfProcessors | The number of CPUs in the platform. |
typedef RETURN_STATUS(EFIAPI * CPU_FEATURE_INITIALIZE)(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData, IN BOOLEAN State) |
Initializes CPU feature to specific state.
This service does not initialize hardware and only produces entries in the Register Table for specified processor. Hardware initialization on BSP/APs will be done in CpuFeaturesInitialize().
[in] | ProcessorNumber | The index of the CPU executing this function. |
[in] | CpuInfo | A pointer to the REGISTER_CPU_FEATURE_INFORMATION structure for the CPU executing this function. |
[in] | ConfigData | A pointer to the configuration buffer returned by CPU_FEATURE_GET_CONFIG_DATA. NULL if CPU_FEATURE_GET_CONFIG_DATA was not provided in RegisterCpuFeature(). |
[in] | State | If TRUE, then the CPU feature must be enabled. If FALSE, then the CPU feature must be disabled. |
RETURN_SUCCESS | CPU feature is initialized. |
typedef BOOLEAN(EFIAPI * CPU_FEATURE_SUPPORT)(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData) |
Detects if CPU feature supported on current processor.
[in] | ProcessorNumber | The index of the CPU executing this function. |
[in] | CpuInfo | A pointer to the REGISTER_CPU_FEATURE_INFORMATION structure for the CPU executing this function. |
[in] | ConfigData | A pointer to the configuration buffer returned by CPU_FEATURE_GET_CONFIG_DATA. NULL if CPU_FEATURE_GET_CONFIG_DATA was not provided in RegisterCpuFeature(). |
TRUE | CPU feature is supported. |
FALSE | CPU feature is not supported. |
VOID EFIAPI CpuFeaturesDetect | ( | VOID | ) |
Performs CPU features detection.
This service will invoke MP service to check CPU features' capabilities on BSP/APs.
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.
VOID EFIAPI CpuRegisterTableTestThenWrite | ( | IN UINTN | ProcessorNumber, |
IN REGISTER_TYPE | RegisterType, | ||
IN UINT64 | Index, | ||
IN UINT64 | ValueMask, | ||
IN UINT64 | Value | ||
) |
Adds an entry in specified register table.
This function adds an entry in specified register table, with given register type, register index, bit section and value.
Driver will test the current value before setting new value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry |
[in] | RegisterType | Type of the register to program |
[in] | Index | Index of the register to program |
[in] | ValueMask | Mask of bits in register to write |
[in] | Value | Value to write |
VOID EFIAPI CpuRegisterTableWrite | ( | IN UINTN | ProcessorNumber, |
IN REGISTER_TYPE | RegisterType, | ||
IN UINT64 | Index, | ||
IN UINT64 | ValueMask, | ||
IN UINT64 | Value | ||
) |
Adds an entry in specified register table.
This function adds an entry in specified register table, with given register type, register index, bit section and value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry. |
[in] | RegisterType | Type of the register to program |
[in] | Index | Index of the register to program |
[in] | ValueMask | Mask of bits in register to write |
[in] | Value | Value to write |
BOOLEAN EFIAPI IsCpuFeatureInSetting | ( | IN UINT32 | Feature | ) |
Determines if a CPU feature is set in PcdCpuFeaturesSetting bit mask.
[in] | Feature | The bit number of the CPU feature to check in the PCD PcdCpuFeaturesSetting. |
TRUE | The CPU feature is set in PcdCpuFeaturesSetting. |
FALSE | The CPU feature is not set in PcdCpuFeaturesSetting. |
BOOLEAN EFIAPI IsCpuFeatureSupported | ( | IN UINT32 | Feature | ) |
Determines if a CPU feature is enabled in PcdCpuFeaturesSupport bit mask. If a CPU feature is disabled in PcdCpuFeaturesSupport then all the code/data associated with that feature should be optimized away if compiler optimizations are enabled.
[in] | Feature | The bit number of the CPU feature to check in the PCD PcdCpuFeaturesSupport. |
TRUE | The CPU feature is set in PcdCpuFeaturesSupport. |
FALSE | The CPU feature is not set in PcdCpuFeaturesSupport. |
VOID EFIAPI PreSmmCpuRegisterTableWrite | ( | IN UINTN | ProcessorNumber, |
IN REGISTER_TYPE | RegisterType, | ||
IN UINT64 | Index, | ||
IN UINT64 | ValueMask, | ||
IN UINT64 | Value | ||
) |
Adds an entry in specified Pre-SMM register table.
This function adds an entry in specified register table, with given register type, register index, bit section and value.
[in] | ProcessorNumber | The index of the CPU to add a register table entry. |
[in] | RegisterType | Type of the register to program |
[in] | Index | Index of the register to program |
[in] | ValueMask | Mask of bits in register to write |
[in] | Value | Value to write |
RETURN_STATUS EFIAPI RegisterCpuFeature | ( | IN CHAR8 * | FeatureName, |
IN CPU_FEATURE_GET_CONFIG_DATA | GetConfigDataFunc, | ||
IN CPU_FEATURE_SUPPORT | SupportFunc, | ||
IN CPU_FEATURE_INITIALIZE | InitializeFunc, | ||
... | |||
) |
Registers a CPU Feature.
[in] | FeatureName | A Null-terminated Ascii string indicates CPU feature name. |
[in] | GetConfigDataFunc | CPU feature get configuration data function. This is an optional parameter that may be NULL. If NULL, then the most recently registered function for the CPU feature is used. If no functions are registered for a CPU feature, then the CPU configuration data for the registered feature is NULL. |
[in] | SupportFunc | CPU feature support function. This is an optional parameter that may be NULL. If NULL, then the most recently registered function for the CPU feature is used. If no functions are registered for a CPU feature, then the CPU feature is assumed to be supported by all CPUs. |
[in] | InitializeFunc | CPU feature initialize function. This is an optional parameter that may be NULL. If NULL, then the most recently registered function for the CPU feature is used. If no functions are registered for a CPU feature, then the CPU feature initialization is skipped. |
[in] | ... | Variable argument list of UINT32 CPU feature value. Values with no modifiers are the features provided by the registered functions. Values with CPU_FEATURE_BEFORE modifier are features that must be initialized after the features provided by the registered functions are used. Values with CPU_FEATURE_AFTER modifier are features that must be initialized before the features provided by the registered functions are used. The last argument in this variable argument list must always be CPU_FEATURE_END. |
RETURN_SUCCESS | The CPU feature was successfully registered. |
RETURN_OUT_OF_RESOURCES | There are not enough resources to register the CPU feature. |
RETURN_UNSUPPORTED | Registration of the CPU feature is not supported due to a circular dependency between BEFORE and AFTER features. |
VOID EFIAPI SwitchBspAfterFeaturesInitialize | ( | IN UINTN | ProcessorNumber | ) |
Switches to assigned BSP after CPU features initialization.
[in] | ProcessorNumber | The index of the CPU executing this function. |