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

Next file: linux/arch/ppc/defconfig
Previous file: linux/arch/i386/kernel/setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.23/linux/arch/ppc/boot/misc.c linux/arch/ppc/boot/misc.c
@@ -1,7 +1,7 @@
 /*
  * misc.c
  *
- * $Id: misc.c,v 1.67 1999/08/10 22:53:57 cort Exp $
+ * $Id: misc.c,v 1.68 1999/10/20 22:08:08 cort Exp $
  * 
  * Adapted for PowerPC by Gary Thomas
  *
@@ -462,6 +462,7 @@
 		puts(" ");
 		puthex((unsigned long)zimage_size+(unsigned long)zimage_start);
 		puts("\n");
+		avail_ram += zimage_size;
 	}
 
 	/* relocate initrd */
@@ -469,15 +470,19 @@
 	{
 		puts("initrd at:     "); puthex(initrd_start);
 		puts(" "); puthex(initrd_end); puts("\n");
-#ifdef OMIT
-		avail_ram = (char *)PAGE_ALIGN(
-			(unsigned long)zimage_size+(unsigned long)zimage_start);
-		memcpy ((void *)avail_ram, (void *)initrd_start, INITRD_SIZE );
-		initrd_start = (unsigned long)avail_ram;
-		initrd_end = initrd_start + INITRD_SIZE;
-		puts("relocated to:  "); puthex(initrd_start);
-		puts(" "); puthex(initrd_end); puts("\n");
-#endif
+		if ( (unsigned long)initrd_start <= 0x00800000 )
+		{
+			memcpy( (void *)avail_ram,
+				(void *)initrd_start, initrd_end-initrd_start );
+			puts("relocated to:  ");
+			initrd_end = (unsigned long) avail_ram + (initrd_end-initrd_start);
+			initrd_start = (unsigned long)avail_ram;
+			puthex((unsigned long)initrd_start);
+			puts(" ");
+			puthex((unsigned long)initrd_end);
+			puts("\n");
+		}
+		avail_ram = (char *)PAGE_ALIGN((unsigned long)initrd_end);
 	}
 
 	avail_ram = (char *)0x00400000;

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