RAS support for m68k.
This commit is contained in:
parent
1a8058823b
commit
d6109af7cb
@ -1,4 +1,4 @@
|
||||
# $NetBSD: genassym.cf,v 1.24 2002/05/11 09:39:26 jdolecek Exp $
|
||||
# $NetBSD: genassym.cf,v 1.25 2002/08/28 08:57:00 gmcgarry Exp $
|
||||
|
||||
#
|
||||
# Copyright (c) 1982, 1990, 1993
|
||||
@ -57,6 +57,7 @@ endif
|
||||
|
||||
include <machine/hp300spu.h>
|
||||
include <machine/cpu.h>
|
||||
include <machine/frame.h>
|
||||
include <machine/intr.h>
|
||||
include <machine/psl.h>
|
||||
include <machine/reg.h>
|
||||
@ -156,6 +157,7 @@ define P_ADDR offsetof(struct proc, p_addr)
|
||||
define P_PRIORITY offsetof(struct proc, p_priority)
|
||||
define P_STAT offsetof(struct proc, p_stat)
|
||||
define P_WCHAN offsetof(struct proc, p_wchan)
|
||||
define P_NRAS offsetof(struct proc, p_nras)
|
||||
define P_MD_FLAGS offsetof(struct proc, p_md.md_flags)
|
||||
define P_MD_REGS offsetof(struct proc, p_md.md_regs)
|
||||
define SSLEEP SSLEEP
|
||||
@ -219,6 +221,9 @@ define SG_RW SG_RW
|
||||
define SG_FRAME SG_FRAME
|
||||
define SG_ISHIFT SG_ISHIFT
|
||||
|
||||
# frame fields
|
||||
define TF_PC offsetof(struct frame, f_pc)
|
||||
|
||||
# pcb fields
|
||||
define PCB_PS offsetof(struct pcb, pcb_ps)
|
||||
define PCB_USP offsetof(struct pcb, pcb_usp)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.123 2002/06/27 08:45:25 gmcgarry Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.124 2002/08/28 08:57:00 gmcgarry Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Gordon W. Ross
|
||||
@ -1380,8 +1380,26 @@ Lswnofpsave:
|
||||
pea %a0@ | push proc
|
||||
jbsr _C_LABEL(pmap_activate) | pmap_activate(p)
|
||||
addql #4,%sp
|
||||
movl _C_LABEL(curpcb),%a1 | restore p_addr
|
||||
|
||||
/*
|
||||
* Check for restartable atomic sequences (RAS)
|
||||
*/
|
||||
movl _C_LABEL(curproc),%a0
|
||||
tstl %a0@(P_NRAS)
|
||||
jeq 1f
|
||||
movl %a0@(P_MD_REGS),%a1
|
||||
movl %a1@(TF_PC),%sp@-
|
||||
movl %a0,%sp@-
|
||||
jbsr _C_LABEL(ras_lookup)
|
||||
addql #8,%sp
|
||||
movql #-1,%d0
|
||||
cmpl %a0,%d0
|
||||
jeq 1f
|
||||
movl _C_LABEL(curproc),%a1
|
||||
movl %a1@(P_MD_REGS),%a1
|
||||
movel %a0,%a1@(TF_PC)
|
||||
1:
|
||||
movl _C_LABEL(curpcb),%a1 | restore p_addr
|
||||
lea _ASM_LABEL(tmpstk),%sp | now goto a tmp stack for NMI
|
||||
|
||||
moveml %a1@(PCB_REGS),#0xFCFC | and registers
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: trap.c,v 1.95 2002/03/15 05:55:39 gmcgarry Exp $ */
|
||||
/* $NetBSD: trap.c,v 1.96 2002/08/28 08:57:01 gmcgarry Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
@ -43,7 +43,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.95 2002/03/15 05:55:39 gmcgarry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.96 2002/08/28 08:57:01 gmcgarry Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_execfmt.h"
|
||||
@ -59,6 +59,7 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.95 2002/03/15 05:55:39 gmcgarry Exp $");
|
||||
#include <sys/acct.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/ras.h>
|
||||
#include <sys/resourcevar.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/syslog.h>
|
||||
@ -502,6 +503,12 @@ trap(type, code, v, frame)
|
||||
/* FALLTHROUGH */
|
||||
case T_TRACE: /* tracing a trap instruction */
|
||||
case T_TRAP15|T_USER: /* SUN user trace trap */
|
||||
/*
|
||||
* Don't go stepping into a RAS.
|
||||
*/
|
||||
if ((p->p_nras != 0) &&
|
||||
(ras_lookup(p, (caddr_t)frame.f_pc) != (caddr_t)-1))
|
||||
goto out;
|
||||
frame.f_sr &= ~PSL_T;
|
||||
i = SIGTRAP;
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: types.h,v 1.11 2002/02/28 03:17:33 simonb Exp $ */
|
||||
/* $NetBSD: types.h,v 1.12 2002/08/28 08:56:59 gmcgarry Exp $ */
|
||||
|
||||
#ifndef _MACHINE_TYPES_H_
|
||||
#define _MACHINE_TYPES_H_
|
||||
@ -7,5 +7,6 @@
|
||||
|
||||
#define __HAVE_DEVICE_REGISTER
|
||||
#define __HAVE_GENERIC_SOFT_INTERRUPTS
|
||||
#define __HAVE_RAS
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user