Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Nov 1997 07:53:18 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        tony@dell.com (Tony Overfield)
Cc:        tlambert@primenet.com, mike@smith.net.au, hackers@FreeBSD.ORG
Subject:   Re: >64MB
Message-ID:  <199711090753.AAA17086@usr06.primenet.com>
In-Reply-To: <3.0.3.32.19971106141214.006d5438@bugs.us.dell.com> from "Tony Overfield" at Nov 6, 97 02:12:14 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711090753.AAA17086>