2
votes

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.

1
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
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
Sounds unlikely. My guess would be MmMapLockedPagesSpecifyCache.Harry Johnston
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

1 Answers

2
votes

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.