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

Next file: linux/drivers/block/Makefile
Previous file: linux/arch/i386/kernel/entry.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.20/linux/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
@@ -103,14 +103,24 @@
 	init_task.mm->brk = TASK_SIZE + (unsigned long) &_end;
 
 	for (;;) {
+		/*
+		 * "mem=nopentium" disables the 4MB page tables.
+		 * "mem=XXX[kKmM]" overrides the BIOS-reported
+		 * memory size
+		 */
 		if (c == ' ' && *(const unsigned long *)from == *(const unsigned long *)"mem=") {
-			memory_end = simple_strtoul(from+4, &from, 0);
-			if ( *from == 'K' || *from == 'k' ) {
-				memory_end = memory_end << 10;
-				from++;
-			} else if ( *from == 'M' || *from == 'm' ) {
-				memory_end = memory_end << 20;
-				from++;
+			if (!memcmp(from+4, "nopentium", 9)) {
+				from += 9+4;
+				x86_capability &= ~8;
+			} else {
+				memory_end = simple_strtoul(from+4, &from, 0);
+				if ( *from == 'K' || *from == 'k' ) {
+					memory_end = memory_end << 10;
+					from++;
+				} else if ( *from == 'M' || *from == 'm' ) {
+					memory_end = memory_end << 20;
+					from++;
+				}
 			}
 		}
 		c = *(from++);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this