UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info.
Because MSR has scope attribute, driver has no needs to set MSR for all APs if MSR scope is core or package type. This patch updates code to base on the MSR scope value to add MSR to the register table. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
@ -70,6 +70,20 @@ LimitCpuidMaxvalInitialize (
|
||||
IN BOOLEAN State
|
||||
)
|
||||
{
|
||||
//
|
||||
// The scope of LimitCpuidMaxval bit in the MSR_IA32_MISC_ENABLE is core for below
|
||||
// processor type, only program MSR_IA32_MISC_ENABLE for thread 0 in each core.
|
||||
//
|
||||
if (IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
|
||||
|
||||
IS_SILVERMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
|
||||
IS_GOLDMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
|
||||
IS_CORE_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
|
||||
IS_CORE2_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel)) {
|
||||
if (CpuInfo->ProcessorInfo.Location.Thread != 0) {
|
||||
return RETURN_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
CPU_REGISTER_TABLE_WRITE_FIELD (
|
||||
ProcessorNumber,
|
||||
|
Reference in New Issue
Block a user