aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hw/ppc_newworld.c4
-rw-r--r--hw/ppc_oldworld.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index 4e5043cd6..1c512a241 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -179,6 +179,10 @@ static void ppc_core99_init (ram_addr_t ram_size,
vga_bios_ptr[3] = 'V';
cpu_to_be32w((uint32_t *)(vga_bios_ptr + 4), vga_bios_size);
vga_bios_size += 8;
+
+ /* Round to page boundary */
+ vga_bios_size = (vga_bios_size + TARGET_PAGE_SIZE - 1) &
+ TARGET_PAGE_MASK;
}
if (linux_boot) {
diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c
index b26e407c8..56b287668 100644
--- a/hw/ppc_oldworld.c
+++ b/hw/ppc_oldworld.c
@@ -212,6 +212,10 @@ static void ppc_heathrow_init (ram_addr_t ram_size,
vga_bios_ptr[3] = 'V';
cpu_to_be32w((uint32_t *)(vga_bios_ptr + 4), vga_bios_size);
vga_bios_size += 8;
+
+ /* Round to page boundary */
+ vga_bios_size = (vga_bios_size + TARGET_PAGE_SIZE - 1) &
+ TARGET_PAGE_MASK;
}
if (linux_boot) {