1 /*
2  * Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * @file
9  * @brief Software interrupts utility code - ARM64 implementation
10  */
11 
12 #include <zephyr/kernel.h>
13 #include <zephyr/irq_offload.h>
14 #include <exception.h>
15 
arch_irq_offload(irq_offload_routine_t routine,const void * parameter)16 void arch_irq_offload(irq_offload_routine_t routine, const void *parameter)
17 {
18 	register const void *x0 __asm__("x0") = routine;
19 	register const void *x1 __asm__("x1") = parameter;
20 
21 	__asm__ volatile ("svc %[svid]"
22 			  :
23 			  : [svid] "i" (_SVC_CALL_IRQ_OFFLOAD),
24 			    "r" (x0), "r" (x1));
25 }
26 
arch_irq_offload_init(void)27 void arch_irq_offload_init(void)
28 {
29 }
30