Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142139284
D25776.id75011.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
D25776.id75011.diff
View Options
Index: head/sys/powerpc/powerpc/trap.c
===================================================================
--- head/sys/powerpc/powerpc/trap.c
+++ head/sys/powerpc/powerpc/trap.c
@@ -207,7 +207,7 @@
int sig, type, user;
u_int ucode;
ksiginfo_t ksi;
- register_t fscr;
+ register_t addr, fscr;
VM_CNT_INC(v_trap);
@@ -224,6 +224,7 @@
type = ucode = frame->exc;
sig = 0;
user = frame->srr1 & PSL_PR;
+ addr = 0;
CTR3(KTR_TRAP, "trap: %s type=%s (%s)", td->td_name,
trapname(type), user ? "user" : "kernel");
@@ -248,6 +249,7 @@
if (user) {
td->td_pticks = 0;
td->td_frame = frame;
+ addr = frame->srr0;
if (td->td_cowgen != p->p_cowgen)
thread_cow_update(td);
@@ -261,18 +263,22 @@
break;
#if defined(__powerpc64__) && defined(AIM)
- case EXC_ISE:
case EXC_DSE:
+ addr = frame->dar;
+ /* FALLTHROUGH */
+ case EXC_ISE:
/* DSE/ISE are automatically fatal with radix pmap. */
if (radix_mmu ||
handle_user_slb_spill(&p->p_vmspace->vm_pmap,
- (type == EXC_ISE) ? frame->srr0 : frame->dar) != 0){
+ addr) != 0){
sig = SIGSEGV;
ucode = SEGV_MAPERR;
}
break;
#endif
case EXC_DSI:
+ addr = frame->dar;
+ /* FALLTHROUGH */
case EXC_ISI:
if (trap_pfault(frame, true, &sig, &ucode))
sig = 0;
@@ -368,6 +374,7 @@
if (fix_unaligned(td, frame) != 0) {
sig = SIGBUS;
ucode = BUS_ADRALN;
+ addr = frame->dar;
}
else
frame->srr0 += 4;
@@ -481,7 +488,7 @@
ksiginfo_init_trap(&ksi);
ksi.ksi_signo = sig;
ksi.ksi_code = (int) ucode; /* XXX, not POSIX */
- ksi.ksi_addr = (void *)frame->srr0;
+ ksi.ksi_addr = (void *)addr;
ksi.ksi_trapno = type;
trapsignal(td, &ksi);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 17, 10:00 AM (12 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27688426
Default Alt Text
D25776.id75011.diff (1 KB)
Attached To
Mode
D25776: Set si_addr to dar for MMU and alignment faults.
Attached
Detach File
Event Timeline
Log In to Comment