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>
This commit is contained in:
Tim Wawrzynczak 2020-07-24 12:48:22 -06:00 committed by Patrick Georgi
parent 0b6f35d798
commit 5a1e2d3f63
1 changed files with 2 additions and 3 deletions

View File

@ -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);