-/* $OpenBSD: cpu.h,v 1.28 2008/08/15 22:38:20 miod Exp $ */
+/* $OpenBSD: cpu.h,v 1.29 2008/08/18 23:05:37 miod Exp $ */
/* $NetBSD: cpu.h,v 1.41 1999/10/21 20:01:36 ragge Exp $ */
/*
#define CPU_INFO_FOREACH(cii, ci) \
for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL)
+struct clockframe {
+ int pc;
+ int ps;
+};
+
/*
* All cpu-dependent info is kept in this struct. Pointer to the
* struct for the current cpu is set up in locore.c.
void (*cpu_reboot)(int); /* Cpu dependent reboot call */
void (*cpu_clrf)(void); /* Clear cold/warm start flags */
void (*cpu_subconf)(struct device *);/*config cpu dep. devs */
+ void (*cpu_hardclock)(struct clockframe *); /* hardclock handler */
};
extern struct cpu_dep *dep_call; /* Holds pointer to current CPU struct. */
-struct clockframe {
- int pc;
- int ps;
-};
-
extern struct device *booted_from;
extern int mastercpu;
extern int bootdev;
-# $OpenBSD: genassym.cf,v 1.9 2007/05/16 05:19:15 miod Exp $
+# $OpenBSD: genassym.cf,v 1.10 2008/08/18 23:05:38 miod Exp $
# $NetBSD: genassym.cf,v 1.10 1999/11/19 22:09:55 ragge Exp $
#
# Copyright (c) 1997 Ludd, University of Lule}, Sweden.
struct cpu_dep
member MCHK cpu_mchk
member MEMERR cpu_memerr
+member HARDCLOCK cpu_hardclock
struct cpu_info
member ci_curproc
export SYS_exit
export VAX_TYP_UV2
-export VAX_TYP_8SS
-export VAX_BTYP_46
-export VAX_BTYP_48
-/* $OpenBSD: intvec.s,v 1.21 2007/05/10 17:59:27 deraadt Exp $ */
+/* $OpenBSD: intvec.s,v 1.22 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: intvec.s,v 1.39 1999/06/28 08:20:48 itojun Exp $ */
/*
# at when returning from a intentional test.
#
mcheck: .globl mcheck
- tstl _cold # Ar we still in coldstart?
+ tstl _cold # Are we still in coldstart?
bneq L4 # Yes.
pushr $0x7f
.align 2
.globl transl_v # 20: Translation violation
transl_v:
- pushr $0x3f
+ PUSHR
pushl 28(sp)
pushl 28(sp)
calls $2,_pmap_simulref
tstl r0
bneq 1f
- popr $0x3f
+ POPR
addl2 $8,sp
rei
-1: popr $0x3f
+1: POPR
brb access_v
.align 2
POPR
rei
-ENTRY(sbiflt);
+ENTRY(sbiflt)
pushab sbifltmsg
calls $1, _panic
TRAPCALL(ddbtrap, T_KDBTRAP)
- .align 2
- .globl hardclock
-hardclock: mtpr $0xc1,$PR_ICCS # Reset interrupt flag
- pushr $0x3f
-#ifdef VAX46
- cmpl _vax_boardtype,$VAX_BTYP_46
- bneq 1f
- movl _ka46_cpu,r0
- clrl 0x1c(r0)
-#endif
-1: pushl sp
- addl2 $24,(sp)
- calls $1,_hardclock
- popr $0x3f
- rei
+ENTRY(hardclock)
+ mtpr $0xc1,$PR_ICCS # Reset interrupt flag
+ PUSHR
+ pushl sp
+ addl2 $24,(sp)
+ movl _dep_call,r0
+ calls $1,*HARDCLOCK(r0)
+ incl _clock_intrcnt+EC_COUNT # increment low longword
+ adwc $0,_clock_intrcnt+EC_COUNT+4 # add any carry to hi longword
+ POPR
+ rei
/*
* Main routine for traps; all go through this.
-/* $OpenBSD: ka410.c,v 1.9 2002/03/14 01:26:48 millert Exp $ */
+/* $OpenBSD: ka410.c,v 1.10 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka410.c,v 1.21 1999/09/06 19:52:53 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
ka410_halt,
ka410_reboot,
ka410_clrf,
+ NULL,
+ hardclock
};
-/* $OpenBSD: ka43.c,v 1.11 2008/08/15 22:38:23 miod Exp $ */
+/* $OpenBSD: ka43.c,v 1.12 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka43.c,v 1.19 1999/09/06 19:52:53 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
ka43_halt,
ka43_reboot,
ka43_clrf,
+ NULL,
+ hardclock
};
static volatile struct ka43_cpu *ka43_cpu = (void *)KA43_CPU_BASE;
-/* $OpenBSD: ka46.c,v 1.8 2008/08/15 22:38:23 miod Exp $ */
+/* $OpenBSD: ka46.c,v 1.9 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka46.c,v 1.12 2000/03/04 07:27:49 matt Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
static void ka46_halt(void);
static void ka46_reboot(int);
static void ka46_cache_enable(void);
+static void ka46_hardclock(struct clockframe *);
struct vs_cpu *ka46_cpu;
2, /* SCB pages */
ka46_halt,
ka46_reboot,
+ NULL,
+ NULL,
+ ka46_hardclock
};
((u_int8_t *) clk_page)[KA46_CPMBX] = KA46_HLT_BOOT;
asm("halt");
}
+
+static void
+ka46_hardclock(struct clockframe *cf)
+{
+ ka46_cpu->vc_diagtimu = 0;
+ hardclock(cf);
+}
-/* $OpenBSD: ka48.c,v 1.9 2008/08/15 22:38:23 miod Exp $ */
+/* $OpenBSD: ka48.c,v 1.10 2008/08/18 23:05:38 miod Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
* All rights reserved.
2, /* SCB pages */
ka48_halt,
ka48_reboot,
+ NULL,
+ NULL,
+ hardclock
};
-/* $OpenBSD: ka49.c,v 1.8 2008/08/15 22:38:23 miod Exp $ */
+/* $OpenBSD: ka49.c,v 1.9 2008/08/18 23:05:38 miod Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden.
* All rights reserved.
2, /* SCB pages */
ka49_halt,
ka49_reboot,
+ NULL,
+ NULL,
+ hardclock
};
-/* $OpenBSD: ka53.c,v 1.6 2008/08/15 22:38:23 miod Exp $ */
+/* $OpenBSD: ka53.c,v 1.7 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka53.c,v 1.2 2000/06/04 02:19:27 matt Exp $ */
/*
* Copyright (c) 2002 Hugh Graham.
2, /* SCB pages */
generic_halt,
generic_reboot,
+ NULL,
+ NULL,
+ hardclock
};
void
-/* $OpenBSD: ka630.c,v 1.9 2003/06/02 23:27:58 millert Exp $ */
+/* $OpenBSD: ka630.c,v 1.10 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka630.c,v 1.17 1999/09/06 19:52:52 ragge Exp $ */
/*-
* Copyright (c) 1982, 1988, 1990, 1993
ka630_halt,
ka630_reboot,
ka630_clrf,
+ NULL,
+ hardclock
};
/*
-/* $OpenBSD: ka650.c,v 1.16 2008/08/15 22:47:45 miod Exp $ */
+/* $OpenBSD: ka650.c,v 1.17 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka650.c,v 1.25 2001/04/27 15:02:37 ragge Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
2, /* SCB pages */
ka650_halt,
ka650_reboot,
+ NULL,
+ NULL,
+ hardclock
};
/*
-/* $OpenBSD: ka660.c,v 1.4 2002/09/28 06:25:11 hugh Exp $ */
+/* $OpenBSD: ka660.c,v 1.5 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka660.c,v 1.3 2000/06/29 07:14:27 mrg Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden.
2, /* SCB pages */
generic_halt,
generic_reboot,
+ NULL,
+ NULL,
+ hardclock
};
-/* $OpenBSD: ka670.c,v 1.8 2006/06/30 16:14:31 miod Exp $ */
+/* $OpenBSD: ka670.c,v 1.9 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka670.c,v 1.4 2000/03/13 23:52:35 soren Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden.
2, /* SCB pages */
generic_halt,
generic_reboot,
- 0,
+ NULL,
+ NULL,
+ hardclock
};
#define KA670_MC_RESTART 0x00008000 /* Restart possible*/
-/* $OpenBSD: ka680.c,v 1.11 2008/08/15 22:38:23 miod Exp $ */
+/* $OpenBSD: ka680.c,v 1.12 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka680.c,v 1.3 2001/01/28 21:01:53 ragge Exp $ */
/*
* Copyright (c) 2002 Hugh Graham.
2, /* SCB pages */
generic_halt,
generic_reboot,
+ NULL,
+ NULL,
+ hardclock
};
void
-/* $OpenBSD: ka750.c,v 1.10 2003/06/02 23:27:59 millert Exp $ */
+/* $OpenBSD: ka750.c,v 1.11 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka750.c,v 1.30 1999/08/14 11:30:48 ragge Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 The Regents of the University of California.
generic_clkwrite,
1, /* ~VUPS */
4, /* SCB pages */
- 0, /* halt call */
- 0, /* Reboot call */
+ NULL, /* halt call */
+ NULL, /* Reboot call */
ka750_clrf,
+ NULL,
+ NULL,
+ hardclock
};
static caddr_t mcraddr[4]; /* XXX */
-/* $OpenBSD: ka780.c,v 1.9 2003/06/02 23:27:59 millert Exp $ */
+/* $OpenBSD: ka780.c,v 1.10 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka780.c,v 1.14 1999/08/07 10:36:49 ragge Exp $ */
/*-
* Copyright (c) 1982, 1986, 1988 The Regents of the University of California.
generic_clkwrite,
2, /* ~VUPS */
5, /* SCB pages */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ hardclock
};
/*
-/* $OpenBSD: ka820.c,v 1.12 2003/11/10 21:05:06 miod Exp $ */
+/* $OpenBSD: ka820.c,v 1.13 2008/08/18 23:05:38 miod Exp $ */
/* $NetBSD: ka820.c,v 1.22 2000/06/04 02:19:27 matt Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
ka820_clkwrite,
3, /* ~VUPS */
5, /* SCB pages */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ hardclock
};
struct cfattach cpu_bi_ca = {
-/* $OpenBSD: ka860.c,v 1.9 2006/07/20 19:08:15 miod Exp $ */
+/* $OpenBSD: ka860.c,v 1.10 2008/08/18 23:05:39 miod Exp $ */
/* $NetBSD: ka860.c,v 1.15 1999/08/07 10:36:49 ragge Exp $ */
/*
* Copyright (c) 1986, 1988 Regents of the University of California.
0, /* Halt call, nothing special */
ka86_reboot,
ka86_clrf,
+ NULL,
+ hardclock
};
/*
-/* $OpenBSD: vxt.c,v 1.3 2008/08/15 22:41:48 miod Exp $ */
+/* $OpenBSD: vxt.c,v 1.4 2008/08/18 23:05:39 miod Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
* All rights reserved.
2, /* SCB pages */
vxt_halt,
vxt_reboot,
+ NULL,
+ NULL,
+ hardclock
};
void