aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/xeon_sp/skx
diff options
context:
space:
mode:
authorMarc Jones <marcjones@sysproconsulting.com>2020-10-15 15:16:45 -0600
committerMarc Jones <marc@marcjonesconsulting.com>2020-10-30 17:13:53 +0000
commit53b465d1c19502776853c236dbc7afb2c53f0c87 (patch)
tree37a2a43b43478b5316994d1e443b37e8a96d794a /src/soc/intel/xeon_sp/skx
parent1f500845b439b5f5bfb8aa34bed8e5db2e266ff7 (diff)
soc/intel/xeon_sp: Move read_msr_ppin() to common util.c
Move CPX and SKX read_msr_ppin() to common util.c file. Update drivers/ocp/smbios #include to match. Change-Id: I4c4281d2d5ce679f5444a502fa88df04de9f2cd8 Signed-off-by: Marc Jones <marcjones@sysproconsulting.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46479 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jay Talbott <JayTalbott@sysproconsulting.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc/intel/xeon_sp/skx')
-rw-r--r--src/soc/intel/xeon_sp/skx/cpu.c31
-rw-r--r--src/soc/intel/xeon_sp/skx/include/soc/cpu.h1
2 files changed, 0 insertions, 32 deletions
diff --git a/src/soc/intel/xeon_sp/skx/cpu.c b/src/soc/intel/xeon_sp/skx/cpu.c
index 581378b410..874bcfd6d7 100644
--- a/src/soc/intel/xeon_sp/skx/cpu.c
+++ b/src/soc/intel/xeon_sp/skx/cpu.c
@@ -245,34 +245,3 @@ void xeon_sp_init_cpus(struct device *dev)
FUNC_EXIT();
}
-
-msr_t read_msr_ppin(void)
-{
- msr_t ppin = {0};
- msr_t msr;
-
- /* If MSR_PLATFORM_INFO PPIN_CAP is 0, PPIN capability is not supported */
- msr = rdmsr(MSR_PLATFORM_INFO);
- if ((msr.lo & MSR_PPIN_CAP) == 0) {
- printk(BIOS_ERR, "MSR_PPIN_CAP is 0, PPIN is not supported\n");
- return ppin;
- }
-
- /* Access to MSR_PPIN is permitted only if MSR_PPIN_CTL LOCK is 0 and ENABLE is 1 */
- msr = rdmsr(MSR_PPIN_CTL);
- if (msr.lo & MSR_PPIN_CTL_LOCK) {
- printk(BIOS_ERR, "MSR_PPIN_CTL_LOCK is 1, PPIN access is not allowed\n");
- return ppin;
- }
-
- if ((msr.lo & MSR_PPIN_CTL_ENABLE) == 0) {
- /* Set MSR_PPIN_CTL ENABLE to 1 */
- msr.lo |= MSR_PPIN_CTL_ENABLE;
- wrmsr(MSR_PPIN_CTL, msr);
- }
- ppin = rdmsr(MSR_PPIN);
- /* Set enable to 0 after reading MSR_PPIN */
- msr.lo &= ~MSR_PPIN_CTL_ENABLE;
- wrmsr(MSR_PPIN_CTL, msr);
- return ppin;
-}
diff --git a/src/soc/intel/xeon_sp/skx/include/soc/cpu.h b/src/soc/intel/xeon_sp/skx/include/soc/cpu.h
index c2af265b91..0e3028da74 100644
--- a/src/soc/intel/xeon_sp/skx/include/soc/cpu.h
+++ b/src/soc/intel/xeon_sp/skx/include/soc/cpu.h
@@ -16,6 +16,5 @@
int get_cpu_count(void);
void xeon_sp_init_cpus(struct device *dev);
-msr_t read_msr_ppin(void);
#endif