summaryrefslogtreecommitdiffstats
path: root/tests/dma/debug/test-iommu.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dma/debug/test-iommu.sh')
-rwxr-xr-xtests/dma/debug/test-iommu.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/dma/debug/test-iommu.sh b/tests/dma/debug/test-iommu.sh
new file mode 100755
index 0000000..74e3ece
--- /dev/null
+++ b/tests/dma/debug/test-iommu.sh
@@ -0,0 +1,19 @@
+#! /bin/bash
+
+i=1
+while [ 1 ]; do
+ pci --start-dma dma1r
+ for name in /sys/class/fpga/fpga0/kbuf*; do
+ bus_addr=0x`cat $name | grep "bus addr" | cut -d ':' -f 2 | sed -e 's/\s\+//g'`
+ if [ $((bus_addr % 4096)) -ne 0 ]; then
+
+ echo "Failed at iteration $i, $name"
+ echo "----------------------"
+ cat $name
+ exit
+ fi
+
+ done
+ pci --stop-dma dma1r
+ i=$((i + 1))
+done