2005-06-22 00:15:33 +00:00
|
|
|
/*
|
|
|
|
* This file contains the "hypervisor call" interface which is used to
|
|
|
|
* drive the hypervisor from SLIC.
|
|
|
|
*/
|
2005-11-02 04:53:01 +00:00
|
|
|
#ifndef _ASM_POWERPC_ISERIES_HV_CALL_XM_H
|
|
|
|
#define _ASM_POWERPC_ISERIES_HV_CALL_XM_H
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2005-11-02 00:37:22 +00:00
|
|
|
#include <asm/iseries/hv_call_sc.h>
|
2005-11-02 02:46:07 +00:00
|
|
|
#include <asm/iseries/hv_types.h>
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
#define HvCallXmGetTceTableParms HvCallXm + 0
|
|
|
|
#define HvCallXmTestBus HvCallXm + 1
|
|
|
|
#define HvCallXmConnectBusUnit HvCallXm + 2
|
|
|
|
#define HvCallXmLoadTod HvCallXm + 8
|
|
|
|
#define HvCallXmTestBusUnit HvCallXm + 9
|
|
|
|
#define HvCallXmSetTce HvCallXm + 11
|
|
|
|
#define HvCallXmSetTces HvCallXm + 13
|
|
|
|
|
2005-06-22 00:15:44 +00:00
|
|
|
/*
|
|
|
|
* Structure passed to HvCallXm_getTceTableParms
|
|
|
|
*/
|
|
|
|
struct iommu_table_cb {
|
|
|
|
unsigned long itc_busno; /* Bus number for this tce table */
|
|
|
|
unsigned long itc_start; /* Will be NULL for secondary */
|
|
|
|
unsigned long itc_totalsize; /* Size (in pages) of whole table */
|
|
|
|
unsigned long itc_offset; /* Index into real tce table of the
|
|
|
|
start of our section */
|
|
|
|
unsigned long itc_size; /* Size (in pages) of our section */
|
|
|
|
unsigned long itc_index; /* Index of this tce table */
|
|
|
|
unsigned short itc_maxtables; /* Max num of tables for partition */
|
|
|
|
unsigned char itc_virtbus; /* Flag to indicate virtual bus */
|
|
|
|
unsigned char itc_slotno; /* IOA Tce Slot Index */
|
|
|
|
unsigned char itc_rsvd[4];
|
|
|
|
};
|
|
|
|
|
2005-06-22 00:15:33 +00:00
|
|
|
static inline void HvCallXm_getTceTableParms(u64 cb)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
|
|
|
HvCall1(HvCallXmGetTceTableParms, cb);
|
|
|
|
}
|
2005-06-22 00:15:33 +00:00
|
|
|
|
|
|
|
static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce)
|
|
|
|
{
|
2005-06-22 00:15:35 +00:00
|
|
|
return HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce);
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
2005-06-22 00:15:33 +00:00
|
|
|
|
|
|
|
static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset,
|
|
|
|
u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4)
|
|
|
|
{
|
2005-06-22 00:15:35 +00:00
|
|
|
return HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces,
|
|
|
|
tce1, tce2, tce3, tce4);
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
2005-06-22 00:15:33 +00:00
|
|
|
|
|
|
|
static inline u64 HvCallXm_testBus(u16 busNumber)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
2005-06-22 00:15:35 +00:00
|
|
|
return HvCall1(HvCallXmTestBus, busNumber);
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
2005-06-22 00:15:33 +00:00
|
|
|
|
|
|
|
static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber,
|
|
|
|
u8 deviceId)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
2005-06-22 00:15:35 +00:00
|
|
|
return HvCall2(HvCallXmTestBusUnit, busNumber,
|
|
|
|
(subBusNumber << 8) | deviceId);
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
2005-06-22 00:15:33 +00:00
|
|
|
|
|
|
|
static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber,
|
|
|
|
u8 deviceId, u64 interruptToken)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
2005-06-22 00:15:35 +00:00
|
|
|
return HvCall5(HvCallXmConnectBusUnit, busNumber,
|
|
|
|
(subBusNumber << 8) | deviceId, interruptToken, 0,
|
|
|
|
0 /* HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)) */);
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
2005-06-22 00:15:33 +00:00
|
|
|
|
|
|
|
static inline u64 HvCallXm_loadTod(void)
|
2005-04-16 22:20:36 +00:00
|
|
|
{
|
2005-06-22 00:15:35 +00:00
|
|
|
return HvCall0(HvCallXmLoadTod);
|
2005-04-16 22:20:36 +00:00
|
|
|
}
|
|
|
|
|
2005-11-02 04:53:01 +00:00
|
|
|
#endif /* _ASM_POWERPC_ISERIES_HV_CALL_XM_H */
|