From ae18f80febc3ecaacc0314e942a4f8b248bfcc4c Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 17 Apr 2018 11:37:28 -0600 Subject: cpu/x86: move NXE and PAT accesses to paging module The EFER and PAT MSRs are x86 architecturally defined. Therefore, move the macro defintions to msr.h. Add 'paging' prefix to the PAT and NXE pae/paging functions to namespace things a little better. BUG=b:72728953 Change-Id: I1ab2c4ff827e19d5ba4e3b6eaedb3fee6aaef14d Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/25713 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Justin TerAvest --- src/soc/intel/common/block/cpu/cpulib.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/soc/intel/common/block/cpu') diff --git a/src/soc/intel/common/block/cpu/cpulib.c b/src/soc/intel/common/block/cpu/cpulib.c index 0b1599a804..e768f8c5a4 100644 --- a/src/soc/intel/common/block/cpu/cpulib.c +++ b/src/soc/intel/common/block/cpu/cpulib.c @@ -314,23 +314,3 @@ void mca_configure(void) (msr_t) {.lo = 0xffffffff, .hi = 0xffffffff}); } } - -void set_nxe(uint8_t enable) -{ - msr_t msr = rdmsr(IA32_EFER); - - if (enable) - msr.lo |= EFER_NXE; - else - msr.lo &= ~EFER_NXE; - - wrmsr(IA32_EFER, msr); -} - -void set_pat(uint64_t pat) -{ - msr_t msr; - msr.lo = pat; - msr.hi = pat >> 32; - wrmsr(MSR_IA32_PAT, msr); -} -- cgit v1.2.3