diff options
Diffstat (limited to 'recipes-devtools/qemu/qemu-zynqmp-mainline/0013-arm-xilinx-ep108-Add-external-RAM.patch')
-rw-r--r-- | recipes-devtools/qemu/qemu-zynqmp-mainline/0013-arm-xilinx-ep108-Add-external-RAM.patch | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/recipes-devtools/qemu/qemu-zynqmp-mainline/0013-arm-xilinx-ep108-Add-external-RAM.patch b/recipes-devtools/qemu/qemu-zynqmp-mainline/0013-arm-xilinx-ep108-Add-external-RAM.patch deleted file mode 100644 index 2030048e..00000000 --- a/recipes-devtools/qemu/qemu-zynqmp-mainline/0013-arm-xilinx-ep108-Add-external-RAM.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 7c16af47e2ec33043ca0ef924232c9eef9dc60c4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Crosthwaite <peter.crosthwaite@xilinx.com> | ||
3 | Date: Mon, 23 Mar 2015 04:05:18 -0700 | ||
4 | Subject: [PATCH 13/15] arm: xilinx-ep108: Add external RAM | ||
5 | |||
6 | Zynq MPSoC supports external DDR RAM. Add a RAM at 0 to the model. | ||
7 | |||
8 | Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> | ||
9 | Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> | ||
10 | --- | ||
11 | hw/arm/xlnx-ep108.c | 21 +++++++++++++++++++++ | ||
12 | 1 file changed, 21 insertions(+) | ||
13 | |||
14 | diff --git a/hw/arm/xlnx-ep108.c b/hw/arm/xlnx-ep108.c | ||
15 | index 81704bb..6e89456 100644 | ||
16 | --- a/hw/arm/xlnx-ep108.c | ||
17 | +++ b/hw/arm/xlnx-ep108.c | ||
18 | @@ -18,11 +18,16 @@ | ||
19 | #include "hw/arm/xlnx-zynqmp.h" | ||
20 | #include "hw/boards.h" | ||
21 | #include "qemu/error-report.h" | ||
22 | +#include "exec/address-spaces.h" | ||
23 | |||
24 | typedef struct XlnxEP108 { | ||
25 | XlnxZynqMPState soc; | ||
26 | + MemoryRegion ddr_ram; | ||
27 | } XlnxEP108; | ||
28 | |||
29 | +/* Max 2GB RAM */ | ||
30 | +#define EP108_MAX_RAM_SIZE 0x80000000ull | ||
31 | + | ||
32 | static void xlnx_ep108_init(MachineState *machine) | ||
33 | { | ||
34 | XlnxEP108 *s = g_new0(XlnxEP108, 1); | ||
35 | @@ -37,6 +42,22 @@ static void xlnx_ep108_init(MachineState *machine) | ||
36 | error_report("%s", error_get_pretty(err)); | ||
37 | exit(1); | ||
38 | } | ||
39 | + | ||
40 | + if (machine->ram_size > EP108_MAX_RAM_SIZE) { | ||
41 | + error_report("WARNING: RAM size " RAM_ADDR_FMT " above max supported, " | ||
42 | + "reduced to %llx", machine->ram_size, EP108_MAX_RAM_SIZE); | ||
43 | + machine->ram_size = EP108_MAX_RAM_SIZE; | ||
44 | + } | ||
45 | + | ||
46 | + if (machine->ram_size <= 0x08000000) { | ||
47 | + error_report("WARNING: RAM size " RAM_ADDR_FMT " is small for EP108\n", | ||
48 | + machine->ram_size); | ||
49 | + } | ||
50 | + | ||
51 | + memory_region_init_ram(&s->ddr_ram, NULL, "ddr-ram", machine->ram_size, | ||
52 | + &error_abort); | ||
53 | + vmstate_register_ram_global(&s->ddr_ram); | ||
54 | + memory_region_add_subregion(get_system_memory(), 0, &s->ddr_ram); | ||
55 | } | ||
56 | |||
57 | static QEMUMachine xlnx_ep108_machine = { | ||
58 | -- | ||
59 | 1.7.10.4 | ||
60 | |||