2

Is it possible to map a physical memory address to a windows user-space application virtual address to read/write?

EDIT: I have a system where a real-time operating system is running in parallel with windows. The guest-OS(RTOS) is able to read and write from/to a memory mapped PCIe slave peripheral by mapping the physical address to its virtual memory space.

What i would like to do, is to be able to communicate directly with the PCIe slave device from a windows user space application, but this requires me to map that physical memory address to the user-space virtual memory-space.

Thanks in advance.

user3156702
  • 365
  • 1
  • 3
  • 7
  • A device driver can map physical memory into the address space of a user-mode process, but I don't think there's any way to do this without a device driver. – Harry Johnston Jan 15 '14 at 20:35
  • Hello Harry. Thank you for your time. I have been looking a but closer at device drivers to do that. Is using ZwMapViewOfSection the correct API / path i should look at? – user3156702 Jan 15 '14 at 21:25
  • Sounds unlikely. My guess would be MmMapLockedPagesSpecifyCache. – Harry Johnston Jan 15 '14 at 23:40
  • Please add an answer so i can accept it. Thank you for your help. I will post another question if i run into problems. – user3156702 Jan 16 '14 at 07:33

1 Answers1

2

Device drivers can map physical memory into the address space of a user-mode process using MmMapLockedPagesSpecifyCache and the related functions. To the best of my knowledge, there is no way to do this without a device driver.

Harry Johnston
  • 35,639
  • 6
  • 68
  • 158