From owner-freebsd-hackers Sat Nov 8 23:53:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA21259 for hackers-outgoing; Sat, 8 Nov 1997 23:53:27 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.5.85]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA21249 for ; Sat, 8 Nov 1997 23:53:25 -0800 (PST) (envelope-from tlambert@usr06.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.7/8.8.7) id AAA08462; Sun, 9 Nov 1997 00:53:24 -0700 (MST) Received: from usr06.primenet.com(206.165.6.206) via SMTP by smtp04.primenet.com, id smtpd008455; Sun Nov 9 00:53:22 1997 Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id AAA17086; Sun, 9 Nov 1997 00:53:18 -0700 (MST) From: Terry Lambert Message-Id: <199711090753.AAA17086@usr06.primenet.com> Subject: Re: >64MB To: tony@dell.com (Tony Overfield) Date: Sun, 9 Nov 1997 07:53:18 +0000 (GMT) Cc: tlambert@primenet.com, mike@smith.net.au, hackers@FreeBSD.ORG In-Reply-To: <3.0.3.32.19971106141214.006d5438@bugs.us.dell.com> from "Tony Overfield" at Nov 6, 97 02:12:14 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I can't tell, but I think you're talking about one of these: > > 1. ... switching to protected mode, setting larger segment limits > and then switching back to real mode. > > It's very unlikely that you have anything in your config.sys > that uses this trick. There's no benefit to using it, and > there are serious compatibility problems with it. > > 2. ... the real mode trick of using FFFF:xxxx addressing. > > This lets you address up to 64K-16 bytes of memory above 1M in > real mode. Protected mode is not needed to enable or use this > trick. It is completely inadequate for loading a kernel. In > DOS, this is called the HMA "high memory area". It is used > when use have DOS=HIGH in your config.sys, as one example. > > 3. Something else. > If so, please state it more clearly. 3. Something else. A) Switch to protected mode. B) Set up a TSS and call gate. C) Set up a memory map for real mode, excluding the last 64k in the 640k->1M window. For it, you leave it unmapped. D) Set up a data area below the 64k that the code stores what area of high memory you want to access. E) "Return" to real mode by calling through the gate. F) When you need to access a 64k chunk abouve 1M, set which one you want in the data area, and then access it as if it were in the 64k region. G) Take the fault in protected mode. Examine the data region. Map the desired region in the Real mode last 64k. Return. This is not quite trivial, but it's not quite impossible, either. Many memory managers (even DOS ones) do it every day. There are several other you can do using suspend/resume instructions and similar tricks (documented in the Van Gilluwe book -- I assume that's what you were referring to in #1? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.