Re: Communication with PCIe device; reading/writing hw registers
- From: "Don Burn" <burn@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Jan 2009 08:31:19 -0500
Mapping the registers is one of the worst security holes one can do in any
OS, while it is possible to do in Windows I suspect you will get little help
in doing it. Before answering questions for you, give us some data:
1. What does the device do? In Windows many devices fall into a specific
class, and you should follow that model if your device does. Even if this
does not fall into a specifc class, know what operations are required (not
register hits, but actual operations such a write a data block which might
require a number of register actions) is needed to help you.
2. What is the performance of the device? Again, whether you make this a
user mode or a kernel mode driver is partially based on performance. Note:
most PCIe devices are kernel mode.
--
Don Burn (MVP, Windows DDK)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply
"ta" <ta@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D0CEFB7D-0160-4432-8F58-520DD8591A4D@xxxxxxxxxxxxxxxx
Hi there,
I'm fairly new to driver development, but I am supposed to write a driver
for a device under windows, which does already have a driver for Linux.
In Linux it is done in such a way that all the device's registers are
mapped
to a virtual filesystem, which can be accessed in user address space. This
allows to modify the registers quite simply.
As far as I know, IOCTLs are the preferred way to communicate between user
and kernel space. As far as I can foresee, the driver needs to run in
KMDF.
But is there another way, possibly a more elegant way, to communicate
between
user space and kernel space? In order to be able to communicate with
hardware
device, I would assume to use quite a lot IOCTLs, which as I personally
would
think, makes things quiet confusing and hard to keep track of. Therefore,
my
question: is there another way to handle the device, for example to map a
handle from kernel space to user space, which will allow me to work with
the
hardware device or something similar, what ever you can think of?
.
- Follow-Ups:
- References:
- Prev by Date: Communication with PCIe device; reading/writing hw registers
- Next by Date: Re: Error code 0xC0000120 in USB driver
- Previous by thread: Communication with PCIe device; reading/writing hw registers
- Next by thread: Re: Communication with PCIe device; reading/writing hw registers
- Index(es):
Relevant Pages
|
Loading