Report 4 GB cacheable memory on Deschutes CPUs, fixes modern Linux limiting itself to 512 MB on some machines

This commit is contained in:
RichardG867
2025-04-02 16:27:10 -03:00
parent 57851e7606
commit f56f636248

View File

@@ -2649,6 +2649,11 @@ cpu_ven_reset(void)
case CPU_PENTIUM2:
case CPU_PENTIUM2D:
msr.mtrr_cap = 0x00000508ULL;
/* 4 GB cacheable space on Deschutes 651h and later (including the 1632h
Overdrive) according to the Pentium II Processor Specification Update. */
if (cpu_s->cpuid_model >= 0x651)
msr.bbl_cr_ctl3 |= 0x00300000;
break;
case CPU_CYRIX3S:
@@ -4103,7 +4108,7 @@ pentium_invalid_wrmsr:
break;
/* BBL_CR_CTL3 - L2 Cache Control Register 3 */
case 0x11e:
msr.bbl_cr_ctl3 = EAX | ((uint64_t) EDX << 32);
msr.bbl_cr_ctl3 = (msr.bbl_cr_ctl3 & 0x02f00000) | (EAX & ~0x02f00000) | ((uint64_t) EDX << 32);
break;
/* Unknown */
case 0x131: