summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorNathan Rossi <nathan@nathanrossi.com>2016-09-22 23:58:24 +1000
committerNathan Rossi <nathan@nathanrossi.com>2016-10-11 21:10:52 +1000
commit48b01cff79281148bbc2c32cbf1df3873ed4efad (patch)
tree66d6600887138bccc17c2dc1f7345483df70b50f /recipes-devtools
parent71258dd283b925633f6b308a20e7fbfac9cd6b71 (diff)
downloadmeta-xilinx-48b01cff79281148bbc2c32cbf1df3873ed4efad.tar.gz
qemu: Add patch to fix XADC access on Zynq targets
This patch fixes the regression in QEMU 2.7.0 where the devcfg is mapped with a memory region that is large enough to overlap the xadc device models memory region. This resolves the bug where qemuzynq hangs during kernel boot when it attempts to access the xadc device. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/qemu/files/dma-xlnx-zynq-devcfg.patch55
-rw-r--r--recipes-devtools/qemu/qemu_2.7%.bbappend1
2 files changed, 56 insertions, 0 deletions
diff --git a/recipes-devtools/qemu/files/dma-xlnx-zynq-devcfg.patch b/recipes-devtools/qemu/files/dma-xlnx-zynq-devcfg.patch
new file mode 100644
index 00000000..eb6a5871
--- /dev/null
+++ b/recipes-devtools/qemu/files/dma-xlnx-zynq-devcfg.patch
@@ -0,0 +1,55 @@
1From a43639b12daff2230a98faffcffc79346c8ebf8c Mon Sep 17 00:00:00 2001
2From: Nathan Rossi <nathan@nathanrossi.com>
3Date: Thu, 22 Sep 2016 18:13:08 +0100
4Subject: [PATCH] dma: xlnx-zynq-devcfg: Fix up XLNX_ZYNQ_DEVCFG_R_MAX
5
6Whilst according to the Zynq TRM this device covers a register region of
70x000 - 0x120. The register region is also shared with XADCIF prefix
8registers at 0x100 and above. Due to how the devcfg and the xadc devices
9are implemented in QEMU these are separate models with individual mmio
10regions. As such the region registered by the devcfg overlaps with the
11xadc when initialized in a machine model (e.g. xilinx-zynq-a9).
12
13This patch fixes up the incorrect region size, where
14XLNX_ZYNQ_DEVCFG_R_MAX is missing its '/ 4' causing it to be 0x460 in
15size. As well as setting the region size to the 0x0 - 0x100 region so
16that an xadc device instance can be registered in the correct region to
17pair with the devcfg device instance.
18
19Mapping with XLNX_ZYNQ_DEVCFG_R_MAX = 0x118:
20 dev: xlnx.ps7-dev-cfg, id ""
21 mmio 00000000f8007000/0000000000000460
22 dev: xlnx,zynq-xadc, id ""
23 mmio 00000000f8007100/0000000000000020
24
25Mapping with XLNX_ZYNQ_DEVCFG_R_MAX = 0x100 / 4:
26 dev: xlnx.ps7-dev-cfg, id ""
27 mmio 00000000f8007000/0000000000000100
28 dev: xlnx,zynq-xadc, id ""
29 mmio 00000000f8007100/0000000000000020
30
31Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
32Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
33Message-id: 20160921180911.32289-1-nathan@nathanrossi.com
34Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
35Upstream-Status: Backport
36---
37 include/hw/dma/xlnx-zynq-devcfg.h | 2 +-
38 1 file changed, 1 insertion(+), 1 deletion(-)
39
40diff --git a/include/hw/dma/xlnx-zynq-devcfg.h b/include/hw/dma/xlnx-zynq-devcfg.h
41index d40e5c8df6..9f5119a89a 100644
42--- a/include/hw/dma/xlnx-zynq-devcfg.h
43+++ b/include/hw/dma/xlnx-zynq-devcfg.h
44@@ -34,7 +34,7 @@
45 #define XLNX_ZYNQ_DEVCFG(obj) \
46 OBJECT_CHECK(XlnxZynqDevcfg, (obj), TYPE_XLNX_ZYNQ_DEVCFG)
47
48-#define XLNX_ZYNQ_DEVCFG_R_MAX 0x118
49+#define XLNX_ZYNQ_DEVCFG_R_MAX (0x100 / 4)
50
51 #define XLNX_ZYNQ_DEVCFG_DMA_CMD_FIFO_LEN 10
52
53--
542.9.3
55
diff --git a/recipes-devtools/qemu/qemu_2.7%.bbappend b/recipes-devtools/qemu/qemu_2.7%.bbappend
index eb66caed..60ae486d 100644
--- a/recipes-devtools/qemu/qemu_2.7%.bbappend
+++ b/recipes-devtools/qemu/qemu_2.7%.bbappend
@@ -3,5 +3,6 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
3 3
4SRC_URI += " \ 4SRC_URI += " \
5 file://8fa2346723fb74e8220ac9f186dabc2f57e4cb43.patch \ 5 file://8fa2346723fb74e8220ac9f186dabc2f57e4cb43.patch \
6 file://dma-xlnx-zynq-devcfg.patch \
6 " 7 "
7 8