[OpenBIOS] [PATCH 3/5] Alter ofmem_malloc_align() so that the resulting pointer is aligned for both physical and virtual addresses.

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Wed Dec 22 11:38:39 CET 2010


Andreas Färber wrote:

> --verbose please! What is this supposed to do? Seems like a duplicate of 
> ofmem.c:ea_to_phys() but different?
> 
> Andreas

It's used to convert between physical/virtual addresses. For alignment 
purposes, we need to ensure that memory allocated to a specific 
alignment is aligned both physically and virtually and since I couldn't 
see these functions in the PPC io.h file I just added them.

 From what you're saying it sounds like the proper fix would be to 
rename the PPC functions ea_to_phys() (and also it's reverse mapping 
function) to match the SPARC definitions so they can be called from 
OFMEM. Does that sound reasonable?


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