diff --git a/misc/acrn-config/library/scenario_cfg_lib.py b/misc/acrn-config/library/scenario_cfg_lib.py index 18e20f92f..ce9592ee0 100644 --- a/misc/acrn-config/library/scenario_cfg_lib.py +++ b/misc/acrn-config/library/scenario_cfg_lib.py @@ -46,6 +46,7 @@ UUID_DB = { '38158821-5208-4005-b72a-8a609e4190d0', 'a6750180-f87a-48d2-91d9-4e7f62b6519e', 'd1816e4a-a9bb-4cb4-a066-3f1a8a5ce73f'], 'POST_RT_VM':['495ae2e5-2603-4d64-af76-d4bc5a8ec0e5'], 'KATA_VM':['a7ada506-1ab0-4b6b-a0da-e513ca9b8c2f'], + 'PRE_RT_VM':['b2a92bec-ca6b-11ea-b106-3716a8ba0bb9'], } VM_DB = { @@ -55,6 +56,7 @@ VM_DB = { 'POST_STD_VM':{'load_type':'POST_LAUNCHED_VM', 'severity':'SEVERITY_STANDARD_VM', 'uuid':UUID_DB['POST_STD_VM']}, 'POST_RT_VM':{'load_type':'POST_LAUNCHED_VM', 'severity':'SEVERITY_RTVM', 'uuid':UUID_DB['POST_RT_VM']}, 'KATA_VM':{'load_type':'POST_LAUNCHED_VM', 'severity':'SEVERITY_STANDARD_VM', 'uuid':UUID_DB['KATA_VM']}, + 'PRE_RT_VM':{'load_type':'PRE_LAUNCHED_VM', 'severity':'SEVERITY_RTVM', 'uuid':UUID_DB['PRE_RT_VM']}, } LOAD_VM_TYPE = list(VM_DB.keys()) @@ -179,9 +181,10 @@ def load_vm_check(load_vms, item): ERR_LIST[key] = "POST Standard vm number should not be greater than {}".format(len(UUID_DB["POST_STD_VM"])) return - if len(pre_vm_ids) > len(UUID_DB["PRE_STD_VM"]): + max_pre_launch_vms = len(UUID_DB["PRE_STD_VM"]) + len(UUID_DB["SAFETY_VM"]) + len(UUID_DB["PRE_RT_VM"]) + if len(pre_vm_ids) > max_pre_launch_vms: key = "vm:id={},{}".format(pre_vm_ids[0], item) - ERR_LIST[key] = "PRE Standard vm number should not be greater than {}".format(len(UUID_DB["PRE_STD_VM"])) + ERR_LIST[key] = "PRE Launched VM number should not be greater than {}".format(max_pre_launch_vms) return if post_vm_ids and sos_vm_ids: @@ -381,7 +384,7 @@ def os_kern_args_check(id_kern_args_dic, prime_item, item): ERR_LIST[key] = "VM os config kernel service os should be SOS_VM_BOOTARGS" -def os_kern_load_addr_check(id_kern_load_addr_dic, prime_item, item): +def os_kern_load_addr_check(kern_type, id_kern_load_addr_dic, prime_item, item): """ Check os kernel load address :param prime_item: the prime item in xml file @@ -390,6 +393,8 @@ def os_kern_load_addr_check(id_kern_load_addr_dic, prime_item, item): """ for id_key, kern_load_addr in id_kern_load_addr_dic.items(): + if kern_type[id_key] != 'KERNEL_ZEPHYR': + continue if not kern_load_addr: key = "vm:id={},{},{}".format(id_key, prime_item, item) @@ -401,7 +406,7 @@ def os_kern_load_addr_check(id_kern_load_addr_dic, prime_item, item): ERR_LIST[key] = "VM os config kernel load address should Hex format" -def os_kern_entry_addr_check(id_kern_entry_addr_dic, prime_item, item): +def os_kern_entry_addr_check(kern_type, id_kern_entry_addr_dic, prime_item, item): """ Check os kernel entry address :param prime_item: the prime item in xml file @@ -410,6 +415,8 @@ def os_kern_entry_addr_check(id_kern_entry_addr_dic, prime_item, item): """ for id_key, kern_entry_addr in id_kern_entry_addr_dic.items(): + if kern_type[id_key] != 'KERNEL_ZEPHYR': + continue if not kern_entry_addr: key = "vm:id={},{},{}".format(id_key, prime_item, item) diff --git a/misc/acrn-config/scenario_config/scenario_item.py b/misc/acrn-config/scenario_config/scenario_item.py index b8b11aeeb..2b3f9415c 100644 --- a/misc/acrn-config/scenario_config/scenario_item.py +++ b/misc/acrn-config/scenario_config/scenario_item.py @@ -110,8 +110,8 @@ class CfgOsKern: scenario_cfg_lib.os_kern_type_check(self.kern_type, "os_config", "kern_type") scenario_cfg_lib.os_kern_mod_check(self.kern_mod, "os_config", "kern_mod") scenario_cfg_lib.os_kern_args_check(self.kern_args, "os_config", "kern_args") - scenario_cfg_lib.os_kern_load_addr_check(self.kern_load_addr, "os_config", "kern_load_addr") - scenario_cfg_lib.os_kern_entry_addr_check(self.kern_entry_addr, "os_config", "kern_entry_addr") + scenario_cfg_lib.os_kern_load_addr_check(self.kern_type, self.kern_load_addr, "os_config", "kern_load_addr") + scenario_cfg_lib.os_kern_entry_addr_check(self.kern_type, self.kern_entry_addr, "os_config", "kern_entry_addr") class VuartInfo: diff --git a/misc/acrn-config/scenario_config/vm_configurations_c.py b/misc/acrn-config/scenario_config/vm_configurations_c.py index 3c8204e0f..659849de4 100644 --- a/misc/acrn-config/scenario_config/vm_configurations_c.py +++ b/misc/acrn-config/scenario_config/vm_configurations_c.py @@ -19,6 +19,9 @@ def get_pre_vm_type(vm_type, vm_i): if vm_type == "SAFETY_VM": return "CONFIG_SAFETY_VM(1)" + if vm_type == "PRE_RT_VM": + return "CONFIG_PRE_RT_VM(1)" + i_cnt = 0 for i,v_type in common.VM_TYPES.items(): if v_type == "PRE_STD_VM" and i <= vm_i: diff --git a/misc/acrn-config/xmls/config-xmls/generic/hybrid_rt.xml b/misc/acrn-config/xmls/config-xmls/generic/hybrid_rt.xml new file mode 100644 index 000000000..74becfa4e --- /dev/null +++ b/misc/acrn-config/xmls/config-xmls/generic/hybrid_rt.xml @@ -0,0 +1,173 @@ + + + + n + /dev/ttyS0 + 5 + 5 + 3 + 7 + 0x40000 + + + + y + SCHED_BVT + y + + n + n + + 0 + + y + n + y + n + n + + + + 0x2000 + + + 0x00010000 + 0x200000000 + 0x400000000 + 0x400000000 + + + + 0x100 + 256 + 1 + 96 + 120 + 64 + + 16 + + + + 0x00000010 + + + + + + PRE_RT_VM + ACRN PRE-LAUNCHED VM0 + + 0 + + + 3 + + + 0 + + + 0 + 0 + + + 0x100000000 + 0x40000000 + 0x0 + 0x0 + + + PREEMPT-RT + KERNEL_BZIMAGE + RT_bzImage + + + + + VUART_LEGACY_PIO + COM1_BASE + COM1_IRQ + + + VUART_LEGACY_PIO + COM2_BASE + COM2_IRQ + 1 + 1 + + + + + + + SOS_VM + ACRN SOS VM + + 0 + + + 0 + + + 0 + CONFIG_SOS_RAM_SIZE + + + ACRN Service OS + KERNEL_BZIMAGE + Linux_bzImage + + SOS_VM_BOOTARGS + + + VUART_LEGACY_PIO + SOS_COM1_BASE + SOS_COM1_IRQ + + + VUART_LEGACY_PIO + SOS_COM2_BASE + SOS_COM2_IRQ + 0 + 1 + + + + + + /dev/sda3 + + rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 + i915.nuclear_pageflip=1 + + + + + POST_STD_VM + + 0 + + + 2 + + + 0 + + + 0 + 0 + + + VUART_LEGACY_PIO + COM1_BASE + COM1_IRQ + + + VUART_LEGACY_PIO + INVALID_COM_BASE + COM2_IRQ + 0 + 0 + + + diff --git a/misc/acrn-config/xmls/config-xmls/template/PRE_RT_VM.xml b/misc/acrn-config/xmls/config-xmls/template/PRE_RT_VM.xml new file mode 100644 index 000000000..9231b3469 --- /dev/null +++ b/misc/acrn-config/xmls/config-xmls/template/PRE_RT_VM.xml @@ -0,0 +1,47 @@ + + + PRE_RT_VM + + + + + + + + + 0 + + + 0 + 0 + + + + + 0x0 + 0x0 + + + + + + + + + + VUART_LEGACY_PIO + COM1_BASE + COM1_IRQ + + + VUART_LEGACY_PIO + INVALID_COM_BASE + COM2_IRQ + 0 + 1 + + + + + + diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/hybrid_rt.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/hybrid_rt.xml new file mode 100644 index 000000000..45b90cda9 --- /dev/null +++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/hybrid_rt.xml @@ -0,0 +1,172 @@ + + + + n + /dev/ttyS0 + 5 + 5 + 3 + 7 + 0x40000 + + + + y + SCHED_BVT + y + + n + n + + y + n + y + n + n + + + + 0x2000 + + + 0x00010000 + 0x200000000 + 0x400000000 + 0x400000000 + + + + 0x100 + 256 + 1 + 96 + 120 + 64 + 64 + 16 + + + + 0x00000010 + + + + + + PRE_RT_VM + ACRN PRE-LAUNCHED VM0 + + 0 + + + 3 + + + 0 + + + 0 + 0 + + + 0x100000000 + 0x40000000 + 0x0 + 0x0 + + + PREEMPT-RT + KERNEL_BZIMAGE + RT_bzImage + + rw rootwait root=/dev/sda3 console=ttyS0 noxsave nohpet no_timer_check ignore_loglevel consoleblank=0 tsc=reliable + + + VUART_LEGACY_PIO + COM1_BASE + COM1_IRQ + + + VUART_LEGACY_PIO + COM2_BASE + COM2_IRQ + 1 + 1 + + + 00:17.0 SATA controller: Intel Corporation Device 9dd3 (rev 30) + 03:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) + + + + SOS_VM + ACRN SOS VM + + 0 + + + 0 + + + 0 + CONFIG_SOS_RAM_SIZE + + + ACRN Service OS + KERNEL_BZIMAGE + Linux_bzImage + + SOS_VM_BOOTARGS + + + VUART_LEGACY_PIO + SOS_COM1_BASE + SOS_COM1_IRQ + + + VUART_LEGACY_PIO + SOS_COM2_BASE + SOS_COM2_IRQ + 0 + 1 + + + + + + /dev/nvme0n1p3 + + rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 + i915.nuclear_pageflip=1 hvlog=2M@0xe00000 memmap=0x200000$0xe00000 + + + + + POST_STD_VM + + 0 + + + 2 + + + 0 + + + 0 + 0 + + + VUART_LEGACY_PIO + COM1_BASE + COM1_IRQ + + + VUART_LEGACY_PIO + INVALID_COM_BASE + COM2_IRQ + 0 + 0 + + + diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/hybrid_rt.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/hybrid_rt.xml new file mode 100644 index 000000000..2eea0e67f --- /dev/null +++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/hybrid_rt.xml @@ -0,0 +1,172 @@ + + + + n + /dev/ttyS0 + 5 + 5 + 3 + 7 + 0x40000 + + + + y + SCHED_BVT + y + + n + n + + y + n + y + n + n + + + + 0x2000 + + + 0x00010000 + 0x200000000 + 0x400000000 + 0x400000000 + + + + 0x100 + 256 + 1 + 96 + 120 + 64 + 64 + 16 + + + + 0x00000010 + + + + + + PRE_RT_VM + ACRN PRE-LAUNCHED VM0 + + 0 + + + 3 + + + 0 + + + 0 + 0 + + + 0x100000000 + 0x40000000 + 0x0 + 0x0 + + + PREEMPT-RT + KERNEL_BZIMAGE + RT_bzImage + + rw rootwait root=/dev/sda3 console=ttyS0 noxsave nohpet no_timer_check ignore_loglevel consoleblank=0 tsc=reliable + + + VUART_LEGACY_PIO + COM1_BASE + COM1_IRQ + + + VUART_LEGACY_PIO + COM2_BASE + COM2_IRQ + 1 + 1 + + + 00:17.0 SATA controller: Intel Corporation Device 9dd3 (rev 30) + 03:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) + + + + SOS_VM + ACRN SOS VM + + 0 + + + 0 + + + 0 + CONFIG_SOS_RAM_SIZE + + + ACRN Service OS + KERNEL_BZIMAGE + Linux_bzImage + + SOS_VM_BOOTARGS + + + VUART_LEGACY_PIO + SOS_COM1_BASE + SOS_COM1_IRQ + + + VUART_LEGACY_PIO + SOS_COM2_BASE + SOS_COM2_IRQ + 0 + 1 + + + + + + /dev/nvme0n1p3 + + rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 + i915.nuclear_pageflip=1 hvlog=2M@0xe00000 memmap=0x200000$0xe00000 + + + + + POST_STD_VM + + 0 + + + 2 + + + 0 + + + 0 + 0 + + + VUART_LEGACY_PIO + COM1_BASE + COM1_IRQ + + + VUART_LEGACY_PIO + INVALID_COM_BASE + COM2_IRQ + 0 + 0 + + +