diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2016-09-22 23:58:24 +1000 |
---|---|---|
committer | Nathan Rossi <nathan@nathanrossi.com> | 2016-10-11 21:10:52 +1000 |
commit | 48b01cff79281148bbc2c32cbf1df3873ed4efad (patch) | |
tree | 66d6600887138bccc17c2dc1f7345483df70b50f /recipes-devtools | |
parent | 71258dd283b925633f6b308a20e7fbfac9cd6b71 (diff) | |
download | meta-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.patch | 55 | ||||
-rw-r--r-- | recipes-devtools/qemu/qemu_2.7%.bbappend | 1 |
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 @@ | |||
1 | From a43639b12daff2230a98faffcffc79346c8ebf8c Mon Sep 17 00:00:00 2001 | ||
2 | From: Nathan Rossi <nathan@nathanrossi.com> | ||
3 | Date: Thu, 22 Sep 2016 18:13:08 +0100 | ||
4 | Subject: [PATCH] dma: xlnx-zynq-devcfg: Fix up XLNX_ZYNQ_DEVCFG_R_MAX | ||
5 | |||
6 | Whilst according to the Zynq TRM this device covers a register region of | ||
7 | 0x000 - 0x120. The register region is also shared with XADCIF prefix | ||
8 | registers at 0x100 and above. Due to how the devcfg and the xadc devices | ||
9 | are implemented in QEMU these are separate models with individual mmio | ||
10 | regions. As such the region registered by the devcfg overlaps with the | ||
11 | xadc when initialized in a machine model (e.g. xilinx-zynq-a9). | ||
12 | |||
13 | This patch fixes up the incorrect region size, where | ||
14 | XLNX_ZYNQ_DEVCFG_R_MAX is missing its '/ 4' causing it to be 0x460 in | ||
15 | size. As well as setting the region size to the 0x0 - 0x100 region so | ||
16 | that an xadc device instance can be registered in the correct region to | ||
17 | pair with the devcfg device instance. | ||
18 | |||
19 | Mapping 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 | |||
25 | Mapping 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 | |||
31 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> | ||
32 | Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> | ||
33 | Message-id: 20160921180911.32289-1-nathan@nathanrossi.com | ||
34 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
35 | Upstream-Status: Backport | ||
36 | --- | ||
37 | include/hw/dma/xlnx-zynq-devcfg.h | 2 +- | ||
38 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
39 | |||
40 | diff --git a/include/hw/dma/xlnx-zynq-devcfg.h b/include/hw/dma/xlnx-zynq-devcfg.h | ||
41 | index 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 | -- | ||
54 | 2.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 | ||
4 | SRC_URI += " \ | 4 | SRC_URI += " \ |
5 | file://8fa2346723fb74e8220ac9f186dabc2f57e4cb43.patch \ | 5 | file://8fa2346723fb74e8220ac9f186dabc2f57e4cb43.patch \ |
6 | file://dma-xlnx-zynq-devcfg.patch \ | ||
6 | " | 7 | " |
7 | 8 | ||