On Thu, Sep 13, 2012 at 3:18 PM, Dr. H. Nikolaus Schaller <[email protected]
> wrote:

>
> Am 11.09.2012 um 22:04 schrieb Dr. H. Nikolaus Schaller:
>
> > What could be next steps?
> >
> > * understanding what the kernel driver is doing
> > * which interfaces it really has and which commands from user space it
> can process
> > * how it communicates with the SGX-GPU (there are some interface
> registers documented for the DM3730)
> > * understand what the microkernel is and what it is doing, which
> commands it provides etc.
> > * start to document some findings on the project wiki (
> http://powervr.gnu.org.ve/)
> >
> > How could this be done?
> >
> > * inspecting (already) open kernel driver code
> > * strace
> > * adding code to the kernel drivers to inspect bytes send between CPU
> and GPU
>
> I just did an strace on pvrsrvinit
>
> Learnings:
> * it loads /usr/lib/libsrv_um.so
> * which indeed appears to be a communication lib
> * then (likely by the lib) the process opens /dev/pvrsrvkm in RDWR mode
> * then it issues ioctl() and 13 mmap2() calls on the device
> * finally it does munmap() for all regions
> * and closes the file
>
> That's it :)
>
> A next step could be to look into the driver sources to
> get an understanding of the ioctl() calls. Some must
> finally start the "microkernel".
>
>
http://lists.phcomp.co.uk/pipermail/arm-netbook/2012-June/004453.html

look up iain bullard's work, and also the precursor which inspired it.
there's a wrapper library, you can do the same trick, which dlopen's
/usr/lib/libsrv_um.so and then allows tracking of the function calls.  you
may need to LD_LIBRARY_PATH pre-hook ioctl and mmap2, and a bit more, gain
access to things at a bit more of a fundamental level.

then the live operation of the program will tell you what it is doing.

l.
_______________________________________________
powervr-devel mailing list
[email protected]
http://listas.gnu.org.ve/cgi-bin/mailman/listinfo/powervr-devel
PowerVR project wiki: http://powervr.gnu.org.ve/

Reply via email to