git: 3a0cc6fe61ea - main - Handle the arm64 unknown exception separately

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Fri, 31 Mar 2023 10:50:35 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=3a0cc6fe61ea29334c17dfb71bf24ba9e604ab4c

commit 3a0cc6fe61ea29334c17dfb71bf24ba9e604ab4c
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-03-31 09:15:45 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2023-03-31 09:15:45 +0000

    Handle the arm64 unknown exception separately
    
    Rather than falling through to the default case handle the unknown
    exception with its own panic message. As ESR_EL1 is zero for this
    exception stop printing it.
    
    Sponsored by:   Arm Ltd
---
 sys/arm64/arm64/trap.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c
index 367a31cbe1de..0ee1bed0c35a 100644
--- a/sys/arm64/arm64/trap.c
+++ b/sys/arm64/arm64/trap.c
@@ -549,9 +549,11 @@ do_el1h_sync(struct thread *td, struct trapframe *frame)
 	case EXCP_UNKNOWN:
 		if (undef_insn(1, frame))
 			break;
-		printf("Undefined instruction: %08x\n",
+		print_registers(frame);
+		print_gp_register("far", far);
+		panic("Undefined instruction: %08x",
 		    *(uint32_t *)frame->tf_elr);
-		/* FALLTHROUGH */
+		break;
 	default:
 		print_registers(frame);
 		print_gp_register("far", far);