are caught by our ACPI parser. Unfortunately in such cases our reaction was
to start parsing AML somewhere outside our current scope. The intention was
to clamp down the inner scope to the maximum of the outer one. So, rectify it.
This issue has shown up in EDK2's QEMU SBSA target, where the SSDT table was
generated incorrectly. Surprisingly neither Linux nor ACPICA's iASL noticed
that the table was broken.
ok kettenis@ millert@
-/* $OpenBSD: dsdt.c,v 1.263 2021/05/22 13:13:14 kettenis Exp $ */
+/* $OpenBSD: dsdt.c,v 1.264 2021/12/09 20:21:35 patrick Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
"Bad scope... runover pos:%.4x new end:%.4x scope "
"end:%.4x\n", aml_pc(pos), aml_pc(pos+len),
aml_pc(scope->end));
- pos = scope->end;
+ return scope->end;
}
return pos+len;
}