]> rtime.felk.cvut.cz Git - jailhouse.git/blob - hypervisor/arch/arm/include/asm/control.h
Merge remote-tracking branch 'kiszka/master'
[jailhouse.git] / hypervisor / arch / arm / include / asm / control.h
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Copyright (c) ARM Limited, 2014
5  *
6  * Authors:
7  *  Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2.  See
10  * the COPYING file in the top-level directory.
11  */
12
13 #ifndef _JAILHOUSE_ASM_CONTROL_H
14 #define _JAILHOUSE_ASM_CONTROL_H
15
16 #define SGI_INJECT      0
17 #define SGI_CPU_OFF     1
18
19 #define CACHES_CLEAN            0
20 #define CACHES_CLEAN_INVALIDATE 1
21
22 #ifndef __ASSEMBLY__
23
24 #include <jailhouse/cell.h>
25 #include <asm/percpu.h>
26
27 void arch_cpu_dcaches_flush(unsigned int action);
28 void arch_cpu_icache_flush(void);
29 void arch_cpu_tlb_flush(struct per_cpu *cpu_data);
30 void arch_cell_caches_flush(struct cell *cell);
31 int arch_mmu_cell_init(struct cell *cell);
32 void arch_mmu_cell_destroy(struct cell *cell);
33 int arch_mmu_cpu_cell_init(struct per_cpu *cpu_data);
34 void arch_handle_sgi(struct per_cpu *cpu_data, u32 irqn);
35 void arch_handle_trap(struct per_cpu *cpu_data, struct registers *guest_regs);
36 struct registers* arch_handle_exit(struct per_cpu *cpu_data,
37                                    struct registers *regs);
38 bool arch_handle_phys_irq(struct per_cpu *cpu_data, u32 irqn);
39 void arch_reset_self(struct per_cpu *cpu_data);
40 void arch_shutdown_self(struct per_cpu *cpu_data);
41 unsigned int arm_cpu_by_mpidr(struct cell *cell, unsigned long mpidr);
42
43 void __attribute__((noreturn)) vmreturn(struct registers *guest_regs);
44 void __attribute__((noreturn)) arch_shutdown_mmu(struct per_cpu *cpu_data);
45
46 #endif /* !__ASSEMBLY__ */
47
48 #endif /* !_JAILHOUSE_ASM_CONTROL_H */