Call gate mechanism
The firewall is opened by calling a 'call-gate' mechanism: a single entry point that must be used to open the
gate, and to execute the code protected by the firewall. If the protected code is accessed without passing through
the call gate mechanism, then a system reset is generated. If any instruction is fetched outside the protected
area, the firewall is closed (see the figure below).
Figure 11. Firewall FSM
DT50954V1
IDLE
CLOSED OPEN
Call gate
Instruction fetch
out of prot. area
Reset
Reset
Firewall
enabled
Since the only way to respect the call gate sequence is to pass through the single call gate entry point,
a mechanism must be provided in order to support application calling multiple firewall-protected functions from
unprotected code area (such as encrypt and decrypt functions). A parameter can be used to specify which
function to execute (such as CallGate(F1_ID) or CallGate(F2_ID)). According to the parameter, the right
function is internally called. This mechanism is represented in the figure below.
Figure 12. Firewall application example
DT50961V1
Firewall code section
f1()
f1a()
f1b()
f2()
f2a()
f2b()
f3()
f3a()
f3b()
Function ID
Call gate single entry point
unprotected_code.c
AN5156
Firewall
AN5156 - Rev 8
page 36/56