Subject: Re: kern/10271: thinkpad 760EL hangs with current generic-derived kernel
To: None <netbsd-bugs@netbsd.org, gnats-bugs@netbsd.org>
From: Chris G. Demetriou <cgd@sibyte.com>
List: netbsd-bugs
Date: 06/04/2000 12:30:33
the patch posted to port-i386 by itojun (included below) seems to make
the problem better -- at least now it gets passed the BIOS32 msg.  (it
now crashes with a trap right after the isapnp attach msg... and, of
course, still doesn't use the cardbus slots as cardbus slots.)



Index: machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/i386/machdep.c,v
retrieving revision 1.387
diff -u -r1.387 machdep.c
--- machdep.c	2000/06/02 18:33:17	1.387
+++ machdep.c	2000/06/03 15:38:11
@@ -1578,8 +1578,13 @@
 	 * to us by the boot program.
 	 */
 	bim = lookup_bootinfo(BTINFO_MEMMAP);
-	if (bim != NULL) {
 #if 0
+	if (bim != NULL)
+#else
+	if (0)
+#endif
+	{
+#if 0
 		printf("BIOS MEMORY MAP (%d ENTRIES):\n", bim->num);
 #endif
 		for (x = 0; x < bim->num; x++) {
@@ -1715,11 +1720,19 @@
 #endif
 		mem_clusters[1].start = IOM_END;
 		mem_clusters[1].size = trunc_page(KBTOB(biosextmem));
+#if 1
+		/* steal a page for IDT */
+		mem_clusters[1].size -= NBPG;
+#endif
+
 		physmem += atop(mem_clusters[1].size);
 
 		mem_cluster_cnt = 2;
 
-		avail_end = IOM_END + trunc_page(KBTOB(biosextmem));
+		avail_end = mem_clusters[1].start + mem_clusters[1].size;
+#if 1
+		idt_paddr = avail_end;
+#endif
 	}
 
 	/*
Index: pmap.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/i386/pmap.c,v
retrieving revision 1.92
diff -u -r1.92 pmap.c
--- pmap.c	2000/06/02 18:33:16	1.92
+++ pmap.c	2000/06/03 15:38:17
@@ -821,8 +821,10 @@
 
 	idt_vaddr = virtual_avail;			/* don't need pte */
 	virtual_avail += NBPG; pte++;
+#if 0
 	idt_paddr = avail_start;			/* steal a page */
 	avail_start += NBPG;
+#endif
 
 #if defined(I586_CPU)
 	/* pentium f00f bug stuff */