Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Nov 2002 16:29:43 +0900 (JST)
From:      Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
To:        gallatin@cs.duke.edu
Cc:        petry@NetMasters.Com, julian@elischer.org, sidcarter@symonds.net, current@FreeBSD.ORG
Subject:   Re: Kernel not booting....Immediate crash 
Message-ID:  <20021108.162943.74756425.iwasaki@jp.FreeBSD.org>
In-Reply-To: <20021108.135430.68032362.iwasaki@jp.FreeBSD.org>
References:  <200211071859.gA7IxbEV075350@netwolf.NetMasters.Com> <15818.50698.91676.542116@grasshopper.cs.duke.edu> <20021108.135430.68032362.iwasaki@jp.FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> OK, some questions:
>  - What is the size of your base memory (reported by boot loader)?
>  - Does attached patches solve your problem?
>  - Is this problem specific to IBM Netvista?
> 
> Thanks
> 
> Index: locore.s
> ===================================================================
> RCS file: /home/ncvs/src/sys/i386/i386/locore.s,v

Oops, not this file.

Thanks

Index: machdep.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/machdep.c,v
retrieving revision 1.545
diff -u -r1.545 machdep.c
--- machdep.c	25 Oct 2002 19:10:56 -0000	1.545
+++ machdep.c	8 Nov 2002 04:50:05 -0000
@@ -1513,6 +1513,7 @@
 	struct vm86context vmc;
 	vm_offset_t pa, physmap[PHYSMAP_SIZE];
 	pt_entry_t *pte;
+	pt_entry_t saved_pte[160];
 	char *cp;
 	struct bios_smap *smap;
 
@@ -1520,6 +1521,14 @@
 	bzero(physmap, sizeof(physmap));
 	basemem = 0;
 
+	for (pa = (4 << PAGE_SHIFT); pa < ISA_HOLE_START; pa += PAGE_SIZE)
+		pmap_kenter(KERNBASE + pa, pa);
+	pte = (pt_entry_t *)vm86paddr;
+	for (i = 4; i < 160; i++) {
+		saved_pte[i] = pte[i];
+		pte[i] |= PG_V | PG_RW | PG_U;
+	}
+
 	/*
 	 * map page 1 R/W into the kernel page table so we can use it
 	 * as a buffer.  The kernel will unmap this page later.
@@ -1629,6 +1638,12 @@
 	 * pmap_mapdev, but since no memory needs to be
 	 * allocated we simply change the mapping.
 	 */
+	pte = (pt_entry_t *)vm86paddr;
+	for (i = 4; i < 160; i++)
+		pte[i] = saved_pte[i];
+	for (pa = (4 << PAGE_SHIFT); pa < ISA_HOLE_START; pa += PAGE_SIZE)
+		pmap_kremove(KERNBASE + pa);
+
 	for (pa = trunc_page(basemem * 1024);
 	     pa < ISA_HOLE_START; pa += PAGE_SIZE)
 		pmap_kenter(KERNBASE + pa, pa);

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021108.162943.74756425.iwasaki>