On 17/05/19 16:12, Mark Cave-Ayland wrote: >> Initially I implemented it exactly as you suggest, via mask. But then >> I thought that memory_region_init_alias makes aliasing more obvious. >> I don't have a strong opinion on this one though. >> >> @Paolo, what do you think? > My general feeling is that memory region aliases are more aimed at mapping > areas into > different address spaces. In this particular case it seems to me that the > memory > region for both devices is still 256 bytes, but it's just that internally the > address > decoder ignores bit 7 on the 810.
It's the same for me; whatever makes the code simpler is good. RAM regions need to use aliases in order to simulate ignored bits in the decoder, so it's okay to use that for MMIO as well. On the other hand, it's true that a simple "&" does the job just as well. Paolo