aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Huth <thuth@linux.vnet.ibm.com>2011-08-03 13:06:46 +0200
committerThomas Huth <thuth@linux.vnet.ibm.com>2011-10-12 16:24:55 +0200
commit904abb4a8f424f7962f09d4aa53fb321403fc087 (patch)
tree412904b26c79e3ff02069d84bbfd5f2742283bc3
parentc6919593897c1c04a47e420ee34458eca7011e3f (diff)
downloadSLOF-904abb4a8f424f7962f09d4aa53fb321403fc087.zip
SLOF-904abb4a8f424f7962f09d4aa53fb321403fc087.tar.gz
SLOF-904abb4a8f424f7962f09d4aa53fb321403fc087.tar.bz2
Add wrapper for H_PUT_TCE hypervisor call
H_PUT_TCE is needed for getting the DMA transfers working in the virtual environment. Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
-rw-r--r--lib/libhvcall/hvcall.code7
-rw-r--r--lib/libhvcall/hvcall.in1
-rw-r--r--lib/libhvcall/libhvcall.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/lib/libhvcall/hvcall.code b/lib/libhvcall/hvcall.code
index 6d4a141..05f9cba 100644
--- a/lib/libhvcall/hvcall.code
+++ b/lib/libhvcall/hvcall.code
@@ -50,6 +50,13 @@ PRIM(hv_X2d_send_X2d_crq)
TOS.n = hv_send_crq(unit, msgaddr);
MIRP
+// : hv-put-tce ( liobn ioba tce -- rc )
+PRIM(hv_X2d_put_X2d_tce)
+ uint64_t tce = TOS.u; POP;
+ uint64_t ioba = TOS.u; POP;
+ uint32_t liobn = TOS.u;
+ TOS.u = hv_generic(H_PUT_TCE, liobn, ioba, tce);
+MIRP
PRIM(RB_X40)
unsigned long qaddr = TOS.u;
diff --git a/lib/libhvcall/hvcall.in b/lib/libhvcall/hvcall.in
index 13fa790..abbb2c8 100644
--- a/lib/libhvcall/hvcall.in
+++ b/lib/libhvcall/hvcall.in
@@ -16,6 +16,7 @@ cod(hv-haschar)
cod(hv-reg-crq)
cod(hv-free-crq)
cod(hv-send-crq)
+cod(hv-put-tce)
cod(RB@)
cod(RB!)
diff --git a/lib/libhvcall/libhvcall.h b/lib/libhvcall/libhvcall.h
index ad7088d..347fada 100644
--- a/lib/libhvcall/libhvcall.h
+++ b/lib/libhvcall/libhvcall.h
@@ -3,6 +3,8 @@
#define H_SUCCESS 0
+#define H_GET_TCE 0x1C
+#define H_PUT_TCE 0x20
#define H_LOGICAL_CI_LOAD 0x3c
#define H_LOGICAL_CI_STORE 0x40
#define H_GET_TERM_CHAR 0x54