2022-07-15 12:57 AM
From X-CUBE-SBSFU examples, we link SECoreBin binary to SBSFU project, to access Secure Engine APIs.
Even though we are linking SECoreBin, but how it will address at linking right function address offset ?? It means how SBSFU project get SECoreBin function address information ??
@Jocelyn RICARD Can you please reply to the above query ??
2022-08-01 02:57 AM
Hello @SPati.7 ,
I'm sorry, I was OoO for 2 weeks.
The "only" link between SBSFU and SECoreBin is a "Gate".
When SBSFU calls SECoreBin, it first goes trough a specific "interface" code that transforms the function call into a specific call using provided parameters.
Then SBSFU jumps to this gate. See implementation of se_callgate.c and usage of SE_CallGatePtr in the middleware.
So SECoreBin as a unique entry point. The location of this entry point is defined in the linker file with SE_CALLGATE_REGION_ROM_START
Best regards
Jocelyn