Commit partial implementation of SUNW,retain for SPARC64 based upon the existing physical allocation routines. I've been unable

to finish the code and test retention after a restart since the OpenBIOS words reset and reset-all don't seem to work at the 
moment. However, it enables OpenSolaris boot to get further in the meantime.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@766 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Mark Cave-Ayland
2010-05-02 19:26:29 +00:00
committed by Mark Cave-Ayland
parent 0c2f6e929d
commit ca0f9c5a03
4 changed files with 76 additions and 9 deletions

View File

@@ -449,6 +449,23 @@ ucell ofmem_claim_virt( ucell virt, ucell size, ucell align )
get_ram_size(), ofmem_arch_get_virt_top(), 0 );
}
/* if align != 0, phys is ignored. Returns -1 on error */
ucell ofmem_retain( ucell phys, ucell size, ucell align )
{
ofmem_t *ofmem = ofmem_arch_get_private();
ucell retain_phys;
OFMEM_TRACE("ofmem_retain phys=" FMT_ucellx " size=" FMT_ucellx
" align=" FMT_ucellx "\n",
phys, size, align);
retain_phys = ofmem_claim_phys_( phys, size, align, 0, get_ram_size(), 0 );
/* Also add to the retain_phys_range list */
add_entry( phys, size, &ofmem->retain_phys_range );
return retain_phys;
}
/* allocate both physical and virtual space and add a translation */
ucell ofmem_claim( ucell addr, ucell size, ucell align )