Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156960890
D28561.id84091.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
D28561.id84091.diff
View Options
diff --git a/share/man/man3/siginfo.3 b/share/man/man3/siginfo.3
--- a/share/man/man3/siginfo.3
+++ b/share/man/man3/siginfo.3
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 28, 2020
+.Dd February 17, 2021
.Dt SIGINFO 3
.Os
.Sh NAME
@@ -218,6 +218,11 @@
may report the address of the faulting memory access (if available) in
.Va si_addr
instead.
+Additionally
+.Dv SIGTRAP
+raised by a hardware watchpoint exception may report the data address that
+triggered the watchpoint in
+.Va si_addr .
.Pp
Sychronous signals set
.Va si_trapno
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
@@ -474,6 +474,7 @@
case EXCP_UNKNOWN:
case EXCP_DATA_ABORT_L:
case EXCP_DATA_ABORT:
+ case EXCP_WATCHPT_EL0:
far = READ_SPECIALREG(far_el1);
break;
}
@@ -534,6 +535,11 @@
exception);
userret(td, frame);
break;
+ case EXCP_WATCHPT_EL0:
+ call_trapsignal(td, SIGTRAP, TRAP_TRACE, (void *)far,
+ exception);
+ userret(td, frame);
+ break;
case EXCP_MSR:
/*
* The CPU can raise EXCP_MSR when userspace executes an mrs
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
@@ -230,6 +230,7 @@
#define EXCP_BRKPT_EL0 0x30 /* Hardware breakpoint, from same EL */
#define EXCP_SOFTSTP_EL0 0x32 /* Software Step, from lower EL */
#define EXCP_SOFTSTP_EL1 0x33 /* Software Step, from same EL */
+#define EXCP_WATCHPT_EL0 0x34 /* Watchpoint, from lower EL */
#define EXCP_WATCHPT_EL1 0x35 /* Watchpoint, from same EL */
#define EXCP_BRK 0x3c /* Breakpoint */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 18, 4:11 PM (15 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33226588
Default Alt Text
D28561.id84091.diff (1 KB)
Attached To
Mode
D28561: arm64: handle watchpoint exceptions from EL0
Attached
Detach File
Event Timeline
Log In to Comment