From 5223433a3844636af76c6846fb935ed67bbb530c Mon Sep 17 00:00:00 2001 From: Junjie Mao Date: Tue, 3 Aug 2021 09:56:28 +0800 Subject: [PATCH] board_inspector/cli: replace `--advanced` with `--basic` With a growing demand on host ACPI namespace for devices pass-through, it is now important to parse the ACPI namespace when generating board XMLs. This patch makes ACPI namespace parsing enabled by default by replacing the `--advanced` option, which is designed to enable the parsing, to `--basic` which disables it. The option provides a reliable way to disable ACPI namespace parsing completely in case the parsing blocks the generation of board XMLs, while the ACPI namespace parser will gracefully stop without polluting the board XML when it fails. This patch is added in v2 of the patch series. Tracked-On: #6287 Signed-off-by: Junjie Mao --- misc/config_tools/board_inspector/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/config_tools/board_inspector/cli.py b/misc/config_tools/board_inspector/cli.py index b0b6c1b14..7fcb44435 100755 --- a/misc/config_tools/board_inspector/cli.py +++ b/misc/config_tools/board_inspector/cli.py @@ -54,7 +54,7 @@ def main(board_name, board_xml, args): for extractor in sorted(extractors): module_name = os.path.splitext(extractor)[0] module = import_module(f"extractors.{module_name}") - if not args.advanced and getattr(module, "advanced", False): + if args.basic and getattr(module, "advanced", False): continue module.extract(args, board_etree) @@ -69,7 +69,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("board_name", help="the name of the board that runs the ACRN hypervisor") parser.add_argument("--out", help="the name of board info file") - parser.add_argument("--advanced", action="store_true", default=False, help="extract advanced information such as ACPI namespace") + parser.add_argument("--basic", action="store_true", default=False, help="do not extract advanced information such as ACPI namespace") parser.add_argument("--loglevel", default="warning", help="choose log level, e.g. info, warning or error") parser.add_argument("--check-device-status", action="store_true", default=False, help="filter out devices whose _STA object evaluates to 0") args = parser.parse_args()