From b325158e8212952e865887ec883119ee61393aa3 Mon Sep 17 00:00:00 2001 From: Alex Pavey Date: Tue, 9 Nov 2021 11:04:30 -0500 Subject: [PATCH] smc_cap: Give specified components smc capability Signed-off-by: Robbie VanVossen --- camkes/templates/component.common.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/camkes/templates/component.common.c b/camkes/templates/component.common.c index b66c521f..588a9011 100644 --- a/camkes/templates/component.common.c +++ b/camkes/templates/component.common.c @@ -84,6 +84,23 @@ int get_instance_affinity(void) { return /*? configuration[me.name].get('affinity', options.default_affinity) ?*/; } +#ifdef CONFIG_ALLOW_SMC_CALLS +/*# ARM SMC cap allocation #*/ +/*- if 'allow_smc' in configuration[me.name].keys() -*/ + /*- if configuration[me.name].get('allow_smc') == true -*/ + /*- set smc_cap = alloc(name='smc', type=seL4_ARMSMC) -*/ + /*- else -*/ + /*- set smc_cap = 0 -*/ + /*- endif -*/ +/*- else -*/ + /*- set smc_cap = 0 -*/ +/*- endif -*/ + +seL4_CPtr camkes_get_smc_cap(){ + return /*? smc_cap ?*/; +} +#endif + /*- set cnode_size = configuration[me.address_space].get('cnode_size_bits') -*/ /*- if cnode_size -*/ /*- if isinstance(cnode_size, six.string_types) -*/