Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102923286
D39450.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D39450.diff
View Options
diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S
--- a/sys/arm64/arm64/locore.S
+++ b/sys/arm64/arm64/locore.S
@@ -864,7 +864,7 @@
.quad (SCTLR_LSMAOE | SCTLR_nTLSMD | SCTLR_UCI | SCTLR_SPAN | \
SCTLR_nTWE | SCTLR_nTWI | SCTLR_UCT | SCTLR_DZE | \
SCTLR_I | SCTLR_SED | SCTLR_SA0 | SCTLR_SA | SCTLR_C | \
- SCTLR_M | SCTLR_CP15BEN)
+ SCTLR_M | SCTLR_CP15BEN | SCTLR_BT1 | SCTLR_BT0)
sctlr_clear:
/* Bits to clear */
.quad (SCTLR_EE | SCTLR_E0E | SCTLR_IESB | SCTLR_WXN | SCTLR_UMA | \
diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c
--- a/sys/arm64/arm64/trap.c
+++ b/sys/arm64/arm64/trap.c
@@ -559,6 +559,11 @@
panic("Undefined instruction: %08x",
*(uint32_t *)frame->tf_elr);
break;
+ case EXCP_BTI:
+ print_registers(frame);
+ print_gp_register("far", far);
+ panic("Branch Target exception");
+ break;
default:
print_registers(frame);
print_gp_register("far", far);
@@ -699,6 +704,11 @@
(void *)frame->tf_elr, exception);
userret(td, frame);
break;
+ case EXCP_BTI:
+ call_trapsignal(td, SIGILL, ILL_ILLOPC, (void *)frame->tf_elr,
+ exception);
+ userret(td, frame);
+ break;
default:
call_trapsignal(td, SIGBUS, BUS_OBJERR, (void *)frame->tf_elr,
exception);
diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h
--- a/sys/arm64/include/armreg.h
+++ b/sys/arm64/include/armreg.h
@@ -408,6 +408,7 @@
#define EXCP_UNKNOWN 0x00 /* Unkwn exception */
#define EXCP_TRAP_WFI_WFE 0x01 /* Trapped WFI or WFE */
#define EXCP_FP_SIMD 0x07 /* VFP/SIMD trap */
+#define EXCP_BTI 0x0d /* Branch Target Exception */
#define EXCP_ILL_STATE 0x0e /* Illegal execution state */
#define EXCP_SVC32 0x11 /* SVC trap for AArch32 */
#define EXCP_SVC64 0x15 /* SVC trap for AArch64 */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 7:16 PM (21 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14722204
Default Alt Text
D39450.diff (1 KB)
Attached To
Mode
D39450: Add BTI exceptions
Attached
Detach File
Event Timeline
Log In to Comment