Cliff Huang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/73348 )
Change subject: acpi: Add warning message when timeout in acpigen_write_delay_until_namestr_int() ......................................................................
acpi: Add warning message when timeout in acpigen_write_delay_until_namestr_int()
The ACPI should print warning message to kernel when timeout during the loop waiting for the condition to occur
This timeout message won't be displayed when this function are used as delay loop, (ie. without checking variable condition)
To enable this print to kernel log: echo 1 > /sys/module/acpi/parameters/aml_debug_output
ex: Waiting for variable L23E = 0; the max loop count( Local7) = 8 will generate ACPI code:
Local7 = 0x08 While ((Local7 > Zero)) { If ((L23E == Zero)) { Break }
Sleep (0x10) Local7-- If ((Local7 == Zero)) { Debug = "WARN: Wait loop Timeout! variable = L23E" } }
BRANCH=firmware-brya-14505.B TEST=Boot to OS and check that the Debug print is added to the function.
Signed-off-by: Cliff Huang cliff.huang@intel.com Change-Id: I3843e51988527e99822017d1b5f653ff2eaa7958 --- M src/acpi/acpigen.c 1 file changed, 47 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/73348/1
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c index 9d23e57..26280e2 100644 --- a/src/acpi/acpigen.c +++ b/src/acpi/acpigen.c @@ -2330,4 +2330,10 @@ acpigen_emit_byte(DECREMENT_OP); acpigen_emit_byte(LOCAL7_OP); acpigen_pop_len(); /* While */ + + if (name) { + acpigen_write_if_lequal_op_op(LOCAL7_OP, ZERO_OP); + acpigen_write_debug_sprintf("WARN: Wait loop Timeout! variable = %s", name); + acpigen_pop_len(); /* If */ + } }