On 8 March 2012 11:11, Avi Kivity <a...@redhat.com> wrote: > On 03/08/2012 12:09 PM, Peter Maydell wrote: >> Is that exec.c comment now out of date? > > For subpage, I think so. It's still broken for page aligned regions > that have low bits set in their offset: > > memory_region_init_io(foo, ..., 4097) > memory_region_add_subregion(sysmem, 4095, foo); > > the 4095-4096 region will work, but the 4096-8191 region will not. I'll > address it later when I'll regress the memory core in other ways.
Right, so as long as your region is less than a page in size it's OK. That should be enough for me to do a cleanup I've been wanting to do for ages: the v7M NVIC should really be modelled as a region from 0xE000E100 .. 0xE000ECFF overlaying the general "system registers" region from 0xE000E000 .. 0xE000EFFF, but at the moment there's a nasty hack in the interrupt controller read/write routines that says "if offset in this range then call a different function in another device"... -- PMM