Hi to all
the command “sin -P <proc_name> mem” shows me the starting address and
length of memory blocks (code and data) of a running process, but
addresses are represented as in the virtual address space of the process
itself.
I would like to know where these blocks map into physical address space,
at least for blocks mapping some PCI device physical address areas (I
know regular data blocks can be segmented into non-contiguous pages of
physical RAM, but I don’e care about RAM now, only PCI devices).
Any hint?
thanks in advance
Davide
–
/------------------------------------------------------------
- Davide Ancri - Prisma Engineering
- email = davidea AT prisma DASH eng DOT it
------------------------------------------------------------/
Davide <doesnot@exist.spam> wrote:
I would like to know where these blocks map into physical address space,
Try the “qnx_segment_info()” routine …
John Garvey wrote:
Davide <> doesnot@exist.spam> > wrote:
I would like to know where these blocks map into physical address space,
Try the “qnx_segment_info()” routine …
Thanks John, but I was looking for a command line utility making some
similar call for me…
However, qnx_segment_info() seems to return the virtual segment:address
of memory blocks start. I think the “sin” command use qnx_segment_info()
to retrieve memory information about processes.
Davide
–
/------------------------------------------------------------
- Davide Ancri - Prisma Engineering
- email = davidea AT prisma DASH eng DOT it
------------------------------------------------------------/
Davide <doesnot@exist.spam> wrote in message
news:3EE5EC47.E5DF69F3@exist.spam…
Thanks John, but I was looking for a command line utility making some
similar call for me…
Sorry there isn’t.
However, qnx_segment_info() seems to return the virtual segment:address
of memory blocks start. I think the “sin” command use qnx_segment_info()
to retrieve memory information about processes.
qnx_segment_info() will return the physical address if the allocated segment
was made with the _PMF_DMA_SAFE flag set, unfortunately it won’t do the
reverse map without it.
Using the ldt you can get from qnx_psinfo(), you can play games via the gdt
to get segment information such as base addresses, but these are linear
addresses and not physical ones
.
Also, FYI, sin uses qnx_psinfo() to get segment information about
processes.
-Adam