File tree Expand file tree Collapse file tree 4 files changed +50
-0
lines changed Expand file tree Collapse file tree 4 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -31,3 +31,5 @@ endif ()
3131add_subdirectory_ifdef(CONFIG_ARM_MPU cortex_r/mpu)
3232
3333zephyr_cc_option_ifdef(CONFIG_USERSPACE -mno-outline-atomics)
34+
35+ add_subdirectory_ifdef(CONFIG_SOC_XENVM xen)
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: Apache-2.0
2+ # Copyright (c) 2021 EPAM Systems
3+
4+ # Needed to separate definitions in common Xen headers
5+ zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:-D__ASSEMBLY__>)
6+
7+ # Xen interface version used in headers for correct definition
8+ zephyr_compile_options(-D__XEN_INTERFACE_VERSION__=0x00040e00)
9+
10+ zephyr_library_sources(hypercall.S)
Original file line number Diff line number Diff line change 1+ / *
2+ * Copyright (c) 2021 EPAM Systems
3+ *
4+ * SPDX - License - Identifier: Apache - 2 . 0
5+ * /
6+
7+ #include <toolchain.h>
8+ #include <linker/sections.h>
9+ #include <xen/public/arch - arm.h>
10+ #include <xen/public/xen.h>
11+
12+ #define HYPERCALL(hypercall) \
13+ GTEXT(HYPERVISOR_##hypercall) ; \
14+ SECTION_FUNC(TEXT , HYPERVISOR_##hypercall) \
15+ mov x16 , #__HYPERVISOR_##hypercall ; \
16+ hvc XEN_HYPERCALL_TAG ; \
17+ ret ;
18+
19+ _ASM_FILE_PROLOGUE
20+
21+ HYPERCALL(console_io) ;
22+ HYPERCALL(grant_table_op) ;
23+ HYPERCALL(sched_op) ;
24+ HYPERCALL(event_channel_op) ;
25+ HYPERCALL(hvm_op) ;
26+ HYPERCALL(memory_op) ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c() 2021 EPAM Systems
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ /* defined in hypercall.S by HYPERCALL(hypercall) */
8+ int HYPERVISOR_console_io (int op , int cnt , char * str );
9+ int HYPERVISOR_sched_op (int op , void * param );
10+ int HYPERVISOR_event_channel_op (int op , void * param );
11+ int HYPERVISOR_hvm_op (int op , void * param );
12+ int HYPERVISOR_memory_op (int op , void * param );
You can’t perform that action at this time.
0 commit comments