Thank Luis for your reply.
Luis Perez wrote:
I apologize for the late reply.
To understand which mechanism in the SoC has caused the SEA is important to understand its meaning.
An abort resulting due to invalid or unsuccessful access of memory.
External Aborts are caused by errors flagged by the AXI interfaces when the request goes external to the processor. You can read the ARM Data Fault Status Register (DFSR) to dermine the fault type (There are bit field related to the type of Aborts, i.e. 0b01000 is SEA, but you could check the SD bit that is valid only for external aborts and is related to AXI/AHB error caused).
I've used the ESR_EL1 instead of the DFSR, because I run in AARCH64 state and not in AARCH32, but anyway I do not know which SD bit in DFSR you are refering to? Maybe you mean ExT bit [12], which should indicate whether it is AXI decode or slave error on external aborts? But will it be meaningful in the AARCH64 state too, because I did not found a similar bit in the ESL_ELx encoding?
The typical causes that generate a SEA are: some AXI mechanism, clocking or Trust Zone (when accessing protected memory).
I know you discarded some of them, and other cause is the following and is related to why accesses in EL1 are possible and accesses in EL0 are prohibited, probably you did not setup the AP[2:1] bit field.
The data access permission controls:
AP[2] selects between read-only and read/write access.
AP[1] selects between Application level (EL0) and System level (EL1) control.
This provides four permission settings for data accesses, one of them is "Read/write at EL1, NO access by software executing at EL0" (0b00) Probably you have this configuration.
For more information, check the following link:
https://armv8-ref.codingbelief.com/en/chapter_d4/d44_1_memory_access_control.html
Best regards,
Luis Pérez
Well, apart from the fact that I've checked all MMU-related settings several times, the AP fields should not be the issue, otherwise I would not observe a "Synchronous external abort, not on translation table walk" as the ESR_EL1 register suggests, but a permission fault.
To me it was interesting to know, whether I can identify the chip part denying the access, which is according to my observations no CPU-internal part, but some other TrustZone / bus controller logic, which makes it difficult resp. impossible to me to identify the source.
Regards
Stefan Kalkowski