Patchwork mips_fulong2e: fix ram allocation

login
register
mail settings
Submitter Blue Swirl
Date Oct. 14, 2010, 6 p.m.
Message ID <AANLkTin7S9PG7pBZ4KqO3FB=Dy-cjOiFbe+yYn6Wpgh_@mail.gmail.com>
Download mbox | patch
Permalink /patch/67851/
State New
Headers show

Comments

Blue Swirl - Oct. 14, 2010, 6 p.m.
RAM registration used incorrect offset.

Fix by using the offset obtained previously for this purpose.

Spotted by GCC 4.6.0 20100925 warning, which is also avoided.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 hw/mips_fulong2e.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c
index f9723f5..07eb9ee 100644
--- a/hw/mips_fulong2e.c
+++ b/hw/mips_fulong2e.c
@@ -295,7 +295,7 @@  static void mips_fulong2e_init(ram_addr_t
ram_size, const char *boot_device,
     ram_offset = qemu_ram_alloc(NULL, "fulong2e.ram", ram_size);
     bios_offset = qemu_ram_alloc(NULL, "fulong2e.bios", bios_size);

-    cpu_register_physical_memory(0, ram_size, IO_MEM_RAM);
+    cpu_register_physical_memory(0, ram_size, ram_offset);
     cpu_register_physical_memory(0x1fc00000LL,
 					   bios_size, bios_offset | IO_MEM_ROM);