cancel
Showing results for 
Search instead for 
Did you mean: 

Linking SECoreBin to SBSFU, How it works ??

SPati.7
Associate III

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 ??

1 REPLY 1
Jocelyn RICARD
ST Employee

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