The C29x CPU uses multiple STACKs to make sure integrity and separation between different
processes. Every LINK shall have an associated STACK mapped at device initialization.
Multiple LINKs can share a STACK but multiple STACKs do not share a LINK. The following
lists the stacks related to PIPE and interrupts, and the corresponding safety features:
- INT Stack: The user can choose and
allocate a single stack for all INTs. This stack is one of the normal software stacks
available on the device. The INT asserted to CPU remains in the pending state until the
CPU returns to this stack. Normally this is expected to be the stack of main process.
- RTINT Stack: This is dedicated stack is
used for context save and restore of RTINT and NMI. This stack is not accessible or
visible to any user code for security, and incorporates ECC (error correction code) along
with registers. Registers are zeroed to prevent visibility into what was happening before
the interrupt was serviced. Features available on the High Priority Interrupt Stack
include:
- WARNRTISP level: :
This
level is pre-programmed by secure software code. If the ISP from CPU meets this level
then the external PIPE module stops sending RTINTs to the CPU. This is to slow down
stack progression or excessive nesting that can lead to a stack overflow. WARNRTISP
level can be updated by the user meeting the required software security checks.
Modification of WARNRTISP level is typically done after reset.
- MAXRTISP level: :
This
is a fixed-level equal to the total of number of nestings allowed by the High Priority
Interrupt Stack minus one. This is to allow one reserved interrupt stack space for an
NMI to trigger, to prevent stack overflow. The PIPE raises a fault when this level is
reached, which in turn generates an NMI to resolve this critical condition.