On 11/29/2011 02:47 PM, Andreas Färber wrote: > > > > addr += mmio->region_offset[idx]; > > idx = mmio->sub_io_index[idx]; > > + if (unlikely(idx == IO_MEM_RAM)) { > > + ram_addr_t raddr = /*mmio->base |*/ addr; > > + void *ptr = qemu_get_ram_ptr(raddr); > > ...and/or this seems to lead to "Bad RAM pointer" (or so) when there's > ELF code loaded into the subpage at that address despite being IO_MEM_RAM? > (Seen, e.g., if for RL78 I increase the page size from 12 to 16.) >
addr is relative to the start of the page, instead of the start of the region. You can use mmio->region_offset[idx] to compensate. -- error compiling committee.c: too many arguments to function