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 /* Not implemented on Beat, now */
26 #define HCALL_INST_PRECALL
27 #define HCALL_INST_POSTCALL
31 #define HVSC .long 0x44000022
33 /* Note: takes only 7 input parameters at maximum */
34 _GLOBAL(beat_hcall_norets)
50 HVSC /* invoke the hypervisor */
57 blr /* return r3 = status */
59 /* Note: takes 8 input parameters at maximum */
60 _GLOBAL(beat_hcall_norets8)
75 ld r10,STK_PARAM(R10)(r1)
77 HVSC /* invoke the hypervisor */
84 blr /* return r3 = status */
86 /* Note: takes only 6 input parameters, 1 output parameters at maximum */
95 std r4,STK_PARAM(R4)(r1) /* save ret buffer */
105 HVSC /* invoke the hypervisor */
109 ld r12,STK_PARAM(R4)(r1)
115 blr /* return r3 = status */
117 /* Note: takes only 6 input parameters, 2 output parameters at maximum */
126 std r4,STK_PARAM(R4)(r1) /* save ret buffer */
136 HVSC /* invoke the hypervisor */
140 ld r12,STK_PARAM(R4)(r1)
147 blr /* return r3 = status */
149 /* Note: takes only 6 input parameters, 3 output parameters at maximum */
158 std r4,STK_PARAM(R4)(r1) /* save ret buffer */
168 HVSC /* invoke the hypervisor */
172 ld r12,STK_PARAM(R4)(r1)
180 blr /* return r3 = status */
182 /* Note: takes only 6 input parameters, 4 output parameters at maximum */
191 std r4,STK_PARAM(R4)(r1) /* save ret buffer */
201 HVSC /* invoke the hypervisor */
205 ld r12,STK_PARAM(R4)(r1)
214 blr /* return r3 = status */
216 /* Note: takes only 6 input parameters, 5 output parameters at maximum */
225 std r4,STK_PARAM(R4)(r1) /* save ret buffer */
235 HVSC /* invoke the hypervisor */
239 ld r12,STK_PARAM(R4)(r1)
249 blr /* return r3 = status */
251 /* Note: takes only 6 input parameters, 6 output parameters at maximum */
260 std r4,STK_PARAM(R4)(r1) /* save ret buffer */
270 HVSC /* invoke the hypervisor */
274 ld r12,STK_PARAM(R4)(r1)
285 blr /* return r3 = status */