diff options
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch b/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch new file mode 100644 index 0000000000..1a6cf5119b --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/Qemu-Arm-versatilepb-Add-memory-size-checking.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 896fa02c24347e6e9259812cfda187b1d6ca6199 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jiang Lu <lu.jiang@windriver.com> | ||
3 | Date: Wed, 13 Nov 2013 10:38:08 +0800 | ||
4 | Subject: [PATCH] Qemu:Arm:versatilepb: Add memory size checking | ||
5 | |||
6 | The machine can not work with memory over 256M, so add a checking | ||
7 | at startup. If the memory size exceed 256M, just stop emulation then | ||
8 | throw out warning about memory limitation. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Jiang Lu <lu.jiang@windriver.com> | ||
13 | |||
14 | Updated it on 2014-01-15 for rebasing | ||
15 | |||
16 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
17 | |||
18 | Update it when upgrade qemu to 2.2.0 | ||
19 | |||
20 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
21 | Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> | ||
22 | --- | ||
23 | hw/arm/versatilepb.c | 7 +++++++ | ||
24 | 1 file changed, 7 insertions(+) | ||
25 | |||
26 | diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c | ||
27 | index 6c69f4e..9278d90 100644 | ||
28 | --- a/hw/arm/versatilepb.c | ||
29 | +++ b/hw/arm/versatilepb.c | ||
30 | @@ -204,6 +204,13 @@ static void versatile_init(MachineState *machine, int board_id) | ||
31 | exit(1); | ||
32 | } | ||
33 | |||
34 | + if (machine->ram_size > (256 << 20)) { | ||
35 | + fprintf(stderr, | ||
36 | + "qemu: Too much memory for this machine: %d MB, maximum 256 MB\n", | ||
37 | + ((unsigned int)ram_size / (1 << 20))); | ||
38 | + exit(1); | ||
39 | + } | ||
40 | + | ||
41 | cpuobj = object_new(object_class_get_name(cpu_oc)); | ||
42 | |||
43 | /* By default ARM1176 CPUs have EL3 enabled. This board does not | ||
44 | -- | ||
45 | 2.1.0 | ||
46 | |||