Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145328730
D44350.id135742.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
973 B
Referenced Files
None
Subscribers
None
D44350.id135742.diff
View Options
diff --git a/sys/arm64/arm64/debug_monitor.c b/sys/arm64/arm64/debug_monitor.c
--- a/sys/arm64/arm64/debug_monitor.c
+++ b/sys/arm64/arm64/debug_monitor.c
@@ -193,6 +193,15 @@
("%s: debug exceptions are not masked", __func__));
kdb_frame->tf_spsr |= PSR_SS;
+
+ /*
+ * TODO: Handle single stepping over instructions that access
+ * the DAIF values. On a read the value will be incorrect.
+ */
+ kernel_monitor.dbg_flags &= ~PSR_DAIF;
+ kernel_monitor.dbg_flags |= kdb_frame->tf_spsr & PSR_DAIF;
+ kdb_frame->tf_spsr |= (PSR_A | PSR_I | PSR_F);
+
WRITE_SPECIALREG(mdscr_el1, READ_SPECIALREG(mdscr_el1) |
MDSCR_SS | MDSCR_KDE);
@@ -214,6 +223,9 @@
KASSERT((READ_SPECIALREG(daif) & PSR_D) == PSR_D,
("%s: debug exceptions are not masked", __func__));
+ kdb_frame->tf_spsr &= ~PSR_DAIF;
+ kdb_frame->tf_spsr |= kernel_monitor.dbg_flags & PSR_DAIF;
+
WRITE_SPECIALREG(mdscr_el1, READ_SPECIALREG(mdscr_el1) &
~(MDSCR_SS | MDSCR_KDE));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 19, 11:37 AM (4 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28877138
Default Alt Text
D44350.id135742.diff (973 B)
Attached To
Mode
D44350: arm64: Mask non-debug exceptions when single stepping
Attached
Detach File
Event Timeline
Log In to Comment