mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Move the retained magic block to the top of physical RAM and implement code that should do the right thing. Probably needs more
testing though. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@771 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Mark Cave-Ayland
parent
1f2d742bad
commit
389529217e
@@ -452,7 +452,7 @@ ucell ofmem_claim_virt( ucell virt, ucell size, ucell align )
|
||||
/* 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();
|
||||
retain_t *retained = ofmem_arch_get_retained();
|
||||
ucell retain_phys;
|
||||
|
||||
OFMEM_TRACE("ofmem_retain phys=" FMT_ucellx " size=" FMT_ucellx
|
||||
@@ -461,8 +461,11 @@ ucell ofmem_retain( ucell phys, ucell size, ucell 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 );
|
||||
/* Add to the retain_phys_range list */
|
||||
retained->retain_phys_range[retained->numentries].next = NULL;
|
||||
retained->retain_phys_range[retained->numentries].start = retain_phys;
|
||||
retained->retain_phys_range[retained->numentries].size = size;
|
||||
retained->numentries++;
|
||||
|
||||
return retain_phys;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user