summaryrefslogtreecommitdiff
path: root/src/security
diff options
context:
space:
mode:
Diffstat (limited to 'src/security')
-rw-r--r--src/security/intel/txt/common.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/security/intel/txt/common.c b/src/security/intel/txt/common.c
index 239e152014..011e8ccd3f 100644
--- a/src/security/intel/txt/common.c
+++ b/src/security/intel/txt/common.c
@@ -481,8 +481,7 @@ bool intel_txt_prepare_txt_env(void)
* Make sure there are no uncorrectable MCE errors.
* Intel 64 and IA-32 Architectures Software Developer Manuals Vol 2D
*/
- msr = rdmsr(IA32_MCG_CAP);
- size_t max_mc_msr = msr.lo & MCA_BANKS_MASK;
+ size_t max_mc_msr = mca_get_bank_count();
for (size_t i = 0; i < max_mc_msr; i++) {
msr = rdmsr(IA32_MC0_STATUS + 4 * i);
if (!(msr.hi & MCA_STATUS_HI_UC))