[Openpvrsgx-devgroup] Reverse engineering SGX 540 userspace driver

H. Nikolaus Schaller hns at goldelico.com
Tue Nov 9 08:33:32 CET 2021


Hi Lukas,

> Am 09.11.2021 um 02:48 schrieb Lucas Fryzek <lucas.fryzek at hazeco.xyz>:
> 
> Hello,
> 
> I have a creator ci20 board sitting around that I haven't been using very much and I know that the PowerVR GPUs have not had a lot of progress on reverse engineering the driver for the GPU.
> 
> Does anyone know of any ongoing efforts to reverse engineer the SGX 540 driver? Or does anyone know of any documentation generated by previous reverse engineering efforts? I'd love to contribute a helping hand in reverse engineering how this GPU works.

Yes, any help is very welcome!

I am aware of some projects:

a) OpenPVRSGX tries to include a DDK 1.14 or DDK 1.17 kernel driver - there is one version compatible to the jz4780
   It explicitly excludes reverse engineering and focusses on kernel driver (which always was open source)
   Home page: https://github.com/openpvrsgx-devgroup/linux_openpvrsgx
   Mailing list: https://lists.goldelico.com/pipermail/openpvrsgx-devgroup
   https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/wiki/DDK-versions
    
b) LetuxOS works on making the CI20 basics useable (currently we try to upstream the HDMI driver)
   The status is that we can compile the kernel driver in different DDK releases but have no matching
   user-space code to test anything.
   I thought about using the mipsel version of qemu-arm-static to run the arm pvrsrvctl tool to
   at least download firmware but did not find time to really try it.
 
c) there is a n900 originated project to improve user-space code
   and if I understand correctly they have build a compatible user-space
   https://lists.goldelico.com/pipermail/openpvrsgx-devgroup/2021-October/000472.html
   https://github.com/freemangordon/mesa/tree/mesa-pvr-ti

d) next, there was an FSF supported project with a collection of information but the original server has been lost
   https://www.phoronix.com/scan.php?page=news_item&px=MTE0MDc
   http://powervr.gnu.org.ve - Unfortunately the wayback machine has only archived 302 errors
   Maybe there exists some other archive.
   Back then there was material about partially RE instruction set etc.

e) finally there was a leak several years ago when some Android device vendor unintentionally published the
   source code of the user-space code and shader compilers on github. This was retracted. There was some heavy
   discussion and it was considered unethical by the community to make any use of it (even looking inside and
   writing down observations).

> 
> Regards,
> Lucas Fryzek

Hope this helps to get new ideas and started!

BR,
Nikolaus



More information about the openpvrsgx-devgroup mailing list