Skip to content

Commit 14560d1

Browse files
author
Axel Heider
committed
vm_arm: remove deprecated config options
Signed-off-by: Axel Heider <axel.heider@hensoldt.net>
1 parent 3730eab commit 14560d1

3 files changed

Lines changed: 14 additions & 106 deletions

File tree

components/VM_Arm/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -111,22 +111,6 @@ config_option(
111111
OFF
112112
)
113113

114-
config_option(
115-
VmInitRdFile
116-
VM_INITRD_FILE
117-
"Enables the option for the VM to open and load a seperate initrd file"
118-
DEFAULT
119-
OFF
120-
)
121-
122-
config_option(
123-
VmDtbFile
124-
VM_DTB_FILE
125-
"Enables the option for the VM to open and load a seperate dtb file"
126-
DEFAULT
127-
OFF
128-
)
129-
130114
config_option(
131115
VmVirtUart
132116
VM_VIRT_UART

components/VM_Arm/configurations/vm.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -88,23 +88,6 @@
8888
int clean_cache = false; \
8989
int map_one_to_one = false; \
9090
} vm_image_config; \
91-
attribute { \
92-
string linux_ram_base; \
93-
string linux_ram_paddr_base; \
94-
string linux_ram_size; \
95-
string linux_ram_offset = "0"; /* obsolete */ \
96-
string dtb_addr; \
97-
string initrd_max_size = "-1"; /* obsolete */ \
98-
string initrd_addr; \
99-
} linux_address_config; \
100-
attribute { \
101-
string linux_name = "linux"; \
102-
string dtb_name = "linux-dtb"; \
103-
string initrd_name = "linux-initrd"; \
104-
string linux_bootcmdline = ""; \
105-
string linux_stdout = ""; \
106-
string dtb_base_name = ""; \
107-
} linux_image_config; \
10891
attribute { \
10992
int send_id; \
11093
int recv_id; \

templates/seL4VMParameters.template.c

Lines changed: 14 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,22 @@
99
#include <arm_vm/gen_config.h>
1010

1111
/*- set config = configuration[me.name] -*/
12+
/*- if not config -*/
13+
/*? raise(Exception('Missing VM configuration')) ?*/
14+
/*- endif -*/
15+
1216
/*- set vm_address_config = config.get('vm_address_config') -*/
13-
/*- set vm_image_config = config.get('vm_image_config') -*/
14-
/*- set linux_address_config = config.get('linux_address_config') -*/
15-
/*- set linux_image_config = config.get('linux_image_config') -*/
17+
/*- if not vm_address_config -*/
18+
/*? raise(Exception('Missing VM address configuration')) ?*/
19+
/*- endif -*/
1620

17-
/*# For legacy compatibility, a fall back to the standard Linux entry exists. #*/
18-
/*- set is_64_bit = (8 == macros.get_word_size(options.architecture)) -*/
19-
/*- set entry_offset = 0x80000 if is_64_bit else 0x8000 -*/
21+
/*- set vm_image_config = config.get('vm_image_config') -*/
22+
/*- if not vm_image_config -*/
23+
/*? raise(Exception('Missing VM image configuration')) ?*/
24+
/*- endif -*/
2025

2126
const vm_config_t vm_config = {
2227

23-
/*- if vm_address_config -*/
24-
2528
.ram = {
2629
.phys_base = /*? vm_address_config.get('ram_paddr_base') ?*/,
2730
.base = /*? vm_address_config.get('ram_base') ?*/,
@@ -34,29 +37,13 @@ const vm_config_t vm_config = {
3437
/*- if vm_address_config.get('kernel_entry_addr') != '-1' -*/
3538
.entry_addr = /*? vm_address_config.get('kernel_entry_addr') ?*/,
3639
/*- else -*/
40+
/*# For legacy compatibility, a fall back to the standard Linux entry exists. #*/
41+
/*- set is_64_bit = (8 == macros.get_word_size(options.architecture)) -*/
42+
/*- set entry_offset = 0x80000 if is_64_bit else 0x8000 -*/
3743
#warning Using standard Linux entry point, please consider setting kernel_entry_addr explicitly.
3844
.entry_addr = /*? vm_address_config.get('ram_base') ?*/ + /*? '0x%x'%entry_offset ?*/,
3945
/*- endif -*/
4046

41-
/*- else -*/
42-
43-
#warning You are using the deprecated linux_address_config structure. Please use the vm_address_config structure instead
44-
45-
.ram = {
46-
.phys_base = /*? linux_address_config.get('linux_ram_paddr_base') ?*/,
47-
.base = /*? linux_address_config.get('linux_ram_base') ?*/,
48-
.size = /*? linux_address_config.get('linux_ram_size') ?*/,
49-
},
50-
51-
.dtb_addr = /*? linux_address_config.get('dtb_addr') ?*/,
52-
.initrd_addr = /*? linux_address_config.get('initrd_addr') ?*/,
53-
/* Use standard Linux entry point. */
54-
.entry_addr = /*? linux_address_config.get('linux_ram_base') ?*/ + /*? '0x%x'%entry_offset ?*/,
55-
56-
/*- endif -*/
57-
58-
/*- if vm_image_config -*/
59-
6047
.provide_initrd = /*? vm_image_config.get('provide_initrd') ?*/,
6148
.generate_dtb = /*? vm_image_config.get('generate_dtb') ?*/,
6249
.provide_dtb = /*? vm_image_config.get('provide_dtb') ?*/,
@@ -73,50 +60,4 @@ const vm_config_t vm_config = {
7360
.kernel_bootcmdline = "/*? vm_image_config.get('kernel_bootcmdline', "") ?*/",
7461
.kernel_stdout = "/*? vm_image_config.get('kernel_stdout', "") ?*/",
7562

76-
/*- else -*/
77-
78-
#warning "You are using the deprecated linux_image_config structure. The provide_initrd, generate_dtb, provide_dtb, \
79-
map_one_to_one, and clean_cache flags are set to replicate previous behavior, which may cause your configuration to break. \
80-
Please use the vm_image_config structure instead."
81-
82-
#ifdef CONFIG_VM_INITRD_FILE
83-
#warning VmInitRdFile is a deprecated setting. Please remove and use vm_image_config.provide_initrd
84-
.provide_initrd = 1,
85-
#else
86-
.provide_initrd = 0,
87-
#endif
88-
89-
#ifdef CONFIG_VM_DTB_FILE
90-
#warning VmDtbFile is a deprecated setting. Please remove and use vm_image_config.provide_dtb
91-
.provide_dtb = 1,
92-
.generate_dtb = 0,
93-
#else
94-
.provide_dtb = 0,
95-
.generate_dtb = 1,
96-
#endif
97-
98-
#if defined(CONFIG_PLAT_EXYNOS5) || defined(CONFIG_PLAT_QEMU_ARM_VIRT) || defined(CONFIG_PLAT_TX2)
99-
.map_one_to_one = 1,
100-
#else
101-
.map_one_to_one = 0,
102-
#endif
103-
104-
#if defined(CONFIG_PLAT_TX1) || defined(CONFIG_PLAT_TX2)
105-
.clean_cache = 1,
106-
#else
107-
.clean_cache = 0,
108-
#endif
109-
110-
.files = {
111-
.kernel = "/*? linux_image_config.get('linux_name') ?*/",
112-
.initrd = "/*? linux_image_config.get('initrd_name') ?*/",
113-
.dtb = "/*? linux_image_config.get('dtb_name') ?*/",
114-
.dtb_base = "/*? linux_image_config.get('dtb_base_name') ?*/",
115-
},
116-
117-
.kernel_bootcmdline = "/*? linux_image_config.get('linux_bootcmdline') ?*/",
118-
.kernel_stdout = "/*? linux_image_config.get('linux_stdout') ?*/",
119-
120-
/*- endif -*/
121-
12263
};

0 commit comments

Comments
 (0)