Message ID | CAFe8ug9EvDZkTLrCpQDYsi2rTHXEPRGKyCWc+jpHq3o4r2njVQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
Am 08.01.2012 06:14, schrieb Jordan Justen: > Avi, > When using pflash_cfi01, I hit the assert(new_block) added above. It > seemed to be caused by the low bits of addr being 0x7. This seems to > be come from cpu_register_io_memory in memory_region_init_rom_device. > > Would this patch be an appropriate fix for this? > > diff --git a/exec.c b/exec.c > index b1d6602..b3ebc91 100644 > --- a/exec.c > +++ b/exec.c > @@ -2777,7 +2777,7 @@ void qemu_ram_set_idstr(ram_addr_t addr, const char *name, > > new_block = NULL; > QLIST_FOREACH(block,&ram_list.blocks, next) { > - if (block->offset == addr) { > + if (block->offset == (addr& TARGET_PAGE_MASK)) { > new_block = block; > break; > } > > -Jordan Hi, latest QEMU has a different patch for memory.c which fixes the same problem. Regards, Stefan
diff --git a/exec.c b/exec.c index b1d6602..b3ebc91 100644 --- a/exec.c +++ b/exec.c @@ -2777,7 +2777,7 @@ void qemu_ram_set_idstr(ram_addr_t addr, const char *name, new_block = NULL; QLIST_FOREACH(block, &ram_list.blocks, next) { - if (block->offset == addr) { + if (block->offset == (addr & TARGET_PAGE_MASK)) { new_block = block; break; }