Pratikkumar V Prajapati has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/71646 )
Change subject: soc/intel/common: Use CPUID_STRUCT_EXTENDED_FEATURE_FLAGS macro ......................................................................
soc/intel/common: Use CPUID_STRUCT_EXTENDED_FEATURE_FLAGS macro
Use CPUID_STRUCT_EXTENDED_FEATURE_FLAGS macro to get extended CPU capabilities flags using cpuid_ext inline function.
Signed-off-by: Pratikkumar Prajapati pratikkumar.v.prajapati@intel.com Change-Id: If680ffff64e2e1dabded8c03c4042d349a11b635 --- M src/soc/intel/common/block/cpu/cpulib.c 1 file changed, 19 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/71646/1
diff --git a/src/soc/intel/common/block/cpu/cpulib.c b/src/soc/intel/common/block/cpu/cpulib.c index a62bc0f..7a8b80d 100644 --- a/src/soc/intel/common/block/cpu/cpulib.c +++ b/src/soc/intel/common/block/cpu/cpulib.c @@ -510,8 +510,8 @@ { struct cpuid_result cpuid_regs;
- cpuid_regs = cpuid_ext(0x7, 0x0); /* ECX[13] is feature capability */ - + /* ECX[13] is feature capability */ + cpuid_regs = cpuid_ext(CPUID_STRUCT_EXTENDED_FEATURE_FLAGS, 0x0); return (cpuid_regs.ecx & TME_SUPPORTED); }
@@ -533,7 +533,8 @@ struct cpuid_result cpuid_regs; msr_t msr;
- cpuid_regs = cpuid_ext(0x7, 0x0); /* EBX[2] is feature capability */ + /* EBX[2] is feature capability */ + cpuid_regs = cpuid_ext(CPUID_STRUCT_EXTENDED_FEATURE_FLAGS, 0x0); msr = rdmsr(MTRR_CAP_MSR); /* Bit 12 is PRMRR enablement */ return ((cpuid_regs.ebx & SGX_SUPPORTED) && (msr.lo & MTRR_CAP_PRMRR)); } @@ -548,7 +549,8 @@ struct cpuid_result cpuid_regs; msr_t msr;
- cpuid_regs = cpuid_ext(0x7, 0x0); /* ECX[23] is feature capability */ + /* ECX[23] is feature capability */ + cpuid_regs = cpuid_ext(CPUID_STRUCT_EXTENDED_FEATURE_FLAGS, 0x0); msr = rdmsr(MTRR_CAP_MSR); /* Bit 12 is PRMRR enablement */ return ((cpuid_regs.ecx & KEYLOCKER_SUPPORTED) && (msr.lo & MTRR_CAP_PRMRR)); }