0001
0002
0003
0004
0005
0006
0007
0008 #include <linux/jump_label.h>
0009 #include <asm/ppc_asm.h>
0010 #include <asm/hvcall.h>
0011 #include <asm/asm-offsets.h>
0012 #include <asm/opal.h>
0013 #include <asm/asm-compat.h>
0014 #include <asm/feature-fixups.h>
0015
0016 .section ".text"
0017
0018
0019
0020
0021
0022
0023 _GLOBAL_TOC(__opal_call)
0024 mflr r0
0025 std r0,PPC_LR_STKOFF(r1)
0026 ld r12,STK_PARAM(R12)(r1)
0027 li r0,MSR_IR|MSR_DR|MSR_LE
0028 andc r12,r12,r0
0029 LOAD_REG_ADDR(r11, opal_return)
0030 mtlr r11
0031 LOAD_REG_ADDR(r11, opal)
0032 ld r2,0(r11)
0033 ld r11,8(r11)
0034 mtspr SPRN_HSRR0,r11
0035 mtspr SPRN_HSRR1,r12
0036
0037 ld r0,STK_PARAM(R11)(r1)
0038 hrfid
0039 opal_return:
0040
0041
0042
0043 #ifdef __BIG_ENDIAN__
0044 ld r11,STK_PARAM(R12)(r1)
0045 mtmsrd r11
0046 #else
0047
0048 .short 0x4039
0049 .byte (STK_PARAM(R12) >> 8) & 0xff
0050 .byte STK_PARAM(R12) & 0xff
0051
0052 .long 0x280c6a7d
0053 .long 0x05009f42
0054 .long 0xa602487d
0055 .long 0x14004a39
0056 .long 0xa64b5a7d
0057 .long 0xa64b7b7d
0058 .long 0x2402004c
0059 #endif
0060 ld r2,PACATOC(r13)
0061 ld r0,PPC_LR_STKOFF(r1)
0062 mtlr r0
0063 blr