[OpenBIOS] [PATCH 3/6] Introduce va2pa() and pa2va() functions for PPC for subsequent use by OFMEM.
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Fri Dec 31 00:31:02 CET 2010
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.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
Sirius Labs: http://www.siriusit.co.uk/labs
More information about the OpenBIOS
mailing list