Mapping Physical Memory without a Device?
John Baldwin
jhb at FreeBSD.org
Mon Jun 9 07:52:13 PDT 2003
On 09-Jun-2003 cd_freebsd wrote:
> John Baldwin <jhb at FreeBSD.org> wrote:
>
>>> The first 1 meg of memory is 1:1 mapped at KERNBASE. IOW, you can get to the BIOS at KERNBASE
>>> + 0xc0000. That should cover these first two items.
>
> Even on non-i386 machines?
No, other machines don't have BIOSes. :)
> I guess it really doesn't matter since I am reading the BIOS area to detect that I am running on
> a specific type machine. The other calls are ignored if the data read does not equal the expected
> values.
Your code would have to be compiled to run on another arch anyways. If
it is truly necessary, you can always use #ifdef __i386__ to determine
if you are running on an i386.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
More information about the freebsd-hackers
mailing list