soc/amd/picasso/cpu: move set_cstate_io_addr to common code
Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I3b8a38ea39d8dc56ff1249a3212fe352b3e805ce Reviewed-on: https://review.coreboot.org/c/coreboot/+/50407 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
parent
dd2f3fa533
commit
9a6fc577d1
|
@ -2,8 +2,20 @@
|
||||||
|
|
||||||
#include <amdblocks/cpu.h>
|
#include <amdblocks/cpu.h>
|
||||||
#include <cpu/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)
|
int get_cpu_count(void)
|
||||||
{
|
{
|
||||||
return 1 + (cpuid_ecx(0x80000008) & 0xff);
|
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);
|
||||||
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#define AMD_BLOCK_CPU_H
|
#define AMD_BLOCK_CPU_H
|
||||||
|
|
||||||
int get_cpu_count(void);
|
int get_cpu_count(void);
|
||||||
|
void set_cstate_io_addr(void);
|
||||||
void write_resume_eip(void);
|
void write_resume_eip(void);
|
||||||
|
|
||||||
#endif /* AMD_BLOCK_CPU_H */
|
#endif /* AMD_BLOCK_CPU_H */
|
||||||
|
|
|
@ -42,15 +42,6 @@ static void pre_mp_init(void)
|
||||||
x86_mtrr_check();
|
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)
|
static void fill_in_relocation_params(struct smm_relocation_params *params)
|
||||||
{
|
{
|
||||||
uintptr_t tseg_base;
|
uintptr_t tseg_base;
|
||||||
|
|
Loading…
Reference in New Issue