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

login
register
mail settings
Submitter Igor Mitsyanko
Date March 10, 2013, 2:21 p.m.
Message ID <1362925309-3852-2-git-send-email-i.mitsyanko@gmail.com>
Download mbox | patch
Permalink /patch/226446/
State New
Headers show

Comments

Igor Mitsyanko - March 10, 2013, 2:21 p.m.
During initialization, memory region size is aligned to page size,
but size of chipid_and_omr array is less then TARGET_PAGE_SIZE. This could result
in errors in some cases, specifically, it could cause errors during VM migration.

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

Patch

diff --git a/hw/exynos4210.c b/hw/exynos4210.c
index fa54e42..280d5d4 100644
--- a/hw/exynos4210.c
+++ b/hw/exynos4210.c
@@ -76,7 +76,7 @@ 
 /* EHCI */
 #define EXYNOS4210_EHCI_BASE_ADDR           0x12580000
 
-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(ARMCPU *cpu,