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:
Eric Dong
2018-10-17 09:24:05 +08:00
parent 38381e18bf
commit d28daaddb3
12 changed files with 190 additions and 0 deletions

View File

@@ -74,6 +74,17 @@ PendingBreakInitialize (
IN BOOLEAN State
)
{
//
// The scope of the MSR_ATOM_IA32_MISC_ENABLE is core for below processor type, only program
// MSR_ATOM_IA32_MISC_ENABLE for thread 0 in each core.
//
// Support function has check the processer type for this feature, no need to check again
// here.
//
if (CpuInfo->ProcessorInfo.Location.Thread != 0) {
return RETURN_SUCCESS;
}
//
// ATOM, CORE2, CORE, PENTIUM_4 and IS_PENTIUM_M_PROCESSOR have the same MSR index,
// Simply use MSR_ATOM_IA32_MISC_ENABLE here