Here are the OFMEM changes required in order to migrate SPARC32 over to OFMEM.
v3: Rename ofmem_malloc_align() to ofmem_posix_memalign() and match with posix_memalign() API.
v2: Revised based upon mailing list comments.
v1: Initial implementation.
Mark Cave-Ayland (6): Fix alignment of memory allocated by OFMEM's ofmem_malloc(). Introduce ofmem_posix_memalign() function for arbitrary alignment. Introduce va2pa() and pa2va() functions for PPC for subsequent use by OFMEM. Alter ofmem_posix_memalign() so that the resulting pointer is aligned for both physical and virtual addresses. Introduce ofmem_arch_get_phys_top() for specifying the top of physical memory in OFMEM. Change OFMEM to allocate memory from the top of RAM downwards.
openbios-devel/arch/ppc/qemu/ofmem.c | 28 ++++++++++++ openbios-devel/arch/sparc64/ofmem_sparc64.c | 7 +++ openbios-devel/include/libopenbios/ofmem.h | 2 + openbios-devel/libopenbios/ofmem_common.c | 64 +++++++++++++++++++-------- 4 files changed, 83 insertions(+), 18 deletions(-)