mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Claim memory areas used by ELF loader
Can't enable Sparc32 yet, there is no ofmem_claim(). Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@858 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
#include "libopenbios/sys_info.h"
|
#include "libopenbios/sys_info.h"
|
||||||
#include "libopenbios/ipchecksum.h"
|
#include "libopenbios/ipchecksum.h"
|
||||||
#include "libopenbios/bindings.h"
|
#include "libopenbios/bindings.h"
|
||||||
|
#include "libopenbios/ofmem.h"
|
||||||
#define printf printk
|
#define printf printk
|
||||||
#define debug printk
|
#define debug printk
|
||||||
|
|
||||||
@@ -505,10 +506,11 @@ elf_init_program(void)
|
|||||||
size = MIN(phdr[i].p_filesz, phdr[i].p_memsz);
|
size = MIN(phdr[i].p_filesz, phdr[i].p_memsz);
|
||||||
if (!size)
|
if (!size)
|
||||||
continue;
|
continue;
|
||||||
#if 0
|
#ifndef CONFIG_SPARC32
|
||||||
if( ofmem_claim( phdr[i].p_vaddr, phdr[i].p_memsz, 0 ) == -1 ) {
|
if( ofmem_claim( phdr[i].p_vaddr, phdr[i].p_memsz, 0 ) == -1 ) {
|
||||||
printk("Claim failed!\n");
|
printk("Ignoring failed claim for va %lx memsz %lx!\n",
|
||||||
return;
|
(unsigned long)phdr[i].p_vaddr,
|
||||||
|
(unsigned long)phdr[i].p_memsz);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Workaround for archs where sizeof(int) != pointer size */
|
/* Workaround for archs where sizeof(int) != pointer size */
|
||||||
|
|||||||
Reference in New Issue
Block a user