jnippula opened a new pull request, #18490: URL: https://github.com/apache/nuttx/pull/18490
## Summary Add handler to arm64 for unhandled user exception. Print exception reason class and description and dump registers. The exception info collection is moved to separate function to avoid duplicate code. ## Impact When user application/module panics the system does not halt, but only the user process exits. ## Testing Tested with custom target by adding null pointer reference into one of the user modules to generate user exception. When panic occurs, following is printed into the console: ``` [CPU0] arm64_fatal_handler: PANIC: Unhandled user exception in PID 23: commander [CPU0] arm64_fatal_handler: Reason: DABT (lower EL) - Data Abort from a lower Exception level, that might be using AArch32 or AArch64 [CPU0] up_dump_register: stack = 0x809a2500 [CPU0] up_dump_register: x0: 0x0 x1: 0xc0032cd8 [CPU0] up_dump_register: x2: 0x0 x3: 0x0 [CPU0] up_dump_register: x4: 0x8000000000000000 x5: 0x0 [CPU0] up_dump_register: x6: 0x80 x7: 0xff62686d606ffefe [CPU0] up_dump_register: x8: 0x7f7f7f7f7f7fffff x9: 0x0 [CPU0] up_dump_register: x10: 0x101010101010101 x11: 0x38 [CPU0] up_dump_register: x12: 0x101010101010101 x13: 0x8 [CPU0] up_dump_register: x14: 0xffffffffffffffe x15: 0x10 [CPU0] up_dump_register: x16: 0x17 x17: 0x0 [CPU0] up_dump_register: x18: 0x0 x19: 0xc200aee0 [CPU0] up_dump_register: x20: 0x1 x21: 0xc200af5a [CPU0] up_dump_register: x22: 0xc200aed8 x23: 0xc0031810 [CPU0] up_dump_register: x24: 0xc00317df x25: 0xa [CPU0] up_dump_register: x26: 0x9 x27: 0x2 [CPU0] up_dump_register: x28: 0x0 x29: 0x0 [CPU0] up_dump_register: x30: 0xc000d704 [CPU0] up_dump_register: [CPU0] up_dump_register: STATUS Registers: [CPU0] up_dump_register: SPSR: 0x0 [CPU0] up_dump_register: ELR: 0xc000d70c [CPU0] up_dump_register: SP_EL0: 0xc200ad80 [CPU0] up_dump_register: SP_ELX: 0x809a2840 [CPU0] up_dump_register: EXE_DEPTH: 0xffffffffffffffc4 [CPU0] up_dump_register: SCTLR_EL1: 0x30d0180d ``` After the register dump the user process exits and the nsh shell is still alive and usable. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
