Patchwork [3/3] hw/exynos4210.c: set chipid_and_omr array size to TARGET_PAGE_SIZE

mail settings
Submitter Mitsyanko Igor
Date April 25, 2012, 1:13 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/155042/
State New
Headers show


Mitsyanko Igor - April 25, 2012, 1:13 p.m.
chipid_mem is initialized with memory_region_init_ram_ptr() function with chipid_and_omr
array as buffer argument. During initialization memory region size is aligned to page size,
but size of static array chipid_and_omr is less then TARGET_PAGE_SIZE. This could result
in errors in some cases, specifically, it could cause segfault during VM saving.
Setting chipid_and_omr aray size to TARGET_PAGE_SIZE helps us to avoid any problems.

Signed-off-by: Igor Mitsyanko <>
 hw/exynos4210.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/hw/exynos4210.c b/hw/exynos4210.c
index 94d2e41..3568ada 100644
--- a/hw/exynos4210.c
+++ b/hw/exynos4210.c
@@ -62,7 +62,7 @@ 
 /* Display controllers (FIMD) */
 #define EXYNOS4210_FIMD0_BASE_ADDR          0x11C00000
-static uint8_t chipid_and_omr[] = { 0x11, 0x02, 0x21, 0x43,
+static uint8_t chipid_and_omr[TARGET_PAGE_SIZE] = { 0x11, 0x02, 0x21, 0x43,
                                     0x09, 0x00, 0x00, 0x00 };
 void exynos4210_write_secondary(CPUARMState *env,