Subject: Re: Hurd 0.2 accessing memory

From: [email-masked]
Date: Wed, 18 Jun 1997 23:11:43 -0700 (PDT)

> You open the device with device_open and then use device_map.  With
> the memory object that device_map returns you use vm_map to map it
> into your address space.
> 
> If you can't find Mach-specific code already in Xfree86 for this kind
> of thing, then I will track down the source from CMU.

I found the Mach-specific code, but I don't think it will do.  It opens
calls open("/dev/iopl",...), vm_allocate, and mmap.

In Hurd, /dev/iopl does not exist, but there is some kind of "iopl" 
device for using device_open.  So I thought, maybe I can just do
something like device_open(...,"iopl",...), device_map, vm_map.

Now, I am a little confused on this point.  The code in question,
as near as I can tell from the documentation and how it is called
in other places, is attempting to map the video memory into the memory
space of the program.  However, iopl represents the intel I/O ports,
doesn't it? Is the old "/dev/iopl" representing a different thing
than the new gnumach1.1.3's "iopl" device?

Anyway, I think I have all of X windows compiled except for the server
itself.  There is a wee directory full of OS specific code that needs
to be written.  I am trying to do this but not making quick progress.

If anyone knows the following, I would greatly appreciate it...

1) How to map the address 0xA0000 (or whatever) in physical memory
into the process space.
2) How to manipulate the console in such ways as to 
   2a) turn the cap lock and other led's on and off
   2b) beep (I can write out a ctrl-G for this I guess)
   3c) change key repeat, etc..

For number 2, code for other OS's have some special IOCTL's that they 
apply to the "/dev/console" device.  Is there something equivalent
under GNU Hurd?

Any help greatly appreciated.

Quetzalcoatl Bradley
[email-masked]