Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rl78: Add MemoryRegion for GPRs

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
  • Loading branch information...
commit bb08db87dd47c0493ec78a08d739b8769f72ca37 1 parent d1cbe4b
@afaerber authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  hw/rl78/g13_pb.c
View
3  hw/rl78/g13_pb.c
@@ -38,6 +38,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;
@@ -59,6 +60,8 @@ static void rl78g13_pb_init(QEMUMachineInitArgs *args)
ram_size = 4 * 1024;
memory_region_init_ram(ram, "rl78g13_pb.ram", ram_size);
memory_region_add_subregion(get_system_memory(), RAM_END - (ram_size - 1), ram);
+ memory_region_init_ram(gpr, "rl78g13_pb.gpr", 32);
+ memory_region_add_subregion(ram, ram_size - 32, gpr);
/* allocate flash */
memory_region_init_ram(code_flash, "rl78g13_pb.code_flash", code_flash_size);
Please sign in to comment.
Something went wrong with that request. Please try again.