Introduce a set of CONFIG_LOADER_* configuration options to allow each architecture to specify the loaders that are to be used.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@717 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Mark Cave-Ayland
2010-03-28 20:18:30 +00:00
committed by Mark Cave-Ayland
parent 63db85036b
commit f78fec5713
16 changed files with 169 additions and 23 deletions

View File

@@ -49,6 +49,7 @@ elf_loader_init_program( void *dummy )
Elf_phdr *phdr;
size_t size;
char *addr;
cell tmp;
feval("0 state-valid !");
@@ -67,11 +68,16 @@ elf_loader_init_program( void *dummy )
size = MIN(phdr[i].p_filesz, phdr[i].p_memsz);
if (!size)
continue;
#if 0
if( ofmem_claim( phdr[i].p_vaddr, phdr[i].p_memsz, 0 ) == -1 ) {
printk("Claim failed!\n");
return;
}
addr = (char*)phdr[i].p_vaddr;
#endif
/* Workaround for archs where sizeof(int) != pointer size */
tmp = phdr[i].p_vaddr;
addr = (char *)tmp;
memcpy(addr, base + phdr[i].p_offset, size);
#ifdef CONFIG_PPC
flush_icache_range( addr, addr + size );