"The SError normally caused by accessing the memory system, can you add more print to confirm this error happened in which uart ?". I am pretty sure this is with UART2, no others are in use. Obviously as it is an SError the kernel backtrace may not be related to where the SError happened.
"From the comment, the UCR2_SRST is cached, this could cause the SError.", actually UCR2_SRST is the only bit that is not read from memory cache but is read directly from the UART's registers. I did note that there was code in the uart driver that turns of the UART hardware clock for some reasons, maybe something has switched this off ?
"Can you use UART2 RXD test point to reproduce this issue on EVK?" I guess I can remove a resistor and tie the UART2_RXD line low to test. However it has taken me three weeks of work to get to a position where I can relatively reliably (within an hour or so) catch this fairly random fault. It obviously has a timing aspect. I think that using the EVK and start EVK code could be a 3 week or more job to get another example failure. So as I have a reasonable way to get the failure in my environment I would like to dig down and try and track down the source. Hence I need to find out why the SError occurred and if an address access what address.
Isn't there a standard way of determining what caused an SError interrupt on an IMX8MP ?
If the SError was generated due to some memory access issue, how do I find out what cause the SError and what memory location was being accessed ?