summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/qemu/qemu-zynqmp-mainline/0013-arm-xilinx-zynq-mp-generic-Add-external-RAM.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/qemu/qemu-zynqmp-mainline/0013-arm-xilinx-zynq-mp-generic-Add-external-RAM.patch')
-rw-r--r--recipes-devtools/qemu/qemu-zynqmp-mainline/0013-arm-xilinx-zynq-mp-generic-Add-external-RAM.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes-devtools/qemu/qemu-zynqmp-mainline/0013-arm-xilinx-zynq-mp-generic-Add-external-RAM.patch b/recipes-devtools/qemu/qemu-zynqmp-mainline/0013-arm-xilinx-zynq-mp-generic-Add-external-RAM.patch
new file mode 100644
index 00000000..0af560de
--- /dev/null
+++ b/recipes-devtools/qemu/qemu-zynqmp-mainline/0013-arm-xilinx-zynq-mp-generic-Add-external-RAM.patch
@@ -0,0 +1,43 @@
1From 0b155ff9a1e19f2b4ed4324e822285d3a667f02a Mon Sep 17 00:00:00 2001
2From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
3Date: Mon, 23 Feb 2015 15:04:53 -0800
4Subject: [PATCH 13/15] arm: xilinx-zynq-mp-generic: Add external RAM
5
6Zynq MPSoC supports external DDR RAM. Add a RAM at 0 to the model.
7
8Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
9---
10 hw/arm/xlnx-zynq-mp-generic.c | 7 +++++++
11 1 file changed, 7 insertions(+)
12
13diff --git a/hw/arm/xlnx-zynq-mp-generic.c b/hw/arm/xlnx-zynq-mp-generic.c
14index ff69b07..7394e82 100644
15--- a/hw/arm/xlnx-zynq-mp-generic.c
16+++ b/hw/arm/xlnx-zynq-mp-generic.c
17@@ -18,9 +18,11 @@
18 #include "hw/arm/xlnx-zynq-mp.h"
19 #include "hw/boards.h"
20 #include "qemu/error-report.h"
21+#include "exec/address-spaces.h"
22
23 typedef struct XlnxZynqMPGeneric {
24 XlnxZynqMPState soc;
25+ MemoryRegion ddr_ram;
26 } XlnxZynqMPGeneric;
27
28 static void xlnx_zynq_mp_generic_init(MachineState *machine)
29@@ -36,6 +38,11 @@ static void xlnx_zynq_mp_generic_init(MachineState *machine)
30 error_report("%s", error_get_pretty(err));
31 exit(1);
32 }
33+
34+ memory_region_init_ram(&s->ddr_ram, NULL, "ddr-ram", machine->ram_size,
35+ &error_abort);
36+ vmstate_register_ram_global(&s->ddr_ram);
37+ memory_region_add_subregion(get_system_memory(), 0, &s->ddr_ram);
38 }
39
40 static QEMUMachine xlnx_zynq_mp_generic_machine = {
41--
422.1.1
43