From b14ac4ad6db09afcd682e3024bb00542776e5254 Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Tue, 21 Mar 2023 15:46:53 +0100 Subject: [PATCH] vm_arm: remove deprecated config options Signed-off-by: Axel Heider --- components/VM_Arm/CMakeLists.txt | 16 ----- components/VM_Arm/configurations/vm.h | 17 ------ templates/seL4VMParameters.template.c | 87 +++++---------------------- 3 files changed, 14 insertions(+), 106 deletions(-) diff --git a/components/VM_Arm/CMakeLists.txt b/components/VM_Arm/CMakeLists.txt index f88c6085..3874b40e 100644 --- a/components/VM_Arm/CMakeLists.txt +++ b/components/VM_Arm/CMakeLists.txt @@ -111,22 +111,6 @@ config_option( OFF ) -config_option( - VmInitRdFile - VM_INITRD_FILE - "Enables the option for the VM to open and load a seperate initrd file" - DEFAULT - OFF -) - -config_option( - VmDtbFile - VM_DTB_FILE - "Enables the option for the VM to open and load a seperate dtb file" - DEFAULT - OFF -) - config_option( VmVirtUart VM_VIRT_UART diff --git a/components/VM_Arm/configurations/vm.h b/components/VM_Arm/configurations/vm.h index 8e15dec2..efefde58 100644 --- a/components/VM_Arm/configurations/vm.h +++ b/components/VM_Arm/configurations/vm.h @@ -88,23 +88,6 @@ int clean_cache = false; \ int map_one_to_one = false; \ } vm_image_config; \ - attribute { \ - string linux_ram_base; \ - string linux_ram_paddr_base; \ - string linux_ram_size; \ - string linux_ram_offset = "0"; /* obsolete */ \ - string dtb_addr; \ - string initrd_max_size = "-1"; /* obsolete */ \ - string initrd_addr; \ - } linux_address_config; \ - attribute { \ - string linux_name = "linux"; \ - string dtb_name = "linux-dtb"; \ - string initrd_name = "linux-initrd"; \ - string linux_bootcmdline = ""; \ - string linux_stdout = ""; \ - string dtb_base_name = ""; \ - } linux_image_config; \ attribute { \ int send_id; \ int recv_id; \ diff --git a/templates/seL4VMParameters.template.c b/templates/seL4VMParameters.template.c index 0cb20e54..6edb04ca 100644 --- a/templates/seL4VMParameters.template.c +++ b/templates/seL4VMParameters.template.c @@ -9,19 +9,22 @@ #include /*- set config = configuration[me.name] -*/ +/*- if not config -*/ + /*? raise(Exception('Missing VM configuration')) ?*/ +/*- endif -*/ + /*- set vm_address_config = config.get('vm_address_config') -*/ -/*- set vm_image_config = config.get('vm_image_config') -*/ -/*- set linux_address_config = config.get('linux_address_config') -*/ -/*- set linux_image_config = config.get('linux_image_config') -*/ +/*- if not vm_address_config -*/ + /*? raise(Exception('Missing VM address configuration')) ?*/ +/*- endif -*/ -/*# For legacy compatibility, a fall back to the standard Linux entry exists. #*/ -/*- set is_64_bit = (8 == macros.get_word_size(options.architecture)) -*/ -/*- set entry_offset = 0x80000 if is_64_bit else 0x8000 -*/ +/*- set vm_image_config = config.get('vm_image_config') -*/ +/*- if not vm_image_config -*/ + /*? raise(Exception('Missing VM image configuration')) ?*/ +/*- endif -*/ const vm_config_t vm_config = { -/*- if vm_address_config -*/ - .ram = { .phys_base = /*? vm_address_config.get('ram_paddr_base') ?*/, .base = /*? vm_address_config.get('ram_base') ?*/, @@ -34,29 +37,13 @@ const vm_config_t vm_config = { /*- if vm_address_config.get('kernel_entry_addr') != '-1' -*/ .entry_addr = /*? vm_address_config.get('kernel_entry_addr') ?*/, /*- else -*/ + /*# For legacy compatibility, a fall back to the standard Linux entry exists. #*/ + /*- set is_64_bit = (8 == macros.get_word_size(options.architecture)) -*/ + /*- set entry_offset = 0x80000 if is_64_bit else 0x8000 -*/ #warning Using standard Linux entry point, please consider setting kernel_entry_addr explicitly. .entry_addr = /*? vm_address_config.get('ram_base') ?*/ + /*? '0x%x'%entry_offset ?*/, /*- endif -*/ -/*- else -*/ - -#warning You are using the deprecated linux_address_config structure. Please use the vm_address_config structure instead - - .ram = { - .phys_base = /*? linux_address_config.get('linux_ram_paddr_base') ?*/, - .base = /*? linux_address_config.get('linux_ram_base') ?*/, - .size = /*? linux_address_config.get('linux_ram_size') ?*/, - }, - - .dtb_addr = /*? linux_address_config.get('dtb_addr') ?*/, - .initrd_addr = /*? linux_address_config.get('initrd_addr') ?*/, - /* Use standard Linux entry point. */ - .entry_addr = /*? linux_address_config.get('linux_ram_base') ?*/ + /*? '0x%x'%entry_offset ?*/, - -/*- endif -*/ - -/*- if vm_image_config -*/ - .provide_initrd = /*? vm_image_config.get('provide_initrd') ?*/, .generate_dtb = /*? vm_image_config.get('generate_dtb') ?*/, .provide_dtb = /*? vm_image_config.get('provide_dtb') ?*/, @@ -73,50 +60,4 @@ const vm_config_t vm_config = { .kernel_bootcmdline = "/*? vm_image_config.get('kernel_bootcmdline', "") ?*/", .kernel_stdout = "/*? vm_image_config.get('kernel_stdout', "") ?*/", -/*- else -*/ - -#warning "You are using the deprecated linux_image_config structure. The provide_initrd, generate_dtb, provide_dtb, \ - map_one_to_one, and clean_cache flags are set to replicate previous behavior, which may cause your configuration to break. \ - Please use the vm_image_config structure instead." - -#ifdef CONFIG_VM_INITRD_FILE -#warning VmInitRdFile is a deprecated setting. Please remove and use vm_image_config.provide_initrd - .provide_initrd = 1, -#else - .provide_initrd = 0, -#endif - -#ifdef CONFIG_VM_DTB_FILE -#warning VmDtbFile is a deprecated setting. Please remove and use vm_image_config.provide_dtb - .provide_dtb = 1, - .generate_dtb = 0, -#else - .provide_dtb = 0, - .generate_dtb = 1, -#endif - -#if defined(CONFIG_PLAT_EXYNOS5) || defined(CONFIG_PLAT_QEMU_ARM_VIRT) || defined(CONFIG_PLAT_TX2) - .map_one_to_one = 1, -#else - .map_one_to_one = 0, -#endif - -#if defined(CONFIG_PLAT_TX1) || defined(CONFIG_PLAT_TX2) - .clean_cache = 1, -#else - .clean_cache = 0, -#endif - - .files = { - .kernel = "/*? linux_image_config.get('linux_name') ?*/", - .initrd = "/*? linux_image_config.get('initrd_name') ?*/", - .dtb = "/*? linux_image_config.get('dtb_name') ?*/", - .dtb_base = "/*? linux_image_config.get('dtb_base_name') ?*/", - }, - - .kernel_bootcmdline = "/*? linux_image_config.get('linux_bootcmdline') ?*/", - .kernel_stdout = "/*? linux_image_config.get('linux_stdout') ?*/", - -/*- endif -*/ - };