Re: Mapping physical memory into Application space



Huh an Application can map the data it needs from a physical device using
TransBusAddrToVirtual() (which internally calls MmMapIoSpace(), which
internally calls VirtualAlloc/VirtualCopy) There is no direct way for a
driver to allocate memory on behalf of an application that the application
can then use. The expectation is that the application allocates it's own
buffer and provides that to the driver. It's really an arbitrary choice
and CE does it one way other systems may do the same or may do the opposite.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com


.



Relevant Pages

  • Re: [spi-devel-general] Re: [PATCH/RFC] SPI: add DMAUNSAFE analog
    ... > One cannot allocate memory in interrupt context, so the way to go is ... is the way to allocate memory in irq context. ... but it's particularly relevant since both USB and SPI ... We would call those "driver bugs" and expect patches. ...
    (Linux-Kernel)
  • Re: interprocess communication with messages
    ... > Microsoft Corporation ... All rights ... >> of the 2 parts is a driver so you have all the OS provided driver ... >> smaillet at EmbeddedFusion dot com ...
    (microsoft.public.windowsce.embedded.vc)
  • NDIS60 Miniport sharing memory with user mode and WHQL
    ... Allocate memory in user space. ... In driver, I use NdisAllocateMdl ... MmGetSystemAddressForMdlSafe to get the driver accessible address. ... Allocate memory in kernel space. ...
    (microsoft.public.development.device.drivers)
  • Re: [PATCH/RFC] SPI: add DMAUNSAFE analog to David Brownells core
    ... how the ads7846 touchscreen driver does small async transfers. ... One cannot allocate memory in interrupt context, so the way to go is allocating it on stack, thus the buffer is not DMA-safe. ... causes a USB packet to be dynamically created and sent to the USB core. ...
    (Linux-Kernel)
  • Re: How to debug a device driver on a PPC?
    ... Is there any way to display debugging messages to the development ... After I compiled my driver on my workstation using the platform builder, ... > smaillet at EmbeddedFusion dot com ...
    (microsoft.public.windowsce.platbuilder)