Sat Jan 3 18:15:11 2009 UTC ()
Initialise cpu_info_store so that we start up with a valid curlwp.


(bjh21)
diff -r1.24 -r1.25 src/sys/arch/acorn26/acorn26/machdep.c

cvs diff -r1.24 -r1.25 src/sys/arch/acorn26/acorn26/Attic/machdep.c (expand / switch to unified diff)

--- src/sys/arch/acorn26/acorn26/Attic/machdep.c 2008/11/11 06:46:40 1.24
+++ src/sys/arch/acorn26/acorn26/Attic/machdep.c 2009/01/03 18:15:11 1.25
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: machdep.c,v 1.24 2008/11/11 06:46:40 dyoung Exp $ */ 1/* $NetBSD: machdep.c,v 1.25 2009/01/03 18:15:11 bjh21 Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1998 Ben Harris 4 * Copyright (c) 1998 Ben Harris
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -22,53 +22,58 @@ @@ -22,53 +22,58 @@
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29/* 29/*
30 * machdep.c -- standard machine-dependent functions 30 * machdep.c -- standard machine-dependent functions
31 */ 31 */
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34 34
35__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.24 2008/11/11 06:46:40 dyoung Exp $"); 35__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.25 2009/01/03 18:15:11 bjh21 Exp $");
36 36
37#include <sys/buf.h> 37#include <sys/buf.h>
38#include <sys/kernel.h> 38#include <sys/kernel.h>
39#include <sys/mbuf.h> 39#include <sys/mbuf.h>
40#include <sys/mount.h> 40#include <sys/mount.h>
41#include <sys/reboot.h> 41#include <sys/reboot.h>
42#include <sys/sysctl.h> 42#include <sys/sysctl.h>
43#include <sys/systm.h> 43#include <sys/systm.h>
44#include <sys/cpu.h> 44#include <sys/cpu.h>
45#include <sys/device.h> 45#include <sys/device.h>
46 46
47#include <dev/i2c/i2cvar.h> 47#include <dev/i2c/i2cvar.h>
48#include <dev/i2c/pcf8583var.h> 48#include <dev/i2c/pcf8583var.h>
49 49
50#include <uvm/uvm_extern.h> 50#include <uvm/uvm_extern.h>
51 51
52#include <machine/machdep.h> 52#include <machine/machdep.h>
53#include <machine/memcreg.h> 53#include <machine/memcreg.h>
54 54
55int physmem; 55int physmem;
56char machine[] = MACHINE; 56char machine[] = MACHINE;
57char machine_arch[] = MACHINE_ARCH; 57char machine_arch[] = MACHINE_ARCH;
58char cpu_model[] = "Archimedes"; 58char cpu_model[] = "Archimedes";
59 59
60/* Our exported CPU info; we can have only one. */ 60/* Our exported CPU info; we can have only one. */
61struct cpu_info cpu_info_store; 61struct cpu_info cpu_info_store = {
 62 .ci_cpl = IPL_HIGH,
 63#ifndef PROCESS_ID_IS_CURLWP
 64 .ci_curlwp = &lwp0,
 65#endif
 66};
62 67
63/* For reading NVRAM during bootstrap. */ 68/* For reading NVRAM during bootstrap. */
64i2c_tag_t acorn26_i2c_tag; 69i2c_tag_t acorn26_i2c_tag;
65 70
66struct vm_map *phys_map = NULL; 71struct vm_map *phys_map = NULL;
67struct vm_map *mb_map = NULL; /* and ever more shall be so */ 72struct vm_map *mb_map = NULL; /* and ever more shall be so */
68 73
69int waittime = -1; 74int waittime = -1;
70 75
71void 76void
72cpu_reboot(howto, b) 77cpu_reboot(howto, b)
73 int howto; 78 int howto;
74 char *b; 79 char *b;