2 * Beat hypervisor call I/F
4 * (C) Copyright 2007 TOSHIBA CORPORATION
6 * This code is based on arch/powerpc/platforms/pseries/hvCall.S.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #include <asm/ppc_asm.h>
25 #define STK_PARM(i) (48 + ((i)-3)*8)
27 /* Not implemented on Beat, now */
28 #define HCALL_INST_PRECALL
29 #define HCALL_INST_POSTCALL
33 #define HVSC .long 0x44000022
35 /* Note: takes only 7 input parameters at maximum */
36 _GLOBAL(beat_hcall_norets)
52 HVSC /* invoke the hypervisor */
59 blr /* return r3 = status */
61 /* Note: takes 8 input parameters at maximum */
62 _GLOBAL(beat_hcall_norets8)
77 ld r10,STK_PARM(r10)(r1)
79 HVSC /* invoke the hypervisor */
86 blr /* return r3 = status */
88 /* Note: takes only 6 input parameters, 1 output parameters at maximum */
97 std r4,STK_PARM(r4)(r1) /* save ret buffer */
107 HVSC /* invoke the hypervisor */
111 ld r12,STK_PARM(r4)(r1)
117 blr /* return r3 = status */
119 /* Note: takes only 6 input parameters, 2 output parameters at maximum */
128 std r4,STK_PARM(r4)(r1) /* save ret buffer */
138 HVSC /* invoke the hypervisor */
142 ld r12,STK_PARM(r4)(r1)
149 blr /* return r3 = status */
151 /* Note: takes only 6 input parameters, 3 output parameters at maximum */
160 std r4,STK_PARM(r4)(r1) /* save ret buffer */
170 HVSC /* invoke the hypervisor */
174 ld r12,STK_PARM(r4)(r1)
182 blr /* return r3 = status */
184 /* Note: takes only 6 input parameters, 4 output parameters at maximum */
193 std r4,STK_PARM(r4)(r1) /* save ret buffer */
203 HVSC /* invoke the hypervisor */
207 ld r12,STK_PARM(r4)(r1)
216 blr /* return r3 = status */
218 /* Note: takes only 6 input parameters, 5 output parameters at maximum */
227 std r4,STK_PARM(r4)(r1) /* save ret buffer */
237 HVSC /* invoke the hypervisor */
241 ld r12,STK_PARM(r4)(r1)
251 blr /* return r3 = status */
253 /* Note: takes only 6 input parameters, 6 output parameters at maximum */
262 std r4,STK_PARM(r4)(r1) /* save ret buffer */
272 HVSC /* invoke the hypervisor */
276 ld r12,STK_PARM(r4)(r1)
287 blr /* return r3 = status */