From a9d3e652f79ba0b2036ebf8f09187adccaf5e4b3 Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Mon, 27 Jul 2020 13:51:04 -0600 Subject: [PATCH] acpi: Fix dptf_write_fan_perf to include Revision field When emitting a fan's _FPS (Fan Performance States) table, the revision field was missing. According to ACPI spec 6.3, the current revision is zero, so add that Package entry before the others. BUG=b:149722146 TEST=verified first element of \_SB.DPTF.TFN1._FPS is 0 Signed-off-by: Tim Wawrzynczak Change-Id: If16d4751f1d924807f5087d93b348e58d5265197 Reviewed-on: https://review.coreboot.org/c/coreboot/+/43978 Reviewed-by: Angel Pons Reviewed-by: Sumeet R Pawnikar Tested-by: build bot (Jenkins) --- src/acpi/acpigen_dptf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/acpi/acpigen_dptf.c b/src/acpi/acpigen_dptf.c index 0c44b8f8ba..b3cc37a256 100644 --- a/src/acpi/acpigen_dptf.c +++ b/src/acpi/acpigen_dptf.c @@ -17,6 +17,7 @@ enum { DEFAULT_TRIP_POINT = 0xFFFFFFFFull, DEFAULT_WEIGHT = 100, DPTF_MAX_ART_THRESHOLDS = 10, + FPS_REVISION = 0, PPCC_REVISION = 2, RAPL_PL1_INDEX = 0, RAPL_PL2_INDEX = 1, @@ -353,7 +354,8 @@ void dptf_write_fan_perf(const struct dptf_fan_perf *states, int max_count) /* _FPS - Fan Performance States */ acpigen_write_name("_FPS"); - pkg_count = acpigen_write_package(0); + pkg_count = acpigen_write_package(1); /* 1 for Revision */ + acpigen_write_integer(FPS_REVISION); /* revision */ for (i = 0; i < max_count; ++i) { /*