| @@ -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 | |
55 | int physmem; | | 55 | int physmem; |
56 | char machine[] = MACHINE; | | 56 | char machine[] = MACHINE; |
57 | char machine_arch[] = MACHINE_ARCH; | | 57 | char machine_arch[] = MACHINE_ARCH; |
58 | char cpu_model[] = "Archimedes"; | | 58 | char 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. */ |
61 | struct cpu_info cpu_info_store; | | 61 | struct 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. */ |
64 | i2c_tag_t acorn26_i2c_tag; | | 69 | i2c_tag_t acorn26_i2c_tag; |
65 | | | 70 | |
66 | struct vm_map *phys_map = NULL; | | 71 | struct vm_map *phys_map = NULL; |
67 | struct vm_map *mb_map = NULL; /* and ever more shall be so */ | | 72 | struct vm_map *mb_map = NULL; /* and ever more shall be so */ |
68 | | | 73 | |
69 | int waittime = -1; | | 74 | int waittime = -1; |
70 | | | 75 | |
71 | void | | 76 | void |
72 | cpu_reboot(howto, b) | | 77 | cpu_reboot(howto, b) |
73 | int howto; | | 78 | int howto; |
74 | char *b; | | 79 | char *b; |