From b23374ccc92cee73e5593f48946401eb9d756c0e Mon Sep 17 00:00:00 2001 From: Shuang Zheng Date: Wed, 21 Oct 2020 19:33:02 +0800 Subject: [PATCH] acrn-config: get PTCT table from native environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit automatically get PTCT table from native environment for the usage of pre-launched VMs. Tracked-On: #5418 Signed-off-by: Shuang Zheng --- misc/acrn-config/target/acpi.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/acrn-config/target/acpi.py b/misc/acrn-config/target/acpi.py index 52e305092..d54444027 100644 --- a/misc/acrn-config/target/acpi.py +++ b/misc/acrn-config/target/acpi.py @@ -6,6 +6,7 @@ import os import sys import subprocess +import shutil from collections import defaultdict import dmar import parser_lib @@ -652,3 +653,9 @@ def generate_info(board_file): # Generate board info with open(board_file, 'a+') as config: gen_acpi_info(config) + + # get the PTCT table from native environment + out_dir = os.path.dirname(board_file) + if os.path.isfile(SYS_PATH[1] + 'PTCT'): + shutil.copy(SYS_PATH[1] + 'PTCT', out_dir) + print("PTCT table has been saved to {} successfully!".format(os.path.join(out_dir, 'PTCT')))