summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cpu/amd/family_10h-family_15h/init_cpus.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/cpu/amd/family_10h-family_15h/init_cpus.c b/src/cpu/amd/family_10h-family_15h/init_cpus.c
index 310706ba95..d6a4725e2e 100644
--- a/src/cpu/amd/family_10h-family_15h/init_cpus.c
+++ b/src/cpu/amd/family_10h-family_15h/init_cpus.c
@@ -986,7 +986,6 @@ void cpuSetAMDMSR(uint8_t node_id)
uint8_t nvram;
u32 platform;
uint64_t revision;
- uint8_t enable_c_states;
uint8_t enable_cpb;
printk(BIOS_DEBUG, "cpuSetAMDMSR ");
@@ -1062,21 +1061,16 @@ void cpuSetAMDMSR(uint8_t node_id)
}
if (revision & (AMD_DR_Ex | AMD_FAM15_ALL)) {
- enable_c_states = 0;
if (CONFIG(HAVE_ACPI_TABLES))
- if (get_option(&nvram, "cpu_c_states") == CB_SUCCESS)
- enable_c_states = !!nvram;
-
- if (enable_c_states) {
- /* Set up the C-state base address */
- msr_t c_state_addr_msr;
- c_state_addr_msr = rdmsr(MSR_CSTATE_ADDRESS);
- c_state_addr_msr.lo = ACPI_CPU_P_LVL2; /* CstateAddr = ACPI_CPU_P_LVL2 */
- wrmsr(MSR_CSTATE_ADDRESS, c_state_addr_msr);
- }
+ if ((get_option(&nvram, "cpu_c_states") == CB_SUCCESS) &&
+ (nvram)) {
+ /* Set up the C-state base address */
+ msr_t c_state_addr_msr;
+ c_state_addr_msr = rdmsr(MSR_CSTATE_ADDRESS);
+ c_state_addr_msr.lo = ACPI_CPU_P_LVL2;
+ wrmsr(MSR_CSTATE_ADDRESS, c_state_addr_msr);
+ }
}
-#else
- enable_c_states = 0;
#endif
if (revision & AMD_FAM15_ALL) {