-/* $OpenBSD: cpu.h,v 1.27 2008/07/18 23:43:31 art Exp $ */
+/* $OpenBSD: cpu.h,v 1.28 2008/08/15 22:38:20 miod Exp $ */
/* $NetBSD: cpu.h,v 1.41 1999/10/21 20:01:36 ragge Exp $ */
/*
* struct for the current cpu is set up in locore.c.
*/
struct cpu_dep {
- void (*cpu_steal_pages)(void); /* pmap init before mm is on */
+ void (*cpu_init)(void); /* pmap init before mm is on */
int (*cpu_mchk)(caddr_t); /* Machine check handling */
void (*cpu_memerr)(void); /* Memory subsystem errors */
/* Autoconfiguration */
#define setsoftnet() mtpr(IPL_SOFTNET,PR_SIRR)
#define setsoftclock() mtpr(IPL_SOFTCLOCK,PR_SIRR)
-#define todr() mfpr(PR_TODR)
/*
* Preempt the current process if in interrupt from user mode,
* or after the current trap/syscall if in system mode.
-/* $OpenBSD: ka43.c,v 1.10 2006/06/30 16:14:31 miod Exp $ */
+/* $OpenBSD: ka43.c,v 1.11 2008/08/15 22:38:23 miod Exp $ */
/* $NetBSD: ka43.c,v 1.19 1999/09/06 19:52:53 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
#include <machine/clock.h>
static void ka43_conf(void);
-static void ka43_steal_pages(void);
+static void ka43_init(void);
static int ka43_mchk(caddr_t);
static void ka43_memerr(void);
struct cpu_dep ka43_calls = {
- ka43_steal_pages,
+ ka43_init,
ka43_mchk,
ka43_memerr,
ka43_conf,
ka43_clrf,
};
-/*
- * ka43_steal_pages() is called with MMU disabled, after that call MMU gets
- * enabled. Thus we initialize these four pointers with physical addresses,
- * but before leving ka43_steal_pages() we reset them to virtual addresses.
- */
static volatile struct ka43_cpu *ka43_cpu = (void *)KA43_CPU_BASE;
static volatile u_int *ka43_creg = (void *)KA43_CH2_CREG;
static volatile u_int *ka43_ctag = (void *)KA43_CT2_BASE;
}
-/*
- * The interface for communication with the LANCE ethernet controller
- * is setup in the xxx_steal_pages() routine. We decrease highest
- * available address by 64K and use this area as communication buffer.
- */
-
void
-ka43_steal_pages()
+ka43_init()
{
int val;
-/* $OpenBSD: ka46.c,v 1.7 2002/07/21 19:28:50 hugh Exp $ */
+/* $OpenBSD: ka46.c,v 1.8 2008/08/15 22:38:23 miod Exp $ */
/* $NetBSD: ka46.c,v 1.12 2000/03/04 07:27:49 matt Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
#include <machine/vsbus.h>
static void ka46_conf(void);
-static void ka46_steal_pages(void);
+static void ka46_init(void);
static void ka46_memerr(void);
static int ka46_mchk(caddr_t);
static void ka46_halt(void);
* Declaration of 46-specific calls.
*/
struct cpu_dep ka46_calls = {
- ka46_steal_pages,
+ ka46_init,
ka46_mchk,
ka46_memerr,
ka46_conf,
}
void
-ka46_steal_pages()
+ka46_init()
{
/* Turn on caches (to speed up execution a bit) */
-/* $OpenBSD: ka48.c,v 1.8 2002/07/21 19:28:51 hugh Exp $ */
+/* $OpenBSD: ka48.c,v 1.9 2008/08/15 22:38:23 miod Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
* All rights reserved.
#include <machine/vsbus.h>
static void ka48_conf(void);
-static void ka48_steal_pages(void);
+static void ka48_init(void);
static void ka48_memerr(void);
static int ka48_mchk(caddr_t);
static void ka48_halt(void);
* Declaration of 48-specific calls.
*/
struct cpu_dep ka48_calls = {
- ka48_steal_pages,
+ ka48_init,
ka48_mchk,
ka48_memerr,
ka48_conf,
}
void
-ka48_steal_pages()
+ka48_init()
{
/* Turn on caches (to speed up execution a bit) */
ka48_cache_enable();
-/* $OpenBSD: ka49.c,v 1.7 2002/07/21 19:28:51 hugh Exp $ */
+/* $OpenBSD: ka49.c,v 1.8 2008/08/15 22:38:23 miod Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden.
* All rights reserved.
static void ka49_reboot(int);
static void ka49_softmem(void *);
static void ka49_hardmem(void *);
-static void ka49_steal_pages(void);
+static void ka49_init(void);
static void ka49_cache_enable(void);
static void ka49_halt(void);
* Declaration of 49-specific calls.
*/
struct cpu_dep ka49_calls = {
- ka49_steal_pages,
+ ka49_init,
ka49_mchk,
ka49_memerr,
ka49_conf,
}
void
-ka49_steal_pages()
+ka49_init()
{
/*
* Get the soft and hard memory error vectors now.
-/* $OpenBSD: ka53.c,v 1.5 2002/09/21 13:42:43 hugh Exp $ */
+/* $OpenBSD: ka53.c,v 1.6 2008/08/15 22:38:23 miod Exp $ */
/* $NetBSD: ka53.c,v 1.2 2000/06/04 02:19:27 matt Exp $ */
/*
* Copyright (c) 2002 Hugh Graham.
static int ka53_mchk(caddr_t);
static void ka53_softmem(void *);
static void ka53_hardmem(void *);
-static void ka53_steal_pages(void);
+static void ka53_init(void);
static void ka53_cache_enable(void);
/*
* Declaration of 680-specific calls.
*/
struct cpu_dep ka53_calls = {
- ka53_steal_pages,
+ ka53_init,
ka53_mchk,
ka53_memerr,
ka53_conf,
}
void
-ka53_steal_pages()
+ka53_init()
{
/*
-/* $OpenBSD: ka650.c,v 1.14 2008/08/14 11:41:30 martin Exp $ */
+/* $OpenBSD: ka650.c,v 1.15 2008/08/15 22:38:23 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.
static int uvaxIII_mchk(caddr_t);
struct cpu_dep ka650_calls = {
- 0, /* No special page stealing anymore */
+ NULL,
uvaxIII_mchk,
uvaxIII_memerr,
uvaxIII_conf,
-/* $OpenBSD: ka680.c,v 1.10 2002/09/21 13:42:43 hugh Exp $ */
+/* $OpenBSD: ka680.c,v 1.11 2008/08/15 22:38:23 miod Exp $ */
/* $NetBSD: ka680.c,v 1.3 2001/01/28 21:01:53 ragge Exp $ */
/*
* Copyright (c) 2002 Hugh Graham.
static void ka680_cache_enable(void);
static void ka680_softmem(void *);
static void ka680_hardmem(void *);
-static void ka680_steal_pages(void);
+static void ka680_init(void);
static void ka680_memerr(void);
static int ka680_mchk(caddr_t);
* Declaration of KA680-specific calls.
*/
struct cpu_dep ka680_calls = {
- ka680_steal_pages,
+ ka680_init,
ka680_mchk,
ka680_memerr,
ka680_conf,
}
void
-ka680_steal_pages()
+ka680_init()
{
/*
* Get the soft and hard memory error vectors now.
-/* $OpenBSD: pmap.c,v 1.45 2008/08/14 11:41:30 martin Exp $ */
+/* $OpenBSD: pmap.c,v 1.46 2008/08/15 22:38:23 miod Exp $ */
/* $NetBSD: pmap.c,v 1.74 1999/11/13 21:32:25 matt Exp $ */
/*
* Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
avail_start = scb_init(avail_start);
bcopy((caddr_t)proc0paddr + REDZONEADDR, 0, sizeof(struct rpb));
- if (dep_call->cpu_steal_pages)
- (*dep_call->cpu_steal_pages)();
+ if (dep_call->cpu_init)
+ (*dep_call->cpu_init)();
avail_start = ROUND_PAGE(avail_start);
virtual_avail = ROUND_PAGE(virtual_avail);
-/* $OpenBSD: vxt.c,v 1.1 2006/08/27 16:55:41 miod Exp $ */
+/* $OpenBSD: vxt.c,v 1.2 2008/08/15 22:38:23 miod Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
* All rights reserved.
#include <machine/clock.h>
static void vxt_conf(void);
-static void vxt_steal_pages(void);
+static void vxt_init(void);
static void vxt_memerr(void);
static int vxt_mchk(caddr_t);
static void vxt_halt(void);
*/
struct cpu_dep vxt_calls = {
- vxt_steal_pages,
+ vxt_init,
vxt_mchk,
vxt_memerr,
vxt_conf,
}
void
-vxt_steal_pages()
+vxt_init()
{
/* Turn on caches (to speed up execution a bit) */
vxt_cache_enable();