summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Wawrzynczak <twawrzynczak@chromium.org>2020-07-24 12:48:22 -0600
committerPatrick Georgi <pgeorgi@google.com>2020-07-26 21:04:08 +0000
commit5a1e2d3f631a855c869efb1a43e721f7251904ea (patch)
tree607988b27733ee08d53aaedd491e9702e26cb299
parent0b6f35d798ae03736b9b443ce7819676e9c6e562 (diff)
downloadcoreboot-5a1e2d3f631a855c869efb1a43e721f7251904ea.tar.xz
ec/google/chromeec: Fix loop off-by-one error in DPTF _OSC
The while loop in \_SB.DPTF._OSC accidentally used <= instead of <, so there was an error indexing into IDSP. BUG=b:162043345 TEST=verify disassembled ASL, as well as no BIOS bug mentioned in /var/log/messages Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Change-Id: I08c4152c59cc9eb13386c825aab983681cfa88ed Reviewed-on: https://review.coreboot.org/c/coreboot/+/43827 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
-rw-r--r--src/ec/google/chromeec/ec_dptf_helpers.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ec/google/chromeec/ec_dptf_helpers.c b/src/ec/google/chromeec/ec_dptf_helpers.c
index 0f8d4a313b..631f16ebce 100644
--- a/src/ec/google/chromeec/ec_dptf_helpers.c
+++ b/src/ec/google/chromeec/ec_dptf_helpers.c
@@ -135,7 +135,7 @@ static void write_is_policy_enabled(bool enabled)
* Local1 = 0
* Local2 = 0
*
- * While (Local1 < Local) {
+ * While (Local1 < Local0) {
* If (IDSP[Local1] == Arg0 && Arg1 == enabled) {
* Local2 = 1
* }
@@ -167,8 +167,7 @@ static void write_is_policy_enabled(bool enabled)
*/
acpigen_emit_byte(WHILE_OP);
acpigen_write_len_f();
- acpigen_emit_byte(LNOT_OP);
- acpigen_emit_byte(LGREATER_OP);
+ acpigen_emit_byte(LLESS_OP);
acpigen_emit_byte(LOCAL1_OP);
acpigen_emit_byte(LOCAL0_OP);