xref: /openbmc/linux/arch/hexagon/kernel/vm_ops.S (revision ca55b2fe)
1/*
2 * Hexagon VM instruction support
3 *
4 * Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 and
8 * only version 2 as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301, USA.
19 */
20
21#include <linux/linkage.h>
22#include <asm/hexagon_vm.h>
23
24/*
25 * C wrappers for virtual machine "instructions".  These
26 * could be, and perhaps some day will be, handled as in-line
27 * macros, but for tracing/debugging it's handy to have
28 * a single point of invocation for each of them.
29 * Conveniently, they take paramters and return values
30 * consistent with the ABI calling convention.
31 */
32
33ENTRY(__vmrte)
34	trap1(#HVM_TRAP1_VMRTE);
35	jumpr	R31;
36
37ENTRY(__vmsetvec)
38	trap1(#HVM_TRAP1_VMSETVEC);
39	jumpr	R31;
40
41ENTRY(__vmsetie)
42	trap1(#HVM_TRAP1_VMSETIE);
43	jumpr	R31;
44
45ENTRY(__vmgetie)
46	trap1(#HVM_TRAP1_VMGETIE);
47	jumpr	R31;
48
49ENTRY(__vmintop)
50	trap1(#HVM_TRAP1_VMINTOP);
51	jumpr	R31;
52
53ENTRY(__vmclrmap)
54	trap1(#HVM_TRAP1_VMCLRMAP);
55	jumpr	R31;
56
57ENTRY(__vmnewmap)
58	r1 = #VM_NEWMAP_TYPE_PGTABLES;
59	trap1(#HVM_TRAP1_VMNEWMAP);
60	jumpr	R31;
61
62ENTRY(__vmcache)
63	trap1(#HVM_TRAP1_VMCACHE);
64	jumpr	R31;
65
66ENTRY(__vmgettime)
67	trap1(#HVM_TRAP1_VMGETTIME);
68	jumpr	R31;
69
70ENTRY(__vmsettime)
71	trap1(#HVM_TRAP1_VMSETTIME);
72	jumpr	R31;
73
74ENTRY(__vmwait)
75	trap1(#HVM_TRAP1_VMWAIT);
76	jumpr	R31;
77
78ENTRY(__vmyield)
79	trap1(#HVM_TRAP1_VMYIELD);
80	jumpr	R31;
81
82ENTRY(__vmstart)
83	trap1(#HVM_TRAP1_VMSTART);
84	jumpr	R31;
85
86ENTRY(__vmstop)
87	trap1(#HVM_TRAP1_VMSTOP);
88	jumpr	R31;
89
90ENTRY(__vmvpid)
91	trap1(#HVM_TRAP1_VMVPID);
92	jumpr	R31;
93
94/*  Probably not actually going to use these; see vm_entry.S  */
95
96ENTRY(__vmsetregs)
97	trap1(#HVM_TRAP1_VMSETREGS);
98	jumpr	R31;
99
100ENTRY(__vmgetregs)
101	trap1(#HVM_TRAP1_VMGETREGS);
102	jumpr	R31;
103