From owner-freebsd-current Wed May 19 11:46:23 1999 Delivered-To: freebsd-current@freebsd.org Received: from sumatra.americantv.com (sumatra.americantv.com [208.139.222.227]) by hub.freebsd.org (Postfix) with ESMTP id 9F34F14F13 for ; Wed, 19 May 1999 11:46:15 -0700 (PDT) (envelope-from jlemon@americantv.com) Received: from right.PCS (right.PCS [148.105.10.31]) by sumatra.americantv.com (8.8.5/8.8.5) with ESMTP id NAA00353; Wed, 19 May 1999 13:46:09 -0500 (CDT) Received: (from jlemon@localhost) by right.PCS (8.6.13/8.6.4) id NAA25347; Wed, 19 May 1999 13:46:07 -0500 Message-ID: <19990519134607.23968@right.PCS> Date: Wed, 19 May 1999 13:46:07 -0500 From: Jonathan Lemon To: Jerry Alexandratos Cc: "Carlos C. Tapang" , current@FreeBSD.ORG Subject: Re: FBSDBOOT.EXE References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.61.1 In-Reply-To: ; from Jerry Alexandratos on May 05, 1999 at 03:38:05AM -0400 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On May 05, 1999 at 03:38:05AM -0400, Jerry Alexandratos wrote: > Jonathan Lemon says: > : > : Not true. VM86 is also required to support VESA. Also, it is used > : for reliable memory detection (which is why I want to make it mandatory). > : No more "My Stinkpad only detected 64M, what do I do now??!" questions. > > Actually, even with VM86, the kernel still doesn't correctly detect the > StinkPad's memory. Hm, if that's so, then it's an implementation bug. Can you try the following patch, boot the system with the -v flag, and mail me back the result of the dmesg output? -- Jonathan Index: i386/i386/vm86.c =================================================================== RCS file: /tuna/ncvs/src/sys/i386/i386/vm86.c,v retrieving revision 1.25 diff -u -r1.25 vm86.c --- vm86.c 1999/05/12 21:38:45 1.25 +++ vm86.c 1999/05/19 15:47:10 @@ -41,6 +41,7 @@ #include #include +#include #include #include @@ -524,6 +525,13 @@ *pte = (1 << PAGE_SHIFT) | PG_RW | PG_V; /* + * use whatever is leftover of the vm86 page layout as a + * message buffer so we can capture early output. + */ + msgbufinit((vm_offset_t)vm86paddr + sizeof(struct vm86_layout), + ctob(3) - sizeof(struct vm86_layout)); + + /* * get memory map with INT 15:E820 */ #define SMAPSIZ sizeof(*smap) @@ -541,6 +549,13 @@ i = vm86_datacall(0x15, &vmf, &vmc); if (i || vmf.vmf_eax != SMAP_SIG) break; + if (boothowto & RB_VERBOSE) + printf("SMAP type=%02x base=%08x %08x len=%08x %08x\n", + smap->type, + *(u_int32_t *)((char *)&smap->base + 4), + (u_int32_t)smap->base, + *(u_int32_t *)((char *)&smap->length + 4), + (u_int32_t)smap->length); if (smap->type == 0x01 && smap->base >= highwat) { *extmem += (smap->length / 1024); highwat = smap->base + smap->length; Index: kern/subr_prf.c =================================================================== RCS file: /tuna/ncvs/src/sys/kern/subr_prf.c,v retrieving revision 1.51 diff -u -r1.51 subr_prf.c --- subr_prf.c 1998/12/03 04:45:56 1.51 +++ subr_prf.c 1999/03/19 19:10:47 @@ -674,10 +674,24 @@ } } +static void +msgbufcopy(struct msgbuf *oldp) +{ + int pos; + + pos = oldp->msg_bufr; + while (pos != oldp->msg_bufx) { + msglogchar(oldp->msg_ptr[pos], NULL); + if (++pos >= oldp->msg_size) + pos = 0; + } +} + void msgbufinit(void *ptr, size_t size) { char *cp; + static struct msgbuf *oldp = NULL; cp = (char *)ptr; msgbufp = (struct msgbuf *) (cp + size - sizeof(*msgbufp)); @@ -687,7 +701,10 @@ msgbufp->msg_size = (char *)msgbufp - cp; msgbufp->msg_ptr = cp; } + if (msgbufmapped && oldp != msgbufp) + msgbufcopy(oldp); msgbufmapped = 1; + oldp = msgbufp; } #include "opt_ddb.h" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message