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>
This commit is contained in:
committed by
Aaron Durbin
parent
738414586d
commit
653f019d0d
@@ -15,12 +15,14 @@
|
|||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <cpu/x86/msr.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <delay.h>
|
#include <delay.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
#include <intelblocks/systemagent.h>
|
#include <intelblocks/systemagent.h>
|
||||||
#include <soc/cpu.h>
|
#include <soc/cpu.h>
|
||||||
#include <soc/iomap.h>
|
#include <soc/iomap.h>
|
||||||
|
#include <soc/msr.h>
|
||||||
#include <soc/systemagent.h>
|
#include <soc/systemagent.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -62,3 +64,14 @@ void soc_systemagent_init(struct device *dev)
|
|||||||
mdelay(1);
|
mdelay(1);
|
||||||
set_power_limits(28);
|
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;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user