From ae496de9d8af773577e8ebf41ec4a4b83a8f7e04 Mon Sep 17 00:00:00 2001 From: Junjie Mao Date: Tue, 3 Aug 2021 15:13:45 +0800 Subject: [PATCH] board_inspector: allow ConstObj to be used as a TermObj While not allowed by ACPI specification, using a ConstObj (e.g. OneOp) as a term in a TermList IS witnessed in the DSDT of some BIOS. This patch allows ConstObj to act as a TermObj so that a TermList can contain a ConstObj as a statement (which is essentially no-op). This patch is added in v2 of the series. Tracked-On: #6287 Signed-off-by: Junjie Mao --- misc/config_tools/board_inspector/acpiparser/aml/grammar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/config_tools/board_inspector/acpiparser/aml/grammar.py b/misc/config_tools/board_inspector/acpiparser/aml/grammar.py index fd40cf7f5..4cff80751 100644 --- a/misc/config_tools/board_inspector/acpiparser/aml/grammar.py +++ b/misc/config_tools/board_inspector/acpiparser/aml/grammar.py @@ -192,7 +192,7 @@ RevisionOp = (AML_REVISION_OP,) ################################################################################ Object = ["NameSpaceModifierObj", "NamedObj"] -TermObj = ["Object", "StatementOpcode", "ExpressionOpcode"] +TermObj = ["Object", "StatementOpcode", "ExpressionOpcode", "ConstObj"] TermList = ("TermObj*",) TermArg = ["ExpressionOpcode", "DataObject", "ArgObj", "LocalObj"] # MethodInvocation is defined in parser.py