Re: Communication with PCIe device; reading/writing hw registers



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?



.



Relevant Pages

  • Serial ports are unavailable to the driver in the VM (VMware)
    ... I am debugging a driver that has some problems with standby/hiberation ... debugging messages to the serial port using a direct registers access ... registers seem to become unavailable to the driver after Windows boots ... boot-start) but stops to send them when Windows entered GUI mode. ...
    (microsoft.public.development.device.drivers)
  • Re: Question about PCIbus.dll in Windows CE 6.0
    ... The PCI bus driver is included in the image as a module and fixed up to run ... in kernel space only because it is a driver. ... I also get the following error displayed in the Windows CE Debug window ...
    (microsoft.public.windowsce.embedded)
  • Re: Communication with PCIe device; reading/writing hw registers
    ... I'm fairly new to driver development, but I am supposed to write a driver ... In Linux it is done in such a way that all the device's registers are mapped ... In Windows, ...
    (microsoft.public.development.device.drivers)
  • Re: Driver for keypad.
    ... You can do it right in your application (no driver necessary) if you want. ... Just map in the registers you are interested in via MmMapIoSpace, ... I have installed Windows CE 5.0 Platform ... My plan was to access the peripheral registers directly from the ...
    (microsoft.public.windowsce.embedded)
  • Re: Quad core CPU detected but shows as single core in 2.6.23.1
    ... pnp: PnP ACPI init ... Generic PHY: Registered new driver ... PCI: Firmware left 0000:00:04.0 e100 interrupts enabled, disabling ... Internal registers self-test: passed. ...
    (Linux-Kernel)

Loading