3. Your reverse engineering project that might help
with figuring out how things are supposed to work
IMHO a completely separate project.
Basically there is a strict layering:
L4 user-space libraries
L3 SGX firmware
L2 SGX firmware loader
L1 SoC glue (clock, reset, dma, virtual memory, ...)
I am mainly considering L1 here and fixing L2. L1 is SoC
specific of course and L2 needs Linux-release specific patches.
L2-L4 depend on SGX version.
L2 contains a lot of #ifdef that depend on SGX530/540/544 and even
more.
Reverse engineering addresses L3 and L4.
Of course if will be is successful it might become possible to improve
the whole L1-L4 stack, but that is another 10 years in the future :)
Since it is such a big task, I would propose to start with something
close to working (some TI/IMG DDK) and improve on that instead of
starting with parts from scratch.
I just can agree on that . For good reverse engineering we need also a
working reference system where we also can dump misc stuff, like it is
done with lima.
BR,
Nikolaus