Path: blob/master/arch/powerpc/platforms/iseries/hvcall.S
10820 views
/*1* This file contains the code to perform calls to the2* iSeries LPAR hypervisor3*4* This program is free software; you can redistribute it and/or5* modify it under the terms of the GNU General Public License6* as published by the Free Software Foundation; either version7* 2 of the License, or (at your option) any later version.8*/910#include <asm/ppc_asm.h>11#include <asm/processor.h>12#include <asm/ptrace.h> /* XXX for STACK_FRAME_OVERHEAD */1314.text1516/*17* Hypervisor call18*19* Invoke the iSeries hypervisor via the System Call instruction20* Parameters are passed to this routine in registers r3 - r1021*22* r3 contains the HV function to be called23* r4-r10 contain the operands to the hypervisor function24*25*/2627_GLOBAL(HvCall)28_GLOBAL(HvCall0)29_GLOBAL(HvCall1)30_GLOBAL(HvCall2)31_GLOBAL(HvCall3)32_GLOBAL(HvCall4)33_GLOBAL(HvCall5)34_GLOBAL(HvCall6)35_GLOBAL(HvCall7)363738mfcr r039std r0,-8(r1)40stdu r1,-(STACK_FRAME_OVERHEAD+16)(r1)4142/* r0 = 0xffffffffffffffff indicates a hypervisor call */4344li r0,-14546/* Invoke the hypervisor */4748sc4950ld r1,0(r1)51ld r0,-8(r1)52mtcrf 0xff,r05354/* return to caller, return value in r3 */5556blr5758_GLOBAL(HvCall0Ret16)59_GLOBAL(HvCall1Ret16)60_GLOBAL(HvCall2Ret16)61_GLOBAL(HvCall3Ret16)62_GLOBAL(HvCall4Ret16)63_GLOBAL(HvCall5Ret16)64_GLOBAL(HvCall6Ret16)65_GLOBAL(HvCall7Ret16)6667mfcr r068std r0,-8(r1)69std r31,-16(r1)70stdu r1,-(STACK_FRAME_OVERHEAD+32)(r1)7172mr r31,r473li r0,-174mr r4,r575mr r5,r676mr r6,r777mr r7,r878mr r8,r979mr r9,r108081sc8283std r3,0(r31)84std r4,8(r31)8586mr r3,r58788ld r1,0(r1)89ld r0,-8(r1)90mtcrf 0xff,r091ld r31,-16(r1)9293blr949596