config_tools: board_inspector: record all details from RTCT in board XML

Today users still need to manually copy the RTCT binary file when they want
to passthrough software SRAM to a pre-launched RTVM, which is far from
being user friendly.

To get rid of that step, this patch extracts all information from the RTCT
table and format them in the board XML which is the only file users need to
copy from their target platform to build the hypervisor. The patch that
immediately follows will then use such information to generate vRTCT for
the pre-launched VM.

A side effect of this change is that more ranges, which represents those
reported by RTCT such as the CRL binary or the error log area, will be
added to the `memory` section of the board XML. The `id` attributes of
those range will be used to identify what that range is for. As a result,
getting RAM of the physical platform from the board XML requires additional
conditions on the `id` attributes to avoid counting non-RAM regions
unintendedly.

Tracked-On: #7947
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao
2022-07-29 22:59:39 +08:00
committed by acrnsi-robot
parent d7bac88e5e
commit 89d54aa5d1
4 changed files with 106 additions and 47 deletions

View File

@@ -656,12 +656,3 @@ def generate_info(board_file):
# Generate board info
with open(board_file, 'a+') as config:
gen_acpi_info(config)
# get the PTCT/RTCT 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 if out_dir != "" else "./")
logging.info("PTCT table has been saved to {} successfully!".format(os.path.join(out_dir, 'PTCT')))
if os.path.isfile(SYS_PATH[1] + 'RTCT'):
shutil.copy(SYS_PATH[1] + 'RTCT', out_dir if out_dir != "" else "./")
logging.info("RTCT table has been saved to {} successfully!".format(os.path.join(out_dir, 'RTCT')))