diff options
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/amd/common/block/cpu/noncar/cpu.c | 12 | ||||
-rw-r--r-- | src/soc/amd/common/block/include/amdblocks/cpu.h | 1 | ||||
-rw-r--r-- | src/soc/amd/picasso/cpu.c | 9 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/soc/amd/common/block/cpu/noncar/cpu.c b/src/soc/amd/common/block/cpu/noncar/cpu.c index 7c1daf96f1..98926bff7e 100644 --- a/src/soc/amd/common/block/cpu/noncar/cpu.c +++ b/src/soc/amd/common/block/cpu/noncar/cpu.c @@ -2,8 +2,20 @@ #include <amdblocks/cpu.h> #include <cpu/cpu.h> +#include <cpu/x86/msr.h> +#include <cpu/amd/msr.h> +#include <soc/iomap.h> int get_cpu_count(void) { return 1 + (cpuid_ecx(0x80000008) & 0xff); } + +void set_cstate_io_addr(void) +{ + msr_t cst_addr; + + cst_addr.hi = 0; + cst_addr.lo = ACPI_CPU_CONTROL; + wrmsr(MSR_CSTATE_ADDRESS, cst_addr); +} diff --git a/src/soc/amd/common/block/include/amdblocks/cpu.h b/src/soc/amd/common/block/include/amdblocks/cpu.h index 50300d5a0f..0627bc1377 100644 --- a/src/soc/amd/common/block/include/amdblocks/cpu.h +++ b/src/soc/amd/common/block/include/amdblocks/cpu.h @@ -4,6 +4,7 @@ #define AMD_BLOCK_CPU_H int get_cpu_count(void); +void set_cstate_io_addr(void); void write_resume_eip(void); #endif /* AMD_BLOCK_CPU_H */ diff --git a/src/soc/amd/picasso/cpu.c b/src/soc/amd/picasso/cpu.c index b18a3b4641..9460485b6b 100644 --- a/src/soc/amd/picasso/cpu.c +++ b/src/soc/amd/picasso/cpu.c @@ -42,15 +42,6 @@ static void pre_mp_init(void) x86_mtrr_check(); } -static void set_cstate_io_addr(void) -{ - msr_t cst_addr; - - cst_addr.hi = 0; - cst_addr.lo = ACPI_CPU_CONTROL; - wrmsr(MSR_CSTATE_ADDRESS, cst_addr); -} - static void fill_in_relocation_params(struct smm_relocation_params *params) { uintptr_t tseg_base; |