patch-2.3.6 linux/arch/i386/mm/init.c

Next file: linux/arch/i386/mm/ioremap.c
Previous file: linux/arch/i386/kernel/signal.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.5/linux/arch/i386/mm/init.c linux/arch/i386/mm/init.c
@@ -390,6 +390,7 @@
 	int datapages = 0;
 	int initpages = 0;
 	unsigned long tmp;
+	unsigned long endbase;
 
 	end_mem &= PAGE_MASK;
 	high_memory = (void *) end_mem;
@@ -417,8 +418,10 @@
 	 * IBM messed up *AGAIN* in their thinkpad: 0xA0000 -> 0x9F000.
 	 * They seem to have done something stupid with the floppy
 	 * controller as well..
+	 * The amount of available base memory is in WORD 40:13.
 	 */
-	while (start_low_mem < 0x9f000+PAGE_OFFSET) {
+	endbase = PAGE_OFFSET + ((*(unsigned short *)__va(0x413) * 1024) & PAGE_MASK);
+	while (start_low_mem < endbase) {
 		clear_bit(PG_reserved, &mem_map[MAP_NR(start_low_mem)].flags);
 		start_low_mem += PAGE_SIZE;
 	}

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