summaryrefslogtreecommitdiff
path: root/src/soc/amd/stoneyridge/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/stoneyridge/cpu.c')
-rw-r--r--src/soc/amd/stoneyridge/cpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/soc/amd/stoneyridge/cpu.c b/src/soc/amd/stoneyridge/cpu.c
index 39db1f4466..2f4c0d09cb 100644
--- a/src/soc/amd/stoneyridge/cpu.c
+++ b/src/soc/amd/stoneyridge/cpu.c
@@ -15,6 +15,7 @@
#include <soc/cpu.h>
#include <soc/iomap.h>
#include <console/console.h>
+#include <types.h>
/*
* MP and SMM loading initialization.
@@ -69,3 +70,8 @@ static const struct cpu_driver model_15 __cpu_driver = {
.ops = &cpu_dev_ops,
.id_table = cpu_table,
};
+
+uint32_t get_pstate_0_reg(void)
+{
+ return (pci_read_config32(SOC_PM_DEV, CORE_PERF_BOOST_CTRL) >> 2) & 0x7;
+}