From owner-cvs-src@FreeBSD.ORG Fri Oct 10 10:53:33 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 087B016A4B3; Fri, 10 Oct 2003 10:53:33 -0700 (PDT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61F6943FB1; Fri, 10 Oct 2003 10:53:32 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by canning.wemm.org (Postfix) with ESMTP id 4C2D52A7EA; Fri, 10 Oct 2003 10:53:32 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Bruce Evans In-Reply-To: <20031005152153.T3175@gamplex.bde.org> Date: Fri, 10 Oct 2003 10:53:32 -0700 From: Peter Wemm Message-Id: <20031010175332.4C2D52A7EA@canning.wemm.org> cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/i386/i386 locore.s machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Oct 2003 17:53:33 -0000 Bruce Evans wrote: [patch committed as-is so as to not cause any more conflicts for you] > Unfinished related details: > - Why do we make page 0 and the pages between biosmem and ISA_HOLE_START > writeable in 2 maps? There are both regular bios32 calls (eg: apm) and bios calls in vm86 mode. > - Which parts of vm86 and/or BIOSes need to write these pages? apm (bios32) seems to want to write to the bios scratch space in page 0 on many newer machines. Older 386/486 laptop bioses dont seem to want to do this. > - I think the non-FreeBSD part of vm86 needs to access (write?) page 0 > in the vm86 map, so we must be mapping it there somewhere else. If > so, why do we handle it different to the other BIOS pages. I believe this is for the vm86 monitor, which is code that we provide. I am not really 100% sure how all that stuff works. I believe we provide a fixed set of base mappings, and then explicitly map in additional pages into the vm86map based on the descriptors passed into the vm86 setup code. You can see the code to parse the descriptors over there. I've been a bit reluctant to learn how that stuff works because it wasn't relevant to amd64 and I was already overloaded with things to learn as it was. > - Page 0 will need to be writeable in cpu_reset_real(), so the comment > which says that writeability is for vm86 will be incomplete. However, > r/w mapping could easily be delayed until it is needed in all cases. Yes, it also needs to be writeable for SMP startup because it twiddles the bios warm start vector. > - ISA_HOLE_START / PAGE_SIZE is sometimes hard-coded as 160. There is a lot of ugly stuff there. I fixed some (but not all by a long shot) of this when working on the amd64 fork. On one hand I was seriously tempted to clean stuff up, but on the other hand, I didn't want to make merging unnecessarily difficult. > - other points mentioned in comments. XXX need a 50 hour day. :-/ Cheers, -Peter -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5