mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 07:35:31 +00:00
config_tools: add RTCT table support in pre-launched VMs
add RTCT table integrated with ACPI binary for pre-launched VMs. Tracked-On: #6015 Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
This commit is contained in:
@@ -33,8 +33,12 @@ def asl_to_aml(dest_vm_acpi_path, dest_vm_acpi_bin_path):
|
||||
os.remove(os.path.join(dest_vm_acpi_path, acpi_table[1]))
|
||||
rmsg = 'failed to compile {}'.format(acpi_table[0])
|
||||
break
|
||||
elif acpi_table[0] == PTCT:
|
||||
if PTCT in os.listdir(dest_vm_acpi_path):
|
||||
elif acpi_table[0] == 'PTCT':
|
||||
if 'PTCT' in os.listdir(dest_vm_acpi_path):
|
||||
shutil.copyfile(os.path.join(dest_vm_acpi_path, acpi_table[0]),
|
||||
os.path.join(dest_vm_acpi_bin_path, acpi_table[1]))
|
||||
elif acpi_table[0] == 'RTCT':
|
||||
if 'RTCT' in os.listdir(dest_vm_acpi_path):
|
||||
shutil.copyfile(os.path.join(dest_vm_acpi_path, acpi_table[0]),
|
||||
os.path.join(dest_vm_acpi_bin_path, acpi_table[1]))
|
||||
else:
|
||||
@@ -96,10 +100,14 @@ def aml_to_bin(dest_vm_acpi_path, dest_vm_acpi_bin_path, acpi_bin_name):
|
||||
with open(os.path.join(dest_vm_acpi_bin_path, ACPI_TABLE_LIST[6][1]), 'rb') as asl:
|
||||
acpi_bin.write(asl.read())
|
||||
|
||||
if PTCT in os.listdir(dest_vm_acpi_path):
|
||||
acpi_bin.seek(ACPI_PTCT_ADDR_OFFSET)
|
||||
if 'PTCT' in os.listdir(dest_vm_acpi_path):
|
||||
acpi_bin.seek(ACPI_RTCT_ADDR_OFFSET)
|
||||
with open(os.path.join(dest_vm_acpi_bin_path, ACPI_TABLE_LIST[7][1]), 'rb') as asl:
|
||||
acpi_bin.write(asl.read())
|
||||
elif 'RTCT' in os.listdir(dest_vm_acpi_path):
|
||||
acpi_bin.seek(ACPI_RTCT_ADDR_OFFSET)
|
||||
with open(os.path.join(dest_vm_acpi_bin_path, ACPI_TABLE_LIST[8][1]), 'rb') as asl:
|
||||
acpi_bin.write(asl.read())
|
||||
|
||||
acpi_bin.seek(0xfffff)
|
||||
acpi_bin.write(b'\0')
|
||||
|
||||
Reference in New Issue
Block a user