patch-2.3.30 linux/arch/ppc/boot/misc.c

Next file: linux/arch/ppc/chrp_defconfig
Previous file: linux/arch/ppc/boot/head.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.29/linux/arch/ppc/boot/misc.c linux/arch/ppc/boot/misc.c
@@ -16,6 +16,7 @@
 #include <linux/config.h>
 #include <asm/page.h>
 #include <asm/processor.h>
+#include <asm/bootinfo.h>
 #include <asm/mmu.h>
 #if defined(CONFIG_SERIAL_CONSOLE)
 #include "ns16550.h"
@@ -518,17 +519,39 @@
 	*cp = 0;
 	puts("\n");
 
-	/* mappings on early boot can only handle 16M */
-	if ( (int)(cmd_line[0]) > (16<<20))
-		puts("cmd_line located > 16M\n");
-	if ( (int)hold_residual > (16<<20))
-		puts("hold_residual located > 16M\n");
-	if ( initrd_start > (16<<20))
-		puts("initrd_start located > 16M\n");
-       
 	puts("Uncompressing Linux...");
 	gunzip(0, 0x400000, zimage_start, &zimage_size);
 	puts("done.\n");
+	
+	{
+		struct bi_record *rec;
+	    
+		rec = (struct bi_record *)PAGE_ALIGN(zimage_size);
+	    
+		rec->tag = BI_FIRST;
+		rec->size = sizeof(struct bi_record);
+		rec = (struct bi_record *)((unsigned long)rec + rec->size);
+
+		rec->tag = BI_BOOTLOADER_ID;
+		memcpy( (void *)rec->data, "prepboot", 9);
+		rec->size = sizeof(struct bi_record) + 8 + 1;
+		rec = (struct bi_record *)((unsigned long)rec + rec->size);
+	    
+		rec->tag = BI_MACHTYPE;
+		rec->data[0] = _MACH_prep;
+		rec->data[1] = 1;
+		rec->size = sizeof(struct bi_record) + sizeof(unsigned long);
+		rec = (struct bi_record *)((unsigned long)rec + rec->size);
+	    
+		rec->tag = BI_CMD_LINE;
+		memcpy( (char *)rec->data, cmd_line, strlen(cmd_line)+1);
+		rec->size = sizeof(struct bi_record) + strlen(cmd_line) + 1;
+		rec = (struct bi_record *)((ulong)rec + rec->size);
+		
+		rec->tag = BI_LAST;
+		rec->size = sizeof(struct bi_record);
+		rec = (struct bi_record *)((unsigned long)rec + rec->size);
+	}
 	puts("Now booting the kernel\n");
 	return (unsigned long)hold_residual;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)