Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151837003
D25770.id74797.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
D25770.id74797.diff
View Options
Index: sys/riscv/riscv/trap.c
===================================================================
--- sys/riscv/riscv/trap.c
+++ sys/riscv/riscv/trap.c
@@ -80,7 +80,7 @@
void do_trap_user(struct trapframe *);
static __inline void
-call_trapsignal(struct thread *td, int sig, int code, void *addr)
+call_trapsignal(struct thread *td, int sig, int code, void *addr, int trapno)
{
ksiginfo_t ksi;
@@ -88,6 +88,7 @@
ksi.ksi_signo = sig;
ksi.ksi_code = code;
ksi.ksi_addr = addr;
+ ksi.ksi_trapno = trapno;
trapsignal(td, &ksi);
}
@@ -224,7 +225,8 @@
error = vm_fault_trap(map, va, ftype, VM_FAULT_NORMAL, &sig, &ucode);
if (error != KERN_SUCCESS) {
if (usermode) {
- call_trapsignal(td, sig, ucode, (void *)stval);
+ call_trapsignal(td, sig, ucode, (void *)stval,
+ frame->tf_scause & EXCP_MASK);
} else {
if (pcb->pcb_onfault != 0) {
frame->tf_a[0] = error;
@@ -353,11 +355,13 @@
break;
}
#endif
- call_trapsignal(td, SIGILL, ILL_ILLTRP, (void *)frame->tf_sepc);
+ call_trapsignal(td, SIGILL, ILL_ILLTRP, (void *)frame->tf_sepc,
+ exception);
userret(td, frame);
break;
case EXCP_BREAKPOINT:
- call_trapsignal(td, SIGTRAP, TRAP_BRKPT, (void *)frame->tf_sepc);
+ call_trapsignal(td, SIGTRAP, TRAP_BRKPT, (void *)frame->tf_sepc,
+ exception);
userret(td, frame);
break;
default:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 12, 12:19 AM (6 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31317251
Default Alt Text
D25770.id74797.diff (1 KB)
Attached To
Mode
D25770: Set si_trapno to the exception code from scause.
Attached
Detach File
Event Timeline
Log In to Comment