Kane Chen has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45013 )
Change subject: soc/intel/tigerlake: Add SMRR Locking support ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45013/4/src/soc/intel/tigerlake/smm... File src/soc/intel/tigerlake/smmrelocate.c:
https://review.coreboot.org/c/coreboot/+/45013/4/src/soc/intel/tigerlake/smm... PS4, Line 144: /* Set Lock bit if supported */ : if (mtrr_cap.lo & SMRR_LOCK_SUPPORTED) : relo_params->smrr_mask.lo |= SMRR_PHYS_MASK_LOCK; : : /* Write SMRRs (if supported) on each *core* only */ : if ((mtrr_cap.lo & SMRR_SUPPORTED) && !intel_ht_sibling()) how about this? then the sibling doesn't need to execute other code which is not necessary. thanks.
if (intel_ht_sibling()) return; /* Write SMRR MSRs based on indicated support. */ mtrr_cap = rdmsr(MTRR_CAP_MSR); /* Set Lock bit if supported */ if (mtrr_cap.lo & SMRR_LOCK_SUPPORTED) relo_params->smrr_mask.lo |= SMRR_PHYS_MASK_LOCK;
/* Write SMRRs (if supported) on each *core* only */ if ((mtrr_cap.lo & SMRR_SUPPORTED)) ... Or
if (!intel_ht_sibling()) { //* Write SMRR MSRs based on indicated support. */ mtrr_cap = rdmsr(MTRR_CAP_MSR); /* Set Lock bit if supported */ if (mtrr_cap.lo & SMRR_LOCK_SUPPORTED) relo_params->smrr_mask.lo |= SMRR_PHYS_MASK_LOCK;
/* Write SMRRs (if supported) on each *core* only */ if ((mtrr_cap.lo & SMRR_SUPPORTED)) .... }