summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-05-15 20:18:05 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-05-15 20:18:05 +0000
commit9eb365ae9a9ea711da6311d7352766c67aa2754b (patch)
tree67222baccf33171d2cbeb30e41312800457a50e8
parent642c4be2e817c68432d30827b772d5776767d01b (diff)
Initialize a teeny few more globals to reasonable values to allow for printf()
to work as soon as cn_tab is initialized. Allows us to correctly printf or panic early on unrecognized systems. This used to be the case but got lost a long time ago.
-rw-r--r--sys/arch/m88k/m88k/m88k_machdep.c8
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c11
2 files changed, 13 insertions, 6 deletions
diff --git a/sys/arch/m88k/m88k/m88k_machdep.c b/sys/arch/m88k/m88k/m88k_machdep.c
index cc4f89dfe1d..eb4bbe63d64 100644
--- a/sys/arch/m88k/m88k/m88k_machdep.c
+++ b/sys/arch/m88k/m88k/m88k_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88k_machdep.c,v 1.55 2013/02/17 18:07:36 miod Exp $ */
+/* $OpenBSD: m88k_machdep.c,v 1.56 2013/05/15 20:18:04 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -95,7 +95,11 @@ cpuid_t master_cpu;
__cpu_simple_lock_t cmmu_cpu_lock = __SIMPLELOCK_UNLOCKED;
#endif
-struct cpu_info m88k_cpus[MAX_CPUS];
+struct cpu_info m88k_cpus[MAX_CPUS] = {
+#ifndef MULTIPROCESSOR
+ { .ci_flags = CIF_ALIVE | CIF_PRIMARY }
+#endif
+};
const struct cmmu_p *cmmu;
/*
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index bae03a04ab0..c000b1ef7b5 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.249 2013/05/14 20:30:47 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.250 2013/05/15 20:18:04 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -119,6 +119,9 @@ extern int kernelstart;
register_t kernel_vbr;
intrhand_t intr_handlers[NVMEINTR];
+static u_int dummy_getipl(void) { return 0; }
+static u_int dummy_setipl(u_int whatever) { return 0; }
+
/* board dependent pointers */
void (*md_interrupt_func_ptr)(struct trapframe *);
#ifdef M88110
@@ -126,9 +129,9 @@ int (*md_nmi_func_ptr)(struct trapframe *);
void (*md_nmi_wrapup_func_ptr)(struct trapframe *);
#endif
void (*md_init_clocks)(void);
-u_int (*md_getipl)(void);
-u_int (*md_setipl)(u_int);
-u_int (*md_raiseipl)(u_int);
+u_int (*md_getipl)(void) = dummy_getipl;
+u_int (*md_setipl)(u_int) = dummy_setipl;
+u_int (*md_raiseipl)(u_int) = dummy_setipl;
#ifdef MULTIPROCESSOR
void (*md_send_ipi)(int, cpuid_t);
#endif