From 58403abb3a4005dee36817a2f45f0aaa31f34881 Mon Sep 17 00:00:00 2001 From: Chenli Wei Date: Tue, 7 Jun 2022 11:17:14 +0800 Subject: [PATCH] misc: add processing for Console vUART is None The current code assume there was one Console vUART all the time, and there is an issue when the Console vUART is None. This patch add the case of "None" and add assert to check no serial console config. Tracked-On: #6690 Signed-off-by: Chenli Wei chenli.wei@intel.com --- misc/config_tools/schema/checks/vuart_config.xsd | 6 ++++++ misc/config_tools/static_allocators/s5_vuart.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/misc/config_tools/schema/checks/vuart_config.xsd b/misc/config_tools/schema/checks/vuart_config.xsd index ae8e08bc4..25e59f947 100644 --- a/misc/config_tools/schema/checks/vuart_config.xsd +++ b/misc/config_tools/schema/checks/vuart_config.xsd @@ -43,4 +43,10 @@ + + + You can't use debug Build type when there is no serial console config + + + diff --git a/misc/config_tools/static_allocators/s5_vuart.py b/misc/config_tools/static_allocators/s5_vuart.py index 3328b69a3..7602818f2 100644 --- a/misc/config_tools/static_allocators/s5_vuart.py +++ b/misc/config_tools/static_allocators/s5_vuart.py @@ -43,6 +43,8 @@ def get_console_vuart_port(scenario_etree, vm_name): port = "0x3E8U" elif port == "COM Port 4": port = "0x2E8U" + else: + port = "0x0U" return port