What is it?
-----------

physmap is a small Solaris/x86 driver to make a physical contiguous memory
region available. It is written with the mga driver in the Utah GLX project in
mind but it might be usable for other people that wish to use a large DMA
buffer from user space in Solaris/x86.

It will most likely not work on Solaris/SPARC.


Disclaimer
----------

This works for me, but I'm no Solaris wizard so I wouldn't recommend anyone
to run this on a mission critical server.


Building & Installation
-----------------------

To build the kernel module and a sample application just run make.
Installation:
* cp physmap /kernel/drv
* You'll need to invoke add_drv and specify your graphics card as a parameter
to it.
I'm using the following command to add the module:
add_drv -n -i pci102b,2179 physmap

-n means that the driver won't be loaded right now.
-i pci102b,2179 specifies my G400. You can take a look at the output of prtconf
to find your graphics card.

At least on my version of Solaris 7 the driver entry in /etc/driver_aliases is
not correct after running add_drv. It looks like this: physmap pci102b,2179
But it should look like this: physmap "pci102b,2179"
You should verify that there are quotes around the pci id before continuing.

In order to increase your chances of getting a contiguous region of memory
you can forceload your module. Add the following line to /etc/system:
forceload: drv/physmap

Reboot your system.

Run physmaptest to verify that the installation worked.


Disclaimer:
-----------

I'm still no Solaris wizard. The installation instructions could be much better.
