summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block/acpi
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-03-07 01:37:37 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-03-08 12:00:25 +0000
commitc44c977e0936c9099ad78a6c8b24810db5c2d293 (patch)
treef5f1590c6287f19d26eae190076788b230aa0cad /src/soc/amd/common/block/acpi
parentd3b077e2b6329ea1d6e36d8abc56b8740a9e79d7 (diff)
soc/amd/common/block/acpi/cpu_power_state: use definition for bit_offset
Instead of using a magic constant in the bit_offset field of the C state resource for the C1 state that's entered via the MWAIT instruction, use the existing ACPI_FFIXEDHW_CLASS_MWAIT define. This value is checked by acpi_processor_ffh_cstate_probe in the Linux kernel. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I9edc681efab15b5ceba91c8105f7dc6d687d8be8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73498 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Diffstat (limited to 'src/soc/amd/common/block/acpi')
-rw-r--r--src/soc/amd/common/block/acpi/cpu_power_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/amd/common/block/acpi/cpu_power_state.c b/src/soc/amd/common/block/acpi/cpu_power_state.c
index d8af0c9244..d0e59af835 100644
--- a/src/soc/amd/common/block/acpi/cpu_power_state.c
+++ b/src/soc/amd/common/block/acpi/cpu_power_state.c
@@ -24,7 +24,7 @@ static void write_cstate_entry(acpi_cstate_t *entry, const acpi_cstate_t *data,
entry->resource = (acpi_addr_t){
.space_id = ACPI_ADDRESS_SPACE_FIXED,
.bit_width = 2,
- .bit_offset = 2,
+ .bit_offset = ACPI_FFIXEDHW_CLASS_MWAIT,
.addrl = 0,
.addrh = 0,
};