From feb0772a5391b87c061e2bf7fe41a8c39b19680e Mon Sep 17 00:00:00 2001 From: Shuang Zheng Date: Tue, 8 Sep 2020 21:46:25 +0800 Subject: [PATCH] acrn-config: enable TPM2 config on ehl-crb-b board enable TPM2 config on ehl-crb-b board and update TPM2 configs on legacy boards. Tracked-On: #5266 Signed-off-by: Shuang Zheng Reviewed-by: Victor Sun --- misc/acrn-config/library/board_cfg_lib.py | 2 +- misc/acrn-config/library/scenario_cfg_lib.py | 1 + misc/acrn-config/scenario_config/scenario_cfg_gen.py | 1 - misc/acrn-config/scenario_config/scenario_item.py | 1 + misc/vm_configs/xmls/config-xmls/apl-mrb/hybrid.xml | 3 +++ .../xmls/config-xmls/apl-mrb/logical_partition.xml | 6 ++++++ .../xmls/config-xmls/apl-up2-n3350/logical_partition.xml | 6 ++++++ misc/vm_configs/xmls/config-xmls/apl-up2/hybrid.xml | 3 +++ .../xmls/config-xmls/apl-up2/logical_partition.xml | 6 ++++++ misc/vm_configs/xmls/config-xmls/ehl-crb-b/hybrid_rt.xml | 6 +++--- .../xmls/config-xmls/ehl-crb-b/hybrid_rt_fusa.xml | 1 + misc/vm_configs/xmls/config-xmls/generic/hybrid.xml | 3 +++ misc/vm_configs/xmls/config-xmls/generic/hybrid_rt.xml | 7 +++++-- .../xmls/config-xmls/generic/logical_partition.xml | 6 ++++++ misc/vm_configs/xmls/config-xmls/nuc6cayh/hybrid.xml | 3 +++ .../xmls/config-xmls/nuc6cayh/logical_partition.xml | 6 ++++++ misc/vm_configs/xmls/config-xmls/template/PRE_RT_VM.xml | 2 +- misc/vm_configs/xmls/config-xmls/tgl-rvp/hybrid.xml | 2 +- misc/vm_configs/xmls/config-xmls/tgl-rvp/hybrid_rt.xml | 4 ++-- .../xmls/config-xmls/tgl-rvp/logical_partition.xml | 5 ++++- misc/vm_configs/xmls/config-xmls/whl-ipc-i5/hybrid_rt.xml | 2 +- .../xmls/config-xmls/whl-ipc-i5/logical_partition.xml | 3 +++ misc/vm_configs/xmls/config-xmls/whl-ipc-i7/hybrid_rt.xml | 6 +++--- 23 files changed, 69 insertions(+), 16 deletions(-) diff --git a/misc/acrn-config/library/board_cfg_lib.py b/misc/acrn-config/library/board_cfg_lib.py index 374823521..a6006870f 100644 --- a/misc/acrn-config/library/board_cfg_lib.py +++ b/misc/acrn-config/library/board_cfg_lib.py @@ -34,7 +34,7 @@ KNOWN_HIDDEN_PDEVS_BOARD_DB = { TSN_DEVS = ["8086:4b30", "8086:4b31", "8086:4b32", "8086:4ba0", "8086:4ba1", "8086:4ba2", "8086:4bb0", "8086:4bb1", "8086:4bb2", "8086:a0ac", "8086:43ac", "8086:43a2"] GPIO_DEVS = ["8086:4b88", "8086:4b89"] -TPM_PASSTHRU_BOARD = ['whl-ipc-i5', 'whl-ipc-i7', 'tgl-rvp'] +TPM_PASSTHRU_BOARD = ['whl-ipc-i5', 'whl-ipc-i7', 'tgl-rvp', 'ehl-crb-b'] KNOWN_CAPS_PCI_DEVS_DB = { "VMSIX":TSN_DEVS + GPIO_DEVS, diff --git a/misc/acrn-config/library/scenario_cfg_lib.py b/misc/acrn-config/library/scenario_cfg_lib.py index 65d009598..d872428f9 100644 --- a/misc/acrn-config/library/scenario_cfg_lib.py +++ b/misc/acrn-config/library/scenario_cfg_lib.py @@ -529,6 +529,7 @@ def cpus_assignment(cpus_per_vm, index): if load_type == "PRE_LAUNCHED_VM": pre_all_cpus += cpu_list cpus_per_vm[index] = list(set(sos_extend_all_cpus) - set(pre_all_cpus)) + cpus_per_vm[index].sort() for i in range(len(cpus_per_vm[index])): if i == 0: diff --git a/misc/acrn-config/scenario_config/scenario_cfg_gen.py b/misc/acrn-config/scenario_config/scenario_cfg_gen.py index 8ea6392b4..9e19cbcc8 100755 --- a/misc/acrn-config/scenario_config/scenario_cfg_gen.py +++ b/misc/acrn-config/scenario_config/scenario_cfg_gen.py @@ -196,7 +196,6 @@ def main(args): return err_dic # generate ivshmem_cfg.h - print(ivshmem_config_h) with open(ivshmem_config_h, 'w') as config: ivshmem_cfg_h.generate_file(scenario_items, config) diff --git a/misc/acrn-config/scenario_config/scenario_item.py b/misc/acrn-config/scenario_config/scenario_item.py index 932dabbbf..b842c5199 100644 --- a/misc/acrn-config/scenario_config/scenario_item.py +++ b/misc/acrn-config/scenario_config/scenario_item.py @@ -286,6 +286,7 @@ class MmioResourcesInfo: :return: None """ self.p2sb = common.get_leaf_tag_map_bool(self.scenario_info, "mmio_resources", "p2sb") + self.tpm2 = common.get_leaf_tag_map_bool(self.scenario_info, "mmio_resources", "TPM2") def check_item(self): """ diff --git a/misc/vm_configs/xmls/config-xmls/apl-mrb/hybrid.xml b/misc/vm_configs/xmls/config-xmls/apl-mrb/hybrid.xml index 4db8d22fa..b568c2bc0 100644 --- a/misc/vm_configs/xmls/config-xmls/apl-mrb/hybrid.xml +++ b/misc/vm_configs/xmls/config-xmls/apl-mrb/hybrid.xml @@ -106,6 +106,9 @@ + + n + SOS_VM diff --git a/misc/vm_configs/xmls/config-xmls/apl-mrb/logical_partition.xml b/misc/vm_configs/xmls/config-xmls/apl-mrb/logical_partition.xml index 9c24efc7b..2363ded96 100644 --- a/misc/vm_configs/xmls/config-xmls/apl-mrb/logical_partition.xml +++ b/misc/vm_configs/xmls/config-xmls/apl-mrb/logical_partition.xml @@ -109,6 +109,9 @@ 00:12.0 SATA controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SATA AHCI Controller (rev 0b) 02:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) + + n + PRE_STD_VM @@ -160,5 +163,8 @@ 00:15.0 USB controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series USB xHCI (rev 0b) 03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88W8897 [AVASTAR] 802.11ac Wireless + + n + diff --git a/misc/vm_configs/xmls/config-xmls/apl-up2-n3350/logical_partition.xml b/misc/vm_configs/xmls/config-xmls/apl-up2-n3350/logical_partition.xml index da00b180d..81160c015 100644 --- a/misc/vm_configs/xmls/config-xmls/apl-up2-n3350/logical_partition.xml +++ b/misc/vm_configs/xmls/config-xmls/apl-up2-n3350/logical_partition.xml @@ -108,6 +108,9 @@ 00:12.0 SATA controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SATA AHCI Controller (rev 0b) 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c) + + n + PRE_STD_VM @@ -157,5 +160,8 @@ 00:15.0 USB controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series USB xHCI (rev 0b) 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c) + + n + diff --git a/misc/vm_configs/xmls/config-xmls/apl-up2/hybrid.xml b/misc/vm_configs/xmls/config-xmls/apl-up2/hybrid.xml index bb58a63bf..53d269d58 100644 --- a/misc/vm_configs/xmls/config-xmls/apl-up2/hybrid.xml +++ b/misc/vm_configs/xmls/config-xmls/apl-up2/hybrid.xml @@ -106,6 +106,9 @@ + + n + SOS_VM diff --git a/misc/vm_configs/xmls/config-xmls/apl-up2/logical_partition.xml b/misc/vm_configs/xmls/config-xmls/apl-up2/logical_partition.xml index dd9ea441c..2bb7cdb8f 100644 --- a/misc/vm_configs/xmls/config-xmls/apl-up2/logical_partition.xml +++ b/misc/vm_configs/xmls/config-xmls/apl-up2/logical_partition.xml @@ -110,6 +110,9 @@ 00:12.0 SATA controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SATA AHCI Controller (rev 0b) 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c) + + n + PRE_STD_VM @@ -161,5 +164,8 @@ 00:15.0 USB controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series USB xHCI (rev 0b) 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c) + + n + diff --git a/misc/vm_configs/xmls/config-xmls/ehl-crb-b/hybrid_rt.xml b/misc/vm_configs/xmls/config-xmls/ehl-crb-b/hybrid_rt.xml index c1b618960..66e9bae52 100644 --- a/misc/vm_configs/xmls/config-xmls/ehl-crb-b/hybrid_rt.xml +++ b/misc/vm_configs/xmls/config-xmls/ehl-crb-b/hybrid_rt.xml @@ -40,8 +40,8 @@ n n - n - + y + hv:/shm_region_0, 0x200000, 0:2 @@ -116,7 +116,7 @@ 00:1d.2 Ethernet controller: Intel Corporation Device 4bb0 - n + y diff --git a/misc/vm_configs/xmls/config-xmls/ehl-crb-b/hybrid_rt_fusa.xml b/misc/vm_configs/xmls/config-xmls/ehl-crb-b/hybrid_rt_fusa.xml index cae2d9c22..02a370552 100644 --- a/misc/vm_configs/xmls/config-xmls/ehl-crb-b/hybrid_rt_fusa.xml +++ b/misc/vm_configs/xmls/config-xmls/ehl-crb-b/hybrid_rt_fusa.xml @@ -115,6 +115,7 @@ 00:1a.3 Non-VGA unclassified device [0000]: Intel Corporation Device 4b4a + n true diff --git a/misc/vm_configs/xmls/config-xmls/generic/hybrid.xml b/misc/vm_configs/xmls/config-xmls/generic/hybrid.xml index 80797c07c..8d21d5ee0 100644 --- a/misc/vm_configs/xmls/config-xmls/generic/hybrid.xml +++ b/misc/vm_configs/xmls/config-xmls/generic/hybrid.xml @@ -104,6 +104,9 @@ + + n + SOS_VM diff --git a/misc/vm_configs/xmls/config-xmls/generic/hybrid_rt.xml b/misc/vm_configs/xmls/config-xmls/generic/hybrid_rt.xml index 69dbffac2..b455355a3 100644 --- a/misc/vm_configs/xmls/config-xmls/generic/hybrid_rt.xml +++ b/misc/vm_configs/xmls/config-xmls/generic/hybrid_rt.xml @@ -26,8 +26,8 @@ n n - n - + y + hv:/shm_region_0, 0x200000, 0:2 @@ -102,6 +102,9 @@ + + y + SOS_VM diff --git a/misc/vm_configs/xmls/config-xmls/generic/logical_partition.xml b/misc/vm_configs/xmls/config-xmls/generic/logical_partition.xml index be0c132a3..b12d3f131 100644 --- a/misc/vm_configs/xmls/config-xmls/generic/logical_partition.xml +++ b/misc/vm_configs/xmls/config-xmls/generic/logical_partition.xml @@ -109,6 +109,9 @@ + + n + PRE_STD_VM @@ -161,5 +164,8 @@ + + n + diff --git a/misc/vm_configs/xmls/config-xmls/nuc6cayh/hybrid.xml b/misc/vm_configs/xmls/config-xmls/nuc6cayh/hybrid.xml index a43ba7710..4b9aa9302 100644 --- a/misc/vm_configs/xmls/config-xmls/nuc6cayh/hybrid.xml +++ b/misc/vm_configs/xmls/config-xmls/nuc6cayh/hybrid.xml @@ -106,6 +106,9 @@ + + n + SOS_VM diff --git a/misc/vm_configs/xmls/config-xmls/nuc6cayh/logical_partition.xml b/misc/vm_configs/xmls/config-xmls/nuc6cayh/logical_partition.xml index 208094d3e..d8b95f2a5 100644 --- a/misc/vm_configs/xmls/config-xmls/nuc6cayh/logical_partition.xml +++ b/misc/vm_configs/xmls/config-xmls/nuc6cayh/logical_partition.xml @@ -110,6 +110,9 @@ 00:12.0 SATA controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SATA AHCI Controller (rev 0b) 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) + + n + PRE_STD_VM @@ -161,5 +164,8 @@ 00:15.0 USB controller: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series USB xHCI (rev 0b) 02:00.0 Network controller: Intel Corporation Device 24fb (rev 10) + + n + diff --git a/misc/vm_configs/xmls/config-xmls/template/PRE_RT_VM.xml b/misc/vm_configs/xmls/config-xmls/template/PRE_RT_VM.xml index afa5c9849..f19063fe4 100644 --- a/misc/vm_configs/xmls/config-xmls/template/PRE_RT_VM.xml +++ b/misc/vm_configs/xmls/config-xmls/template/PRE_RT_VM.xml @@ -45,7 +45,7 @@ - n + y diff --git a/misc/vm_configs/xmls/config-xmls/tgl-rvp/hybrid.xml b/misc/vm_configs/xmls/config-xmls/tgl-rvp/hybrid.xml index c10693ab0..3c7cd6c38 100644 --- a/misc/vm_configs/xmls/config-xmls/tgl-rvp/hybrid.xml +++ b/misc/vm_configs/xmls/config-xmls/tgl-rvp/hybrid.xml @@ -103,7 +103,7 @@ - y + n diff --git a/misc/vm_configs/xmls/config-xmls/tgl-rvp/hybrid_rt.xml b/misc/vm_configs/xmls/config-xmls/tgl-rvp/hybrid_rt.xml index 19e05fe62..3eec10c21 100644 --- a/misc/vm_configs/xmls/config-xmls/tgl-rvp/hybrid_rt.xml +++ b/misc/vm_configs/xmls/config-xmls/tgl-rvp/hybrid_rt.xml @@ -24,8 +24,8 @@ n n - n - + y + hv:/shm_region_0, 0x200000, 0:2 diff --git a/misc/vm_configs/xmls/config-xmls/tgl-rvp/logical_partition.xml b/misc/vm_configs/xmls/config-xmls/tgl-rvp/logical_partition.xml index 440971e03..449d06896 100644 --- a/misc/vm_configs/xmls/config-xmls/tgl-rvp/logical_partition.xml +++ b/misc/vm_configs/xmls/config-xmls/tgl-rvp/logical_partition.xml @@ -107,7 +107,7 @@ 00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (13) I219-V (rev 20) - y + n @@ -159,5 +159,8 @@ 00:14.0 USB controller: Intel Corporation Device a0ed (rev 20) + + n + diff --git a/misc/vm_configs/xmls/config-xmls/whl-ipc-i5/hybrid_rt.xml b/misc/vm_configs/xmls/config-xmls/whl-ipc-i5/hybrid_rt.xml index b988301d5..53cbad060 100644 --- a/misc/vm_configs/xmls/config-xmls/whl-ipc-i5/hybrid_rt.xml +++ b/misc/vm_configs/xmls/config-xmls/whl-ipc-i5/hybrid_rt.xml @@ -104,7 +104,7 @@ 03:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) - n + y diff --git a/misc/vm_configs/xmls/config-xmls/whl-ipc-i5/logical_partition.xml b/misc/vm_configs/xmls/config-xmls/whl-ipc-i5/logical_partition.xml index 643aac592..13fe77e85 100644 --- a/misc/vm_configs/xmls/config-xmls/whl-ipc-i5/logical_partition.xml +++ b/misc/vm_configs/xmls/config-xmls/whl-ipc-i5/logical_partition.xml @@ -160,5 +160,8 @@ 00:14.0 USB controller: Intel Corporation Device 9ded (rev 30) 04:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) + + n + diff --git a/misc/vm_configs/xmls/config-xmls/whl-ipc-i7/hybrid_rt.xml b/misc/vm_configs/xmls/config-xmls/whl-ipc-i7/hybrid_rt.xml index 5ab0fc5a8..97ef1ce5b 100644 --- a/misc/vm_configs/xmls/config-xmls/whl-ipc-i7/hybrid_rt.xml +++ b/misc/vm_configs/xmls/config-xmls/whl-ipc-i7/hybrid_rt.xml @@ -24,8 +24,8 @@ n n - n - + y + hv:/shm_region_0, 0x200000, 0:2 @@ -104,7 +104,7 @@ 03:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) - n + y