Xenix Device Drivers
Steve Harpster
steve at tellab3.UUCP
Fri Jun 14 02:28:30 AEST 1985
I'm running Xenix 286 and having problems writing a device driver (we
have no source either). Basically, I'm trying to write to the enhanced color
graphics adapter (EGA) directly. I know this starts at physical address
0xb8000 but I can't seem to get there.
The special files /dev/mem and /dev/kmem look like this:
------------- <- 0
| mem
|
|------------ <- kmemstart
| kmem
|
|------------
| more
| mem
-------------
------------- <- ~0xa0000
| I/O devs
|
-------------
So obviously I can't use /dev/[k]mem.
I haven't a clue as to what /dev/color or /dev/monochrome really do.
The documentation doesn't say much and kinds of hints that these are
worthless for what I'm trying to do.
Next step was to write a driver where the xxwrite() routine just used
cpass() to get a character from the user and stuff it into memory
starting at 0xb8000.
Sounds simple, right? When trying to write though, the kernel panics
with a "General Protection Fault". What does this REALLY mean? I
thought that once inside xxwrite(), I would be in kernel mode. Am I
still in user mode? Do I have to write a "bottom half" to get to
kernel mode (yeechy way because there are no interrupts, per se)?
Or is there something else going on that I haven't thought of?
Do I really want to use /dev/color instead?
Any help would be GREATLY appreciated.
Stephen Harpster
Tellabs, Inc.
...ihnp4!tellab1!steve
--
...ihnp4!tellab1!steve
Steve Harpster
Tellabs, Inc.
More information about the Comp.unix.wizards
mailing list