How QNX handling Memory mapped I/O devices?

In Linux the functions readb/writeb, readl/writel, readw/writew are
available to transfer data from CPU to memory mapped devices. I’m not able
to see any such type of functions to handle memory mapped devices in QNX.
I have only seen the functions in/out to transfer data to I/O mapped devices
in QNX.
Could you please clarify this question?

Thanks,
Kousalya

“Kousalya K” <kkasinat@npd.hcltech.com> wrote in
news:a5iooo$fm$1@inn.qnx.com:

In Linux the functions readb/writeb, readl/writel, readw/writew are
available to transfer data from CPU to memory mapped devices. I’m not
able to see any such type of functions to handle memory mapped devices
in QNX. I have only seen the functions in/out to transfer data to I/O
mapped devices in QNX.
Could you please clarify this question?

in/out can be used to move data to a memory mapped device. If you look at
the headers for inout.h on PPC, then you’ll notice they just degrade into a
memory location reference and an EIEIO. The in/out functions are used only
if you need to move your code to a io bus based system, without too much
hassle.

\

Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>

Adam Mallory <amallory@qnx.com> wrote:

“Kousalya K” <> kkasinat@npd.hcltech.com> > wrote in
news:a5iooo$fm$> 1@inn.qnx.com> :

In Linux the functions readb/writeb, readl/writel, readw/writew are
available to transfer data from CPU to memory mapped devices. I’m not
able to see any such type of functions to handle memory mapped devices
in QNX. I have only seen the functions in/out to transfer data to I/O
mapped devices in QNX.
Could you please clarify this question?

in/out can be used to move data to a memory mapped device. If you look at
the headers for inout.h on PPC, then you’ll notice they just degrade into a
memory location reference and an EIEIO. The in/out functions are used only
if you need to move your code to a io bus based system, without too much
hassle.

This works if you’re looking at the control register level of handling.

If you’re looking at handling larger regions of memory, the normal way
under QNX is to mmap_device_memory() to get a pointer to that are of
memory, then just use memcpy() or similar routines for moving data in
and out of the device.

(Or, for even larger chunks of data, you may want to consider DMA.)

-David

QNX Training Services
http://www.qnx.com/support/training/