From: Tony Breeds Date: Thu, 22 Oct 2009 05:17:10 +0000 (+1100) Subject: Merge branch 'birecs' into devel X-Git-Tag: yaboot-1.3.17-rc1~26^2~2 X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=commitdiff_plain;h=9a83909ef3d17b0ea205d32b6aa07ac6bea7260c;hp=-c Merge branch 'birecs' into devel --- 9a83909ef3d17b0ea205d32b6aa07ac6bea7260c diff --combined second/yaboot.c index 66f288b,e91b6c7..5df0760 --- a/second/yaboot.c +++ b/second/yaboot.c @@@ -300,7 -300,6 +300,7 @@@ void print_message_file(char *filename } strncpy(msgpath, filename, sizeof(msgpath)); + msgfile = boot; /* Copy all the original paramters */ if (!parse_device_path(msgpath, defdev, defpart, "/etc/yaboot.msg", &msgfile)) { prom_printf("%s: Unable to parse\n", msgpath); goto done; @@@ -471,8 -470,6 +471,8 @@@ static int load_my_config_file(struct b int minlen; packet = prom_get_netinfo(); + if (!packet) + goto out; /* * First, try to match on mac address with the hardware type @@@ -991,7 -988,6 +991,7 @@@ int get_params(struct boot_param_t* par if (!label && password) check_password ("To boot a custom image you must enter the password."); + params->kernel = boot; /* Copy all the original paramters */ if (!parse_device_path(imagepath, defdevice, defpart, "/vmlinux", ¶ms->kernel)) { prom_printf("%s: Unable to parse\n", imagepath); @@@ -1013,7 -1009,6 +1013,7 @@@ strncpy(initrdpath, p, 1024); DEBUG_F("Parsing initrd path <%s>\n", initrdpath); + params->rd = boot; /* Copy all the original paramters */ if (!parse_device_path(initrdpath, defdevice, defpart, "/root.bin", ¶ms->rd)) { prom_printf("%s: Unable to parse\n", imagepath); @@@ -1024,7 -1019,6 +1024,7 @@@ if (p && *p) { DEBUG_F("Parsing sysmap path <%s>\n", p); strncpy(sysmappath, p, 1024); + params->sysmap = boot; /* Copy all the original paramters */ if (!parse_device_path(sysmappath, defdevice, defpart, "/boot/System.map", ¶ms->sysmap)) { prom_printf("%s: Unable to parse\n", imagepath); @@@ -1053,7 -1047,6 +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 -1238,6 +1244,6 @@@ 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 -1475,7 +1481,7 @@@ load_elf64(struct boot_file_t *file, lo 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);