blob: 392ac3f54df085926358c7b53629efe4c7909f5c [file] [log] [blame]
Stephen Rothwell45dc76a2005-06-21 17:15:33 -07001/*
2 * This file contains the "hypervisor call" interface which is used to
3 * drive the hypervisor from SLIC.
4 */
Kelly Dalyecb3ca272005-11-02 15:53:01 +11005#ifndef _ASM_POWERPC_ISERIES_HV_CALL_XM_H
6#define _ASM_POWERPC_ISERIES_HV_CALL_XM_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07007
Kelly Daly50592f52005-11-02 11:37:22 +11008#include <asm/iseries/hv_call_sc.h>
Kelly Daly1ec65d72005-11-02 13:46:07 +11009#include <asm/iseries/hv_types.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070010
Linus Torvalds1da177e2005-04-16 15:20:36 -070011#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
Stephen Rothwell45dc76a2005-06-21 17:15:33 -070019static inline void HvCallXm_getTceTableParms(u64 cb)
Linus Torvalds1da177e2005-04-16 15:20:36 -070020{
21 HvCall1(HvCallXmGetTceTableParms, cb);
Linus Torvalds1da177e2005-04-16 15:20:36 -070022}
Stephen Rothwell45dc76a2005-06-21 17:15:33 -070023
24static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce)
25{
Stephen Rothwell6b7feec2005-06-21 17:15:35 -070026 return HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce);
Linus Torvalds1da177e2005-04-16 15:20:36 -070027}
Stephen Rothwell45dc76a2005-06-21 17:15:33 -070028
29static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset,
30 u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4)
31{
Stephen Rothwell6b7feec2005-06-21 17:15:35 -070032 return HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces,
33 tce1, tce2, tce3, tce4);
Linus Torvalds1da177e2005-04-16 15:20:36 -070034}
Stephen Rothwell45dc76a2005-06-21 17:15:33 -070035
36static inline u64 HvCallXm_testBus(u16 busNumber)
Linus Torvalds1da177e2005-04-16 15:20:36 -070037{
Stephen Rothwell6b7feec2005-06-21 17:15:35 -070038 return HvCall1(HvCallXmTestBus, busNumber);
Linus Torvalds1da177e2005-04-16 15:20:36 -070039}
Stephen Rothwell45dc76a2005-06-21 17:15:33 -070040
41static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber,
42 u8 deviceId)
Linus Torvalds1da177e2005-04-16 15:20:36 -070043{
Stephen Rothwell6b7feec2005-06-21 17:15:35 -070044 return HvCall2(HvCallXmTestBusUnit, busNumber,
45 (subBusNumber << 8) | deviceId);
Linus Torvalds1da177e2005-04-16 15:20:36 -070046}
Stephen Rothwell45dc76a2005-06-21 17:15:33 -070047
48static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber,
49 u8 deviceId, u64 interruptToken)
Linus Torvalds1da177e2005-04-16 15:20:36 -070050{
Stephen Rothwell6b7feec2005-06-21 17:15:35 -070051 return HvCall5(HvCallXmConnectBusUnit, busNumber,
52 (subBusNumber << 8) | deviceId, interruptToken, 0,
53 0 /* HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)) */);
Linus Torvalds1da177e2005-04-16 15:20:36 -070054}
Stephen Rothwell45dc76a2005-06-21 17:15:33 -070055
56static inline u64 HvCallXm_loadTod(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070057{
Stephen Rothwell6b7feec2005-06-21 17:15:35 -070058 return HvCall0(HvCallXmLoadTod);
Linus Torvalds1da177e2005-04-16 15:20:36 -070059}
Linus Torvalds1da177e2005-04-16 15:20:36 -070060
Kelly Dalyecb3ca272005-11-02 15:53:01 +110061#endif /* _ASM_POWERPC_ISERIES_HV_CALL_XM_H */