From owner-freebsd-hackers Thu Dec 6 9:35:29 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id 4AA2037B41B; Thu, 6 Dec 2001 09:35:23 -0800 (PST) Received: from caddis.yogotech.com (caddis.yogotech.com [206.127.123.130]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id KAA19158; Thu, 6 Dec 2001 10:35:21 -0700 (MST) (envelope-from nate@yogotech.com) Received: (from nate@localhost) by caddis.yogotech.com (8.11.6/8.11.6) id fB6HZK316459; Thu, 6 Dec 2001 10:35:20 -0700 (MST) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15375.44119.475426.615975@caddis.yogotech.com> Date: Thu, 6 Dec 2001 10:35:19 -0700 To: John Baldwin Cc: Nate Williams , freebsd-hackers@FreeBSD.ORG, Ronald G Minnich Subject: Re: Re[2]: switching to real mode In-Reply-To: References: <15375.42185.608553.610033@caddis.yogotech.com> X-Mailer: VM 6.96 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > >> > I saw an example of switching in real mode in linux' sources (it looks > >> > pretty clear) and thouhgt it is possible to do the same under FreeBSD. > >> > The problem is I'm absolutely lost in FreeBSD's physical memory management > >> > implementation (page tables and directory and so on). > >> > >> That code is quite broken. You need to check out the ones I mentioned > >> earlier. All that the code does in the linux kernel is fail badly. > >> > >> Actually there used to be in freebsd some really nice code for popping > >> into real mode and back again. It was to support calling BIOS for certain > >> things. > > > > I believe the code is still there, and it's used for APM bios calls, > > if I remember correctly. > > It uses VM86 mode, not real mode. Going back and forth to real mode is too > expensive. Ahh, that's right. However, if I remember right, in older versions of FreeBSD it did the real-mode switch, because we didn't have the VM86 code. (This would be prior to FreeBSD 4). Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message