Skip to content

Commit

Permalink
vm_arm: remove deprecated config options
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
Axel Heider committed Jan 28, 2024
1 parent 2023934 commit 393ab08
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 106 deletions.
16 changes: 0 additions & 16 deletions components/VM_Arm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 0 additions & 17 deletions components/VM_Arm/configurations/vm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
83 changes: 10 additions & 73 deletions templates/seL4VMParameters.template.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@
/*- 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') ?*/,
Expand All @@ -38,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') ?*/,
Expand All @@ -77,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 -*/

};

0 comments on commit 393ab08

Please sign in to comment.