mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-23 14:07:42 +00:00
board_inspector: fix scope opening in the AML parser
According to section 19 of ACPI spec 6.4, the following clauses open name scopes (in addition to the Scope clauses). - Function - Device - Method - Power Resource - Thermal Zone The current AML parser only opens a scope when parsing DefMethod and DefDevice, however. This patch fixes the AML parsing by opening a scope on visiting a DefPowerRes or DefThermalZone clause. Note: Functions in ASL are equivalent to Methods at AML level. Tracked-On: #6298 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
a5f5ed0865
commit
1ad836e9a8
@ -588,10 +588,18 @@ def DefOpRegion_hook_named(context, tree, name):
|
|||||||
def DefPowerRes_hook_named(context, tree, name):
|
def DefPowerRes_hook_named(context, tree, name):
|
||||||
sym = NamedDecl(name, tree)
|
sym = NamedDecl(name, tree)
|
||||||
context.register_symbol(sym)
|
context.register_symbol(sym)
|
||||||
|
context.change_scope(name)
|
||||||
|
|
||||||
|
def DefPowerRes_hook_post(context, tree):
|
||||||
|
context.pop_scope()
|
||||||
|
|
||||||
def DefThermalZone_hook_named(context, tree, name):
|
def DefThermalZone_hook_named(context, tree, name):
|
||||||
sym = NamedDecl(name, tree)
|
sym = NamedDecl(name, tree)
|
||||||
context.register_symbol(sym)
|
context.register_symbol(sym)
|
||||||
|
context.change_scope(name)
|
||||||
|
|
||||||
|
def DefThermalZone_hook_post(context, tree):
|
||||||
|
context.pop_scope()
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Instantiate parsers
|
# Instantiate parsers
|
||||||
|
Loading…
Reference in New Issue
Block a user