SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
Proxy memory protection allows an EDMA transfer programmed by a given peripheral module connected to EDMA, to have its permissions travel with the transfer through the EDMA_TPTC. The permissions travel along with the read transactions to the source and the write transactions to the destination endpoints. The EDMA_TPCC_OPT_n[31] PRIV bit and EDMA_TPCC_OPT_n[27:24] PRIVID bit is set with the peripheral module's PRIV value and PRIVID values, respectively, when any part of the PaRAM set is written.
The EDMA_TPCC_OPT_n[31] PRIV is the privilege level (i.e., user vs. supervisor). The EDMA_TPCC_OPT_n[27:24] PRIVID refers to a privilege ID with a number that is associated with an peripheral module connected to EDMA.
These options are part of the TR that are submitted to the transfer controller. The transfer controller uses the above values on their respective read and write command bus so that the target endpoints can perform memory protection checks based on these values.
Consider a parameter set that is programmed by a CPU in user privilege level for a simple transfer with the source buffer on an L2 page and the destination buffer on an L1D page. The EDMA_TPCC_OPT_n[31] PRIV is 0 for user-level and the CPU has a EDMA_TPCC_OPT_n[27:24] PRIVID to 0.
The PaRAM set is shown in Figure 16-29.
(a) EDMA Parameters |
Parameter Contents | Parameter | |||||
0010 0007h | Channel Options Parameter (OPT) | |||||
009F 0000h | Channel Source Address (SRC) | |||||
0001h | 0004h | Count for 2nd Dimension (BCNT) | Count for 1st Dimension (ACNT) | |||
00F0 7800h | Channel Destination Address (DST) | |||||
0001h | 0001h | Destination BCNT Index (DBIDX) | Source BCNT Index (SBIDX) | |||
0000h | FFFFh | BCNT Reload (BCNTRLD) | Link Address (LINK) | |||
0001h | 1000h | Destination CCNT Index (DCIDX) | Source CCNT Index (SCIDX) | |||
0000h | 0001h | Reserved | Count for 3rd Dimension (CCNT) |
The EDMA_TPCC_OPT_n[31] PRIV and EDMA_TPCC_OPT_n[27:24] PRIVID information travels along with the read and write requests that are issued to the source and destination memories.
For example, if the access attributes that are associated with the L2 page with the source buffer only allow supervisor read, write accesses EDMA_TPCC_MPPAN_k[4] SW and EDMA_TPCC_MPPAN_k[5] SR, the user-level read request above is refused. Similarly, if the access attributes that are associated with the L1D page with the destination buffer only allow supervisor read and write accesses (EDMA_TPCC_MPPAN_k[4] SW, EDMA_TPCC_MPPAN_k[5] SR), the user-level write request above is refused. For the transfer to succeed, the source and destination pages must have user-read and user-write permissions, respectively, along with allowing accesses from a PRIVID = 0.
Because the privilege level and privilege identification travel with the read and write requests, EDMA acts as a proxy.
Figure 16-31 illustrates the propagation of EDMA_TPCC_OPT_n[31] PRIV and EDMA_TPCC_OPT_n[27:24] PRIVID at the boundaries of all the interacting entities (CPU, EDMA_TPCC, EDMA_TPTCs, and slave memories).