patch-2.3.24 linux/arch/i386/kernel/setup.c

Next file: linux/arch/ppc/boot/misc.c
Previous file: linux/arch/i386/kernel/process.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.23/linux/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
@@ -29,6 +29,8 @@
  *  Cleaned up cache-detection code
  *	Dave Jones <dave@powertweak.com>, October 1999
  *
+ *	Added proper L2 cache detection for Coppermine
+ *	Dragan Stancevic <visitor@valinux.com>, October 1999
  */
 
 /*
@@ -695,14 +697,18 @@
 #endif
 
 #ifdef CONFIG_BLK_DEV_INITRD
-// FIXME needs to do the new bootmem alloc stuff
 	if (LOADER_TYPE) {
-		initrd_start = INITRD_START ? INITRD_START + PAGE_OFFSET : 0;
-		initrd_end = initrd_start+INITRD_SIZE;
-		if (initrd_end > (max_low_pfn << PAGE_SHIFT)) {
+		if (INITRD_START + INITRD_SIZE < (max_low_pfn << PAGE_SHIFT)) {
+			reserve_bootmem(INITRD_START, INITRD_SIZE);
+			initrd_start =
+				INITRD_START ? INITRD_START + PAGE_OFFSET : 0;
+			initrd_end = initrd_start+INITRD_SIZE;
+		}
+		else {
 			printk("initrd extends beyond end of memory "
 			    "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
-			    initrd_end,memory_end);
+			    INITRD_START + INITRD_SIZE,
+			    max_low_pfn << PAGE_SHIFT);
 			initrd_start = 0;
 		}
 	}
@@ -1233,6 +1239,7 @@
 				break;
 
 			case 0x42:
+			case 0x82: /*Detect 256-Kbyte cache on Coppermine*/
 				c->x86_cache_size = 256;
 				break;
 

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