SPRUJ79 November 2024 F29H850TU , F29H859TU-Q1
An AP range can be configured to inherit protection settings from a specific LINK's caller. The APx_CFG.APILINK register field specifies the LINKID which inherits permissions for access to Access Protection Range APx. The C29x CPU sets DSTS.CLINK to the current LINK's caller LINKID whenever a protected call is performed. Whenever code belonging to the LINKn specified in APx_CFG.APILINK performs an access to memory within APx, the access permissions granted to LINKn match the access permissions for LINKn's caller (as identified by CLINK on the data access request). The access protection inheritance feature is enabled by setting APx_CFG.APILINKE to 1.
Access protection inheritance is useful for maintaining memory protection when using common or utility functions such as memcpy. Without inheritance, an unauthorized LINK can access data memory covered by APx by simply calling a shared memory function with direct read or write access to APx. However, when APx_CFG.APILINKE is set to 1 and APx_CFG.APILINK is defined to be the LINK associated with the common code functions, then the shared function is imputed the same permissions as the LINK that called the shared function. An illustration of how access protection inheritance enables the sharing of common code functions between different LINKs is shown in Figure 10-3.