- fix botch in comment on register prefix removal
- use m68k_page_offset() macro - some KNF
This commit is contained in:
parent
e627d48e89
commit
b8b61c2254
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: trap.c,v 1.117 2006/03/26 01:50:07 tsutsui Exp $ */
|
/* $NetBSD: trap.c,v 1.118 2006/03/26 01:59:31 tsutsui Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1982, 1986, 1990, 1993
|
* Copyright (c) 1982, 1986, 1990, 1993
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.117 2006/03/26 01:50:07 tsutsui Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.118 2006/03/26 01:59:31 tsutsui Exp $");
|
||||||
|
|
||||||
#include "opt_ddb.h"
|
#include "opt_ddb.h"
|
||||||
#include "opt_execfmt.h"
|
#include "opt_execfmt.h"
|
||||||
|
@ -224,7 +224,7 @@ userret(struct lwp *l, struct frame *fp, u_quad_t oticks,
|
||||||
int sig;
|
int sig;
|
||||||
int beenhere = 0;
|
int beenhere = 0;
|
||||||
|
|
||||||
again:
|
again:
|
||||||
#endif
|
#endif
|
||||||
/* Invoke MI userret code */
|
/* Invoke MI userret code */
|
||||||
mi_userret(l);
|
mi_userret(l);
|
||||||
|
@ -413,12 +413,12 @@ trap(int type, u_int code, u_int v, struct frame frame)
|
||||||
|
|
||||||
case T_FPERR|T_USER: /* 68881 exceptions */
|
case T_FPERR|T_USER: /* 68881 exceptions */
|
||||||
/*
|
/*
|
||||||
* We pass along the 68881 status which locore stashed
|
* We pass along the 68881 status register which locore stashed
|
||||||
* in code for us. Note that there is a possibility that the
|
* in code for us. Note that there is a possibility that the
|
||||||
* bit pattern of this will conflict with one of the
|
* bit pattern of this register will conflict with one of the
|
||||||
* FPE_* codes defined in signal.h. Fortunately for us, the
|
* FPE_* codes defined in signal.h. Fortunately for us, the
|
||||||
* only such codes we use are all in the range 1-7 and the low
|
* only such codes we use are all in the range 1-7 and the low
|
||||||
* 3 bits of the status are defined as 0 so there is
|
* 3 bits of the status register are defined as 0 so there is
|
||||||
* no clash.
|
* no clash.
|
||||||
*/
|
*/
|
||||||
ksi.ksi_signo = SIGFPE;
|
ksi.ksi_signo = SIGFPE;
|
||||||
|
@ -716,7 +716,7 @@ trap(int type, u_int code, u_int v, struct frame frame)
|
||||||
trapsignal(l, &ksi);
|
trapsignal(l, &ksi);
|
||||||
if ((type & T_USER) == 0)
|
if ((type & T_USER) == 0)
|
||||||
return;
|
return;
|
||||||
out:
|
out:
|
||||||
userret(l, &frame, sticks, v, 1);
|
userret(l, &frame, sticks, v, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -788,7 +788,7 @@ writeback(struct frame *fp, int docachepush)
|
||||||
trunc_page(f->f_fa), VM_PROT_WRITE,
|
trunc_page(f->f_fa), VM_PROT_WRITE,
|
||||||
VM_PROT_WRITE|PMAP_WIRED);
|
VM_PROT_WRITE|PMAP_WIRED);
|
||||||
pmap_update(pmap_kernel());
|
pmap_update(pmap_kernel());
|
||||||
fa = (u_int)&vmmap[(f->f_fa & PGOFSET) & ~0xF];
|
fa = (u_int)&vmmap[m68k_page_offset(f->f_fa) ^ ~0xF];
|
||||||
memcpy((caddr_t)fa, (caddr_t)&f->f_pd0, 16);
|
memcpy((caddr_t)fa, (caddr_t)&f->f_pd0, 16);
|
||||||
(void) pmap_extract(pmap_kernel(), (vaddr_t)fa, &pa);
|
(void) pmap_extract(pmap_kernel(), (vaddr_t)fa, &pa);
|
||||||
DCFL(pa);
|
DCFL(pa);
|
||||||
|
@ -972,13 +972,14 @@ writeback(struct frame *fp, int docachepush)
|
||||||
l->l_addr->u_pcb.pcb_onfault = oonfault;
|
l->l_addr->u_pcb.pcb_onfault = oonfault;
|
||||||
if (err)
|
if (err)
|
||||||
err = SIGSEGV;
|
err = SIGSEGV;
|
||||||
return (err);
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void
|
void
|
||||||
dumpssw(u_short ssw)
|
dumpssw(u_short ssw)
|
||||||
{
|
{
|
||||||
|
|
||||||
printf(" SSW: %x: ", ssw);
|
printf(" SSW: %x: ", ssw);
|
||||||
if (ssw & SSW4_CP)
|
if (ssw & SSW4_CP)
|
||||||
printf("CP,");
|
printf("CP,");
|
||||||
|
|
Loading…
Reference in New Issue