Merge branch 'birecs' into devel
authorTony Breeds <tony@bakeyournoodle.com>
Thu, 22 Oct 2009 05:17:10 +0000 (16:17 +1100)
committerTony Breeds <tony@bakeyournoodle.com>
Thu, 22 Oct 2009 05:17:10 +0000 (16:17 +1100)
include/bootinfo.h
second/yaboot.c

index 7602e489ded1c64fcbf114b1f552051616f54503..3a02c908750e421daeacebcd99a73fc7bf03f22f 100644 (file)
 #define _MACH_walnut   0x00001000      /* IBM "Walnut" 405GP eval. board */
 #define _MACH_bplan    0x00002000      /* Pegasos/Efika, broken partition #s */
 
-struct bi_record {
-     unsigned long tag;                        /* tag ID */
-     unsigned long size;                       /* size of record (in bytes) */
-     unsigned long data[0];            /* data */
-};
-
-#define BI_FIRST               0x1010  /* first record - marker */
-#define BI_LAST                        0x1011  /* last record - marker */
-#define BI_CMD_LINE            0x1012
-#define BI_BOOTLOADER_ID       0x1013
-#define BI_INITRD              0x1014
-#define BI_SYSMAP              0x1015
-#define BI_MACHTYPE            0x1016
-
 #endif /* _PPC_BOOTINFO_H */
 
 extern int _machine;
index 66f288b82aea9eaff21c59ed1fd3bf52c26224b5..5df07608dacb297eda7352fa03c55013ec3d2f64 100644 (file)
@@ -1053,7 +1053,6 @@ yaboot_text_ui(void)
      void                *sysmap_base;
      unsigned long     sysmap_size;
      kernel_entry_t      kernel_entry;
-     struct bi_record* birec;
      char*               loc=NULL;
      loadinfo_t          loadinfo;
      void                *initrd_more,*initrd_want;
@@ -1245,50 +1244,6 @@ yaboot_text_ui(void)
          flush_icache_range ((long)loadinfo.base, (long)loadinfo.base+loadinfo.memsize);
          DEBUG_F(" done\n");
 
-         if (flat_vmlinux) {
-              /*
-               * Fill new boot infos (only if booting a vmlinux).
-               *
-               * The birec is low on memory, probably inside the malloc pool,
-               * so we don't write it earlier. At this point, we should not
-               * use anything coming from the malloc pool.
-               */
-              birec = (struct bi_record *)_ALIGN(loadinfo.filesize+(1<<20)-1,(1<<20));
-
-              /* We make sure it's mapped. We map only 64k for now, it's
-               * plenty enough we don't claim since this precise memory
-               * range may already be claimed by the malloc pool.
-               */
-              prom_map (birec, birec, 0x10000);
-              DEBUG_F("birec at %p\n", birec);
-              DEBUG_SLEEP;
-
-              birec->tag = BI_FIRST;
-              birec->size = sizeof(struct bi_record);
-              birec = (struct bi_record *)((ulong)birec + birec->size);
-
-              birec->tag = BI_BOOTLOADER_ID;
-              sprintf( (char *)birec->data, "yaboot");
-              birec->size = sizeof(struct bi_record) + strlen("yaboot") + 1;
-              birec = (struct bi_record *)((ulong)birec + birec->size);
-
-              birec->tag = BI_MACHTYPE;
-              birec->data[0] = _machine;
-              birec->size = sizeof(struct bi_record) + sizeof(ulong);
-              birec = (struct bi_record *)((ulong)birec + birec->size);
-
-              if (sysmap_base) {
-                   birec->tag = BI_SYSMAP;
-                   birec->data[0] = (ulong)sysmap_base;
-                   birec->data[1] = sysmap_size;
-                   birec->size = sizeof(struct bi_record) + sizeof(ulong)*2;
-                   birec = (struct bi_record *)((ulong)birec + birec->size);
-              }
-              birec->tag = BI_LAST;
-              birec->size = sizeof(struct bi_record);
-              birec = (struct bi_record *)((ulong)birec + birec->size);
-          }
-
           /* compute the kernel's entry point. */
          kernel_entry = loadinfo.base + loadinfo.entry - loadinfo.load_loc;
 
@@ -1526,8 +1481,7 @@ load_elf64(struct boot_file_t *file, loadinfo_t *loadinfo)
          goto bail;
      }
 
-     /* leave some room (1Mb) for boot infos */
-     loadinfo->memsize = _ALIGN(loadinfo->memsize,(1<<20)) + 0x100000;
+     loadinfo->memsize = _ALIGN(loadinfo->memsize,(1<<20));
      /* Claim OF memory */
      DEBUG_F("Before prom_claim, mem_sz: 0x%08lx\n", loadinfo->memsize);