-/* $OpenBSD: frame.h,v 1.7 2016/03/06 19:42:27 mpi Exp $ */
+/* $OpenBSD: frame.h,v 1.8 2021/04/29 12:49:19 visa Exp $ */
/*
* Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se)
register_t badvaddr;
register_t cause;
register_t pc;
- register_t ic;
+ register_t ic; /* unused, was RM7000 ICR */
register_t ipl;
/* From here and on, only saved user processes. */
-/* $OpenBSD: pcb.h,v 1.8 2016/03/06 19:42:27 mpi Exp $ */
+/* $OpenBSD: pcb.h,v 1.9 2021/04/29 12:49:19 visa Exp $ */
/*
* Copyright (c) 1988 University of Utah.
struct pcb {
struct trapframe pcb_regs; /* saved CPU and registers */
struct {
+ /* val[12] is unused, was RM7000 ICR */
register_t val[13];
} pcb_context; /* kernel context for resume */
int pcb_onfault; /* for copyin/copyout faults */
-/* $OpenBSD: context.S,v 1.61 2019/08/21 16:14:34 visa Exp $ */
+/* $OpenBSD: context.S,v 1.62 2021/04/29 12:49:19 visa Exp $ */
/*
* Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
REG_S s8, PCB_CONTEXT+9*REGSZ(a0)
REG_S ra, PCB_CONTEXT+10*REGSZ(a0)
REG_S v0, PCB_CONTEXT+11*REGSZ(a0)
-#ifdef RM7000_ICR
- cfc0 t1, COP_0_ICR
- REG_S t1, PCB_CONTEXT+12*REGSZ(a0) # save status register
-#endif
j ra
move v0, zero
END(savectx)
REG_S s8, PCB_CONTEXT+9*REGSZ(t3)
REG_S ra, PCB_CONTEXT+10*REGSZ(t3)
REG_S v0, PCB_CONTEXT+11*REGSZ(t3)
-#ifdef RM7000_ICR
- cfc0 t1, COP_0_ICR
- REG_S t1, PCB_CONTEXT+12*REGSZ(t3)
-#endif
1:
/*
REG_L s8, PCB_CONTEXT+9*REGSZ(t3)
REG_L ra, PCB_CONTEXT+10*REGSZ(t3)
REG_L v0, PCB_CONTEXT+11*REGSZ(t3)
-#ifdef RM7000_ICR
- REG_L v1, PCB_CONTEXT+12*REGSZ(t3)
- ctc0 v1, COP_0_ICR # XXX RM7000
-#endif
ori v0, v0, SR_INT_ENAB
MTC0 v0, COP_0_STATUS_REG
MTC0_SR_IE_HAZARD
PTR_L k0, CI_CURPROCPADDR(k1)
RESTORE_CPU_SREG(k0, 0)
RESTORE_REG(a0, PC, k0, 0)
-#ifdef RM7000_ICR
- RESTORE_REG(t0, IC, k0, 0)
- ctc0 t0, COP_0_ICR
-#endif
RESTORE_CPU(k0, 0)
RESTORE_REG(sp, SP, k0, 0)
LI k0, 0
-/* $OpenBSD: cp0access.S,v 1.21 2020/06/05 13:35:20 visa Exp $ */
+/* $OpenBSD: cp0access.S,v 1.22 2021/04/29 12:49:19 visa Exp $ */
/*
* Copyright (c) 2001-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
lw t0, idle_mask
not a0, a0 # 1 means masked so invert.
and a0, t0 # never upgrade to higher than max
-#ifdef RM7000_ICR
- cfc0 v0, COP_0_ICR
- li v1, ~IC_INT_MASK
- and v1, v0
- sll v0, a0, 8
- and v0, IC_INT_MASK
- and v0, a0, IC_INT_MASK
- or v1, v0
- ctc0 v1, COP_0_ICR
-#endif
MFC0 v0, COP_0_STATUS_REG
MFC0_HAZARD
LI v1, ~SR_INT_MASK
-/* $OpenBSD: exception.S,v 1.41 2021/02/11 14:44:13 visa Exp $ */
+/* $OpenBSD: exception.S,v 1.42 2021/04/29 12:49:19 visa Exp $ */
/*
* Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com)
.mask 0x80000000, (CF_RA_OFFS - FRAMESZ(KERN_EXC_FRAME_SIZE))
PTR_SUB k0, sp, FRAMESZ(KERN_EXC_FRAME_SIZE)
SAVE_CPU(k0, CF_RA_OFFS)
-#ifdef RM7000_ICR
- cfc0 v1, COP_0_ICR
- SAVE_REG(v1, IC, k0, CF_RA_OFFS)
-#endif
.set at
move sp, k0 # Already on kernel stack
and t0, a1, ~(SR_COP_1_BIT | SR_EXL | SR_INT_ENAB | SR_KSU_MASK)
PTR_L a0, CF_RA_OFFS + KERN_REG_SIZE(sp)
.set noat
-#ifdef RM7000_ICR
- RESTORE_REG(t0, IC, sp, CF_RA_OFFS)
- ctc0 t0, COP_0_ICR
-#endif
RESTORE_CPU(sp, CF_RA_OFFS)
PTR_ADDU sp, sp, FRAMESZ(KERN_EXC_FRAME_SIZE)
ERET
GET_CPU_INFO(k1, k0)
PTR_L k0, CI_CURPROCPADDR(k1)
SAVE_CPU(k0, 0)
-#ifdef RM7000_ICR
- cfc0 v1, COP_0_ICR
- SAVE_REG(v1, IC, k0, 0)
-#endif
PTR_ADDU sp, k0, USPACE-FRAMESZ(CF_SZ)
.set at
and t0, a1, ~(SR_COP_1_BIT | SR_EXL | SR_INT_ENAB | SR_KSU_MASK)
sw a3, CI_IPL(k1)
.set noat
RESTORE_REG(a0, PC, k0, 0)
-#ifdef RM7000_ICR
- RESTORE_REG(t0, IC, k0, 0)
- ctc0 t0, COP_0_ICR
-#endif
RESTORE_CPU(k0, 0)
RESTORE_REG(sp, SP, k0, 0)
LI k0, 0
.mask 0x80000000, (CF_RA_OFFS - FRAMESZ(KERN_EXC_FRAME_SIZE))
PTR_SUB k0, sp, FRAMESZ(KERN_EXC_FRAME_SIZE)
SAVE_CPU(k0, CF_RA_OFFS)
-#ifdef RM7000_ICR
- cfc0 v1, COP_0_ICR
- SAVE_REG(v1, IC, k0, CF_RA_OFFS)
-#endif
#if defined(DDB)
SAVE_CPU_SREG(k0, CF_RA_OFFS)
#endif
MTC0_SR_IE_HAZARD
.set noat
-#ifdef RM7000_ICR
- RESTORE_REG(t0, IC, sp, CF_RA_OFFS)
- ctc0 t0, COP_0_ICR
-#endif
RESTORE_REG(a0, PC, sp, CF_RA_OFFS)
RESTORE_CPU(sp, CF_RA_OFFS)
PTR_ADDU sp, sp, FRAMESZ(KERN_EXC_FRAME_SIZE)
GET_CPU_INFO(k1, k0)
PTR_L k0, CI_CURPROCPADDR(k1)
SAVE_CPU(k0, 0)
-#ifdef RM7000_ICR
- cfc0 v1, COP_0_ICR
- SAVE_REG(v1, IC, k0, 0)
-#endif
SAVE_CPU_SREG(k0, 0)
PTR_ADDU sp, k0, USPACE-FRAMESZ(CF_SZ)
.set at
.set noat
RESTORE_CPU_SREG(k0, 0)
RESTORE_REG(a0, PC, k0, 0)
-#ifdef RM7000_ICR
- RESTORE_REG(t0, IC, k0, 0)
- ctc0 t0, COP_0_ICR
-#endif
RESTORE_CPU(k0, 0)
RESTORE_REG(sp, SP, k0, 0)
LI k0, 0
-/* $OpenBSD: interrupt.c,v 1.73 2019/09/05 05:31:38 visa Exp $ */
+/* $OpenBSD: interrupt.c,v 1.74 2021/04/29 12:49:19 visa Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
/*
* Update proc0 pcb to contain proper values.
*/
-#ifdef RM7000_ICR
- pcb->pcb_context.val[12] = (idle_mask << 8) & IC_INT_MASK;
-#endif
pcb->pcb_context.val[11] = (pcb->pcb_regs.sr & ~SR_INT_MASK) |
(idle_mask & SR_INT_MASK);
-/* $OpenBSD: mips64_machdep.c,v 1.35 2021/02/23 04:44:30 cheloha Exp $ */
+/* $OpenBSD: mips64_machdep.c,v 1.36 2021/04/29 12:49:19 visa Exp $ */
/*
* Copyright (c) 2009, 2010, 2012 Miodrag Vallat.
p->p_md.md_regs->pc = pack->ep_entry & ~3;
p->p_md.md_regs->t9 = pack->ep_entry & ~3; /* abicall req */
p->p_md.md_regs->sr = protosr | (idle_mask & SR_INT_MASK);
- p->p_md.md_regs->ic = (idle_mask << 8) & IC_INT_MASK;
if (CPU_HAS_FPU(ci))
p->p_md.md_flags &= ~MDP_FPUSED;
if (ci->ci_fpuproc == p)
-/* $OpenBSD: vm_machdep.c,v 1.39 2019/12/20 13:34:41 visa Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.40 2021/04/29 12:49:19 visa Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992, 1993
/*
* Copy the process control block to the new proc and
* create a clean stack for exit through trampoline.
- * pcb_context has s0-s7, sp, s8, ra, sr, icr.
+ * pcb_context has s0-s7, sp, s8, ra, sr.
*/
if (p1 != curproc) {
-#ifdef RM7000_ICR
- pcb->pcb_context.val[12] = (idle_mask << 8) & IC_INT_MASK;
-#endif
pcb->pcb_context.val[11] = (pcb->pcb_regs.sr & ~SR_INT_MASK) |
(idle_mask & SR_INT_MASK);
}