Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115900524
D47694.id146797.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
795 B
Referenced Files
None
Subscribers
None
D47694.id146797.diff
View Options
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c
--- a/sys/amd64/amd64/trap.c
+++ b/sys/amd64/amd64/trap.c
@@ -598,6 +598,7 @@
* FALLTHROUGH (TRCTRAP kernel mode, kernel address)
*/
case T_BPTFLT:
+ printf("#BP pflags %#x pcb_onfault %p\n", td->td_pflags, curpcb->pcb_onfault);
/*
* If KDB is enabled, let it handle the debugger trap.
* Otherwise, debugger traps "can't happen".
@@ -606,6 +607,15 @@
if (kdb_trap(type, dr6, frame))
return;
#endif
+ /*
+ * Most likely, EFI RT hitting INT3.
+ */
+ if ((td->td_pflags & (TDP_NOFAULTING |
+ TDP_RESETSPUR)) == (TDP_NOFAULTING |
+ TDP_RESETSPUR) && curpcb->pcb_onfault != NULL) {
+ frame->tf_rip = (long)curpcb->pcb_onfault;
+ return;
+ }
break;
case T_NMI:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 1, 4:50 AM (8 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17872903
Default Alt Text
D47694.id146797.diff (795 B)
Attached To
Mode
D47694: amd64 efi rt: handle #BP
Attached
Detach File
Event Timeline
Log In to Comment