On 30/12/10 22:43, Andreas Färber wrote:
Possibly, although I took a glance at the hash table code and couldn't immediately get my head around how to come up with the reverse mapping.
There's a list of translations in ofmem_t that we'd have to iterate through, no? :)
IIRC the translations list doesn't contain the mappings for the ROM itself as the pages are mapped directly during startup. But since va2pa() and pa2va() are only used by ofmem_posix_memalign() (i.e. internal ofmem_malloc() allocations only), they are guaranteed to lie within the address space for the ROM image which makes things easier.
ATB,
Mark.