Subject: Allocating a buffer in physical memory?
To: None <tech-kern@netbsd.org, i386-port@netbsd.org>
From: Brian Clough <Brian_Clough@phoenix.com>
List: tech-kern
Date: 09/24/2001 09:50:33
I need to set up a buffer below 0xFFFFF in physical memory.  So that a
real mode VESA BIOS function (called from a kernel driver) can access
it using a 16:16 segment:offset.

I tried allocating space on the stack, but during driver initialization the
stack lives above 1 Mb.  I've tried "mmaping" an anonymous region
inside the lower 1 Mb, but I don't think that function can be called
from inside the kernel.  If it can then that should solve my problem.

Should I be able to call "mmap" from a device driver?  If so, how?

Otherwise, how can I allocate space (I only need about 100 bytes) in a
pre-determined range of physical memory?

-- 
Brian Clough
Phoenix Technologies (yes, the BIOS people)
OS Development Group, Norwood, MA
x(82)5015
mailto:brian_clough@phoenix.com