Skip to contentSkip to conversation

PPC: e500: correct params->ram_size with ram_size

PATCH Applied Tiejun Chen 2 participants 2 messages May 2, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 PPC: e500: correct params->ram_size with ram_size

We should sync params->ram_size after we fixup memory size on a alignment boundary. Otherwise Guest would exceed the actual memory region.

---
v2:

eliminate that original comment in v1.

 hw/ppc/e500.c |    1 +
 1 file changed, 1 insertion(+)
hw/ppc/e500.c +1 -0
index c1bdb6b..3978f84 100644
@@ -523,6 +523,7 @@ void ppce500_init(PPCE500Params *params)
 
     /* Fixup Memory size on a alignment boundary */
     ram_size &= ~(RAM_SIZES_ALIGN - 1);
+    params->ram_size = ram_size;
 
     /* Register Memory */
     memory_region_init_ram(ram, "mpc8544ds.ram", ram_size);
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 5 lines · Tiejun Chen

We should sync params->ram_size after we fixup memory size on a alignment boundary. Otherwise Guest would exceed the actual memory region.

Thanks, applied to ppc-next.

Alex

Quoted 23 lines

---
v2:

eliminate that original comment in v1.

hw/ppc/e500.c | 1 +

1 file changed, 1 insertion(+)
hw/ppc/e500.c +1 -0
index c1bdb6b..3978f84 100644
@@ -523,6 +523,7 @@ void ppce500_init(PPCE500Params *params)
 
    /* Fixup Memory size on a alignment boundary */
    ram_size &= ~(RAM_SIZES_ALIGN - 1);
+    params->ram_size = ram_size;
 
    /* Register Memory */
    memory_region_init_ram(ram, "mpc8544ds.ram", ram_size);
Signature · 1 line
1.7.9.5