]> git.ozlabs.org Git - yaboot.git/blobdiff - second/yaboot.c
Add optional ino_size filesystem backend function
[yaboot.git] / second / yaboot.c
index edb11c19dd02e981000a899467aedf000d3a56d3..b02070e5c60ca80b539cdb1170d690b4eb210072 100644 (file)
@@ -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);
@@ -985,7 +973,7 @@ int get_params(struct boot_param_t* params)
 
            /* check if user seted to use a initrd file from boot console */
            if (!definitrd && p != manualinitrd) {
-               if (manualinitrd[0] != "/" && (prom_get_devtype(defdevice_bak) != FILE_DEVICE_NET)) {
+               if (manualinitrd[0] != '/' && (prom_get_devtype(defdevice_bak) != FILE_DEVICE_NET)) {
                    strcpy(initrdpath, "/");
                    strcat(initrdpath, manualinitrd);
                } else