Date: Wed, 19 May 1999 13:46:07 -0500 From: Jonathan Lemon <jlemon@americantv.com> To: Jerry Alexandratos <jerry.alexandratos@perspectives.net> Cc: "Carlos C. Tapang" <ctapang@easystreet.com>, current@FreeBSD.ORG Subject: Re: FBSDBOOT.EXE Message-ID: <19990519134607.23968@right.PCS> In-Reply-To: <E10k0vW-0000Du-00@tardis.perspectives.net>; from Jerry Alexandratos on May 05, 1999 at 03:38:05AM -0400 References: <jlemon@americantv.com> <E10k0vW-0000Du-00@tardis.perspectives.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On May 05, 1999 at 03:38:05AM -0400, Jerry Alexandratos wrote:
> Jonathan Lemon <jlemon@americantv.com> 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 <vm/vm_page.h>
#include <vm/vm_param.h>
+#include <sys/reboot.h>
#include <sys/user.h>
#include <machine/md_var.h>
@@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990519134607.23968>
