diff --git a/arm_vm_helpers.cmake b/arm_vm_helpers.cmake index 78f28bbc..206b20f2 100644 --- a/arm_vm_helpers.cmake +++ b/arm_vm_helpers.cmake @@ -134,9 +134,11 @@ function(DeclareCAmkESARMVM init_component) TEMPLATE_SOURCES seL4AllocatorMempool.template.c seL4VMParameters.template.c + camkesArmVM.template.c TEMPLATE_HEADERS seL4AllocatorMempool.template.h seL4VMParameters.template.h + camkesArmVM.template.h ) if(VmVirtioNetArping OR VmVirtioNetVirtqueue OR VmVirtioConsole) diff --git a/templates/camkesArmVM.template.c b/templates/camkesArmVM.template.c new file mode 100644 index 00000000..05b39569 --- /dev/null +++ b/templates/camkesArmVM.template.c @@ -0,0 +1,23 @@ +/* + * Copyright 2022, DornerWorks + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +/*- if 'pcpus' in configuration[me.name].keys() -*/ + /*- for c in configuration[me.name].get('pcpus') -*/ +#if(/*? c ?*/ >= CONFIG_MAX_NUM_NODES) +#error "Invalid CPU number /*? c ?*/ in PCPU list of /*? me.name ?*/" +#endif + /*- endfor -*/ +/*- endif -*/ + +int get_instance_size_pcpus_list(void) { +/*- if 'pcpus' in configuration[me.name].keys() -*/ + return /*? len(configuration[me.name].get('pcpus')) ?*/; +/*- else -*/ + return 0; +/*- endif -*/ +} diff --git a/templates/camkesArmVM.template.h b/templates/camkesArmVM.template.h new file mode 100644 index 00000000..f012bc94 --- /dev/null +++ b/templates/camkesArmVM.template.h @@ -0,0 +1,7 @@ +/* + * Copyright 2022, DornerWorks + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +int get_instance_size_pcpus_list(void);