summaryrefslogtreecommitdiff
path: root/purgatory/arch/ppc64/hvCall.S
blob: bdc4cb0411cc331fad4c0b46afbbbf3697b291c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * This file contains the generic function to perform a call to the
 * pSeries LPAR hypervisor.
 *
 * Taken from linux/arch/powerpc/platforms/pseries/hvCall.S
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 */

#define HVSC	.long 0x44000022
.text
	.machine ppc64
.globl .plpar_hcall_norets
.plpar_hcall_norets:
	or	6,6,6			# medium low priority
        mfcr	0
        stw	0,8(1)

        HVSC 				/* invoke the hypervisor */

        lwz	0,8(1)
        mtcrf	0xff,0
        blr                             /* return r3 = status */