1 /*
2 * This file contains the "hypervisor call" interface which is used to
3 * drive the hypervisor from SLIC.
4 */
5 #ifndef _ASM_POWERPC_ISERIES_HV_CALL_XM_H
6 #define _ASM_POWERPC_ISERIES_HV_CALL_XM_H
7
8 #include <asm/iseries/hv_call_sc.h>
9 #include <asm/iseries/hv_types.h>
10
11 #define HvCallXmGetTceTableParms HvCallXm + 0
12 #define HvCallXmTestBus HvCallXm + 1
13 #define HvCallXmConnectBusUnit HvCallXm + 2
14 #define HvCallXmLoadTod HvCallXm + 8
15 #define HvCallXmTestBusUnit HvCallXm + 9
16 #define HvCallXmSetTce HvCallXm + 11
17 #define HvCallXmSetTces HvCallXm + 13
18
HvCallXm_getTceTableParms(u64 cb)19 static inline void HvCallXm_getTceTableParms(u64 cb)
20 {
21 HvCall1(HvCallXmGetTceTableParms, cb);
22 }
23
HvCallXm_setTce(u64 tceTableToken,u64 tceOffset,u64 tce)24 static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce)
25 {
26 return HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce);
27 }
28
HvCallXm_setTces(u64 tceTableToken,u64 tceOffset,u64 numTces,u64 tce1,u64 tce2,u64 tce3,u64 tce4)29 static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset,
30 u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4)
31 {
32 return HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces,
33 tce1, tce2, tce3, tce4);
34 }
35
HvCallXm_testBus(u16 busNumber)36 static inline u64 HvCallXm_testBus(u16 busNumber)
37 {
38 return HvCall1(HvCallXmTestBus, busNumber);
39 }
40
HvCallXm_testBusUnit(u16 busNumber,u8 subBusNumber,u8 deviceId)41 static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber,
42 u8 deviceId)
43 {
44 return HvCall2(HvCallXmTestBusUnit, busNumber,
45 (subBusNumber << 8) | deviceId);
46 }
47
HvCallXm_connectBusUnit(u16 busNumber,u8 subBusNumber,u8 deviceId,u64 interruptToken)48 static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber,
49 u8 deviceId, u64 interruptToken)
50 {
51 return HvCall5(HvCallXmConnectBusUnit, busNumber,
52 (subBusNumber << 8) | deviceId, interruptToken, 0,
53 0 /* HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)) */);
54 }
55
HvCallXm_loadTod(void)56 static inline u64 HvCallXm_loadTod(void)
57 {
58 return HvCall0(HvCallXmLoadTod);
59 }
60
61 #endif /* _ASM_POWERPC_ISERIES_HV_CALL_XM_H */
62