X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=second%2Fyaboot.c;h=b02070e5c60ca80b539cdb1170d690b4eb210072;hb=6f27cd4ad3feeba79cac882ef3f7177224a5935b;hp=5c8c8ea2310344d081b97473d2c19d64b65c48bd;hpb=1bdc16516d7e67a30fa48a594f91aafff0c5eb46;p=yaboot.git diff --git a/second/yaboot.c b/second/yaboot.c index 5c8c8ea..b02070e 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -167,30 +167,18 @@ extern unsigned char linux_logo_blue[]; #define DEFAULT_TIMEOUT -1 -/* Entry, currently called directly by crt0 (bss not inited) */ - -extern char* __bss_start; -extern char* _end; - int yaboot_start (unsigned long r3, unsigned long r4, unsigned long r5) { int result; void* malloc_base = NULL; - unsigned long addr; prom_handle root; - /* OF seems to do it, but I'm not very confident */ - memset(&__bss_start, 0, &_end - &__bss_start); - /* Initialize OF interface */ prom_init ((prom_entry) r5); /* Allocate some memory for malloc'ator */ - for (addr = MALLOCADDR; addr <= MALLOCADDR * 16 ;addr+=0x100000) { - malloc_base = prom_claim((void *)addr, MALLOCSIZE, 0); - if (malloc_base != (void *)-1) break; - } + malloc_base = prom_claim_chunk((void *)MALLOCADDR, MALLOCSIZE, 0); if (malloc_base == (void *)-1) { prom_printf("Can't claim malloc buffer (%d bytes at 0x%08x)\n", MALLOCSIZE, MALLOCADDR);