summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPratik Prajapati <pratikkumar.v.prajapati@intel.com>2017-08-28 15:15:38 -0700
committerAaron Durbin <adurbin@chromium.org>2017-09-14 14:58:49 +0000
commit653f019d0d4de5e50281edae2f1d88af58e53388 (patch)
treebea5e9fc12d46e75f712274b61c2610b32daede1 /src
parent738414586d1b6eb0339e1e70534c68e0c2d36027 (diff)
soc/intel/skylake: Implement UNCORE PRMRR get base and mask API
Implement soc_get_uncore_prmmr_base_and_mask() API for SKL/KBL Change-Id: I880d3d88138809cdf030507877079cbea52a0d97 Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com> Reviewed-on: https://review.coreboot.org/21245 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/skylake/systemagent.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/soc/intel/skylake/systemagent.c b/src/soc/intel/skylake/systemagent.c
index 6149fa2126..ba7c3075cd 100644
--- a/src/soc/intel/skylake/systemagent.c
+++ b/src/soc/intel/skylake/systemagent.c
@@ -15,12 +15,14 @@
* GNU General Public License for more details.
*/
+#include <cpu/x86/msr.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
#include <intelblocks/systemagent.h>
#include <soc/cpu.h>
#include <soc/iomap.h>
+#include <soc/msr.h>
#include <soc/systemagent.h>
/*
@@ -62,3 +64,14 @@ void soc_systemagent_init(struct device *dev)
mdelay(1);
set_power_limits(28);
}
+
+int soc_get_uncore_prmmr_base_and_mask(uint64_t *prmrr_base,
+ uint64_t *prmrr_mask)
+{
+ msr_t msr;
+ msr = rdmsr(UNCORE_PRMRR_PHYS_BASE_MSR);
+ *prmrr_base = (uint64_t) msr.hi << 32 | msr.lo;
+ msr = rdmsr(UNCORE_PRMRR_PHYS_MASK_MSR);
+ *prmrr_mask = (uint64_t) msr.hi << 32 | msr.lo;
+ return 0;
+}