Permalink
Browse files

rl78: Add MemoryRegion for GPRs

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
  • Loading branch information...
afaerber committed Nov 25, 2011
1 parent 02622f7 commit cefea918fabf01c8ffaa581e573bd2cef8cff756
Showing with 3 additions and 0 deletions.
  1. +3 −0 hw/rl78/g13_pb.c
View
@@ -39,6 +39,7 @@ static void rl78g13_pb_init(QEMUMachineInitArgs *args)
RL78CPU *cpu;
MemoryRegion *ram = g_new(MemoryRegion, 1);
MemoryRegion *code_flash = g_new(MemoryRegion, 1);
+ MemoryRegion *gpr = g_new(MemoryRegion, 1);
MemoryRegion *sfr = g_new(MemoryRegion, 1);
ram_addr_t code_flash_size = 64 * 1024;
const char *cpu_model = args->cpu_model;
@@ -61,6 +62,8 @@ static void rl78g13_pb_init(QEMUMachineInitArgs *args)
ram_size = 4 * 1024;
memory_region_init_ram(ram, NULL, "rl78g13_pb.ram", ram_size);
memory_region_add_subregion(get_system_memory(), RAM_END - (ram_size - 1), ram);
+ memory_region_init_ram(gpr, NULL, "rl78g13_pb.gpr", 32);
+ memory_region_add_subregion(ram, ram_size - 32, gpr);
/* allocate flash */
memory_region_init_ram(code_flash, NULL, "rl78g13_pb.code_flash", code_flash_size);

0 comments on commit cefea91

Please sign in to comment.