Author: blueswirl Date: Tue Aug 24 21:45:57 2010 New Revision: 858 URL: http://tracker.coreboot.org/trac/openbios/changeset/858
Log: 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
Modified: trunk/openbios-devel/libopenbios/elf_load.c
Modified: trunk/openbios-devel/libopenbios/elf_load.c ============================================================================== --- trunk/openbios-devel/libopenbios/elf_load.c Sun Aug 22 23:29:25 2010 (r857) +++ trunk/openbios-devel/libopenbios/elf_load.c Tue Aug 24 21:45:57 2010 (r858) @@ -11,6 +11,7 @@ #include "libopenbios/sys_info.h" #include "libopenbios/ipchecksum.h" #include "libopenbios/bindings.h" +#include "libopenbios/ofmem.h" #define printf printk #define debug printk
@@ -505,10 +506,11 @@ size = MIN(phdr[i].p_filesz, phdr[i].p_memsz); if (!size) continue; -#if 0 +#ifndef CONFIG_SPARC32 if( ofmem_claim( phdr[i].p_vaddr, phdr[i].p_memsz, 0 ) == -1 ) { - printk("Claim failed!\n"); - return; + printk("Ignoring failed claim for va %lx memsz %lx!\n", + (unsigned long)phdr[i].p_vaddr, + (unsigned long)phdr[i].p_memsz); } #endif /* Workaround for archs where sizeof(int) != pointer size */