Hi,
We have a need to protect multiple locations from USR mode writing. Since MPU has only limited amount of regions (and limited 2-power configuration) and OS itself takes already quite many we would like to spare those as much as possible for application code&ram protection and use other protection mechanism if possible for "CPU registers".
I have read this thread (and some others) and TRM chapter 2.3.2.5: https://e2e.ti.com/support/microcontrollers/hercules/f/312/p/347425/1216363
I know that I can protect PS and PCS chip selects by using registers from PCR module. This practically covers all our regular peripheral needs, since we do not need protection to EMIF & ethernet and this allows also to leave some peripherals under direct USR mode operations (just need to notice that some registers may be protected by default from usr write).
- This PCR protection triggers always data abort not just ignore the write like some other protected registers does (like DMA registers or for example SCIGCR0)?
From that other thread I understood that system registers PPCS, PPSE and PPS (from 0xFFF8 0000 to 0xFFFF FFFF) cannot be protected similarly via PCR - registers in this area by default has typically restrictions to USR mode write but not in all registers.
Question: Only option to protect that area is MPU but i takes only 1 region region since is it 0x80000 (2^19) long
Question: without MPU "by default protected registers" in this area just ignores usr mode writes, not trigger data abort (unimplemented addresses is not in scope)?
Since emif & ethernet is out of the (our) scope based on memory map everything important can be protected with 1 MPU region & PCR usage in case it is ok for application to protect whole system peripheral area?
It this a typo or real feature that other similar RTI register can be written in USR mode and other not: RTICPUC0 (TRM 13.3.7) vs RTICPUC1 (TRM 13.3.12)? Tried to test it and looks like it is protected so it is a typo? It is a bit hard/impossible to determine from documentation what is actually protected and what isn't when designing what really needs to be protected in our application - maybe it is easier to protect whole area with MPU than trying to seek if unprotected registers are "harmless" since RTICPUC0 for example is not "harmless" and would need protection in our application...
Also couldn't find anywhere is VIM RAM write priviledged only, based on TRM assuming not but cannot be sure - tried to test it and looks like that it ignores usr mode writes so it is protected? Just for curiosity, where that is said in TRM?
Violated access via MPU or PCR is logged a bit differently (based on TRM 2.3.2.5 description how the words are used) so targeted addresses which cause the data abort needs to be read from different register (or is this "MRC p15, #0, r0, c6, c0, #0" same as FAULT_ADDRESS_REG? If same, how those "MRC p16 c6"-style operations are mapped to certain peripheral address space?