aboutsummaryrefslogtreecommitdiff
path: root/core/arch/arm/plat-vexpress
diff options
context:
space:
mode:
authorGuanchao Liang <liang.guanchao@linaro.org>2016-11-30 06:19:29 +0800
committerJerome Forissier <jerome.forissier@linaro.org>2016-11-29 17:11:37 +0100
commit26ed70ec3afa4776dff3df058723e794e5263a6b (patch)
treee27cbb04139b995b205393dfcccafb14390f8f51 /core/arch/arm/plat-vexpress
parentab046bb510e8ec746da9e643ebf241feacecc53e (diff)
core: add code for the interrupt framework
With this commit, we add three more GIC APIs for the kernel of OPTEE-OS: itr_raise_sgi : can raise software generate interrupt(SGI) from secure world to no-secure world, or secure world to secure world. It's a quick communication between different worlds and different cores. Because SGI is using the GIC N-N model, so with this API, every core can receive the interrupt if want. itr_raise_pi : can trigger the peripheral interrupt with the corresponding interrupt number. When sending it to N cores, just one core can receive the effective interrupt. itr_set_affinity : can target the peripheral interrupt to the core you want, it means that one can bind the interrupt to the corresponding core use this API. The usage may as follow: itr_raise_sgi(11, 0x1 << 1) it will raise SGI11 to core 1, and if you want not only core 1 can receive SGI11 but also core 2, then you can change the code to itr_raise_sgi(11, 0x1 << 1 || 0x1 << 2). itr_set_affinity(61, 0x1 << 1) itr_raise_pi(61) These two APIs may use together, the operation set_affinity set the PI61 can just sent to core 1, then raise_pi, core 1 will receive the peripheral interrupt 61. Signed-off-by: Guanchao Liang <liang.guanchao@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU) [Update commit author to be same as S-o-b: above] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Diffstat (limited to 'core/arch/arm/plat-vexpress')
-rw-r--r--core/arch/arm/plat-vexpress/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/arch/arm/plat-vexpress/main.c b/core/arch/arm/plat-vexpress/main.c
index 4616a8b7..85ed9eec 100644
--- a/core/arch/arm/plat-vexpress/main.c
+++ b/core/arch/arm/plat-vexpress/main.c
@@ -170,7 +170,7 @@ KEEP_PAGER(console_itr);
static TEE_Result init_console_itr(void)
{
itr_add(&console_itr);
- itr_enable(&console_itr);
+ itr_enable(IT_CONSOLE_UART);
return TEE_SUCCESS;
}
driver_init(init_console_itr);