Commit | Line | Data |
---|---|---|
3c2a0909 S |
1 | /* |
2 | * Copyright (c) 2014 Samsung Electronics Co., Ltd. | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation; either version 2 of the License, or | |
7 | * (at your option) any later version. | |
8 | * | |
9 | * This program is distributed in the hope that it will be useful, | |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | * GNU General Public License for more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License along | |
15 | * with this program; if not, write to the Free Software Foundation, Inc., | |
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 | * | |
18 | */ | |
19 | ||
20 | #include <linux/vmm.h> | |
21 | ||
22 | #define vmm_ELF_PATH "init/vmm.elf" | |
23 | ||
24 | #define SMC_64BIT_RET_MAGIC 0xC2000401 | |
25 | ||
26 | .global _vmm_goto_EL2 | |
27 | _vmm_goto_EL2: | |
28 | smc #0 | |
29 | isb | |
30 | ret | |
31 | ||
32 | .global _vmm_disable | |
33 | _vmm_disable: | |
34 | ldr x0, =SMC_64BIT_RET_MAGIC | |
35 | smc #0 | |
36 | isb | |
37 | ||
38 | .section .vmm, "ax" | |
39 | .global _svmm | |
40 | _svmm: | |
41 | .incbin vmm_ELF_PATH | |
42 | .global _evmm | |
43 | _evmm: | |
44 | .section .text |