none
About application to access Device memory RRS feed

  • Question


  • Hi,

    We have developed storport miniport driver and application.
    We use StorPortGetDeviceBase to map Device registers (BAR0/BAR4) to kernel virtual address.
    Then use MmMapLockedPagesSpecifyCache to map it to user space address.
    In this case, when application tried accessing user space address, got access violation error.

    Kindly let me know whether Device memory can be mapped and accessed to user space.

    In other case, Driver allocated non paged pool and map with MmMapLockedPagesSpecifyCache.
    Application could write and read user space address.

    Thanks & Regards,
    Raphel

    Saturday, April 1, 2017 10:31 AM

All replies

  • Technically yes you can map Device Registers to user space, but it opens huge security holes.   Also, you are doing this out of a storport?  How do you think this is going to work, with the storport receiving SCSI requests, some of them at DISPATCH_LEVEL?


    Don Burn Windows Driver Consulting Website: http://www.windrvr.com

    Saturday, April 1, 2017 1:44 PM
  • Thanks Don.

    We are able to expose Device memory. We have developed custom application and Driver which will be used internally.

    Thanks & Regards,

    Raphel

    Friday, April 7, 2017 2:27 PM