summaryrefslogtreecommitdiffstats
path: root/src/soc/amd/sabrina/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/sabrina/cpu.c')
-rw-r--r--src/soc/amd/sabrina/cpu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/soc/amd/sabrina/cpu.c b/src/soc/amd/sabrina/cpu.c
index addbf7ec18c9..462fb0d6fdaf 100644
--- a/src/soc/amd/sabrina/cpu.c
+++ b/src/soc/amd/sabrina/cpu.c
@@ -9,6 +9,7 @@
#include <assert.h>
#include <console/console.h>
#include <cpu/amd/microcode.h>
+#include <cpu/amd/mtrr.h>
#include <cpu/cpu.h>
#include <cpu/x86/mp.h>
#include <cpu/x86/mtrr.h>
@@ -33,7 +34,11 @@ _Static_assert(CONFIG_MAX_CPUS == 8, "Do not override MAX_CPUS. To reduce the nu
*/
static void pre_mp_init(void)
{
- x86_setup_mtrrs_with_detect_no_above_4gb();
+ const msr_t syscfg = rdmsr(SYSCFG_MSR);
+ if (syscfg.lo & SYSCFG_MSR_TOM2WB)
+ x86_setup_mtrrs_with_detect_no_above_4gb();
+ else
+ x86_setup_mtrrs_with_detect();
x86_mtrr_check();
}