| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: machdep.c,v 1.135 2011/07/01 18:54:33 dyoung Exp $ */ | | 1 | /* $NetBSD: machdep.c,v 1.136 2011/07/28 04:06:09 uebayasi Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2000 Soren S. Jorvang | | 4 | * Copyright (c) 2000 Soren S. Jorvang |
5 | * Copyright (c) 2001, 2002, 2003 Rafal K. Boni | | 5 | * Copyright (c) 2001, 2002, 2003 Rafal K. Boni |
6 | * All rights reserved. | | 6 | * All rights reserved. |
7 | * | | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | | 8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | | 9 | * modification, are permitted provided that the following conditions |
10 | * are met: | | 10 | * are met: |
11 | * 1. Redistributions of source code must retain the above copyright | | 11 | * 1. Redistributions of source code must retain the above copyright |
12 | * notice, this list of conditions and the following disclaimer. | | 12 | * notice, this list of conditions and the following disclaimer. |
13 | * 2. Redistributions in binary form must reproduce the above copyright | | 13 | * 2. Redistributions in binary form must reproduce the above copyright |
14 | * notice, this list of conditions and the following disclaimer in the | | 14 | * notice, this list of conditions and the following disclaimer in the |
| @@ -24,27 +24,27 @@ | | | @@ -24,27 +24,27 @@ |
24 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | | 24 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
25 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | | 25 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
26 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 26 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
27 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | | 27 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
28 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | | 28 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
29 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | | 29 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
30 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | | 30 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
31 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | | 31 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | | 32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
33 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 33 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
34 | */ | | 34 | */ |
35 | | | 35 | |
36 | #include <sys/cdefs.h> | | 36 | #include <sys/cdefs.h> |
37 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.135 2011/07/01 18:54:33 dyoung Exp $"); | | 37 | __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.136 2011/07/28 04:06:09 uebayasi Exp $"); |
38 | | | 38 | |
39 | #include "opt_ddb.h" | | 39 | #include "opt_ddb.h" |
40 | #include "opt_kgdb.h" | | 40 | #include "opt_kgdb.h" |
41 | #include "opt_execfmt.h" | | 41 | #include "opt_execfmt.h" |
42 | #include "opt_cputype.h" | | 42 | #include "opt_cputype.h" |
43 | #include "opt_mips_cache.h" | | 43 | #include "opt_mips_cache.h" |
44 | #include "opt_modular.h" | | 44 | #include "opt_modular.h" |
45 | | | 45 | |
46 | #define __INTR_PRIVATE | | 46 | #define __INTR_PRIVATE |
47 | | | 47 | |
48 | #include <sys/param.h> | | 48 | #include <sys/param.h> |
49 | #include <sys/systm.h> | | 49 | #include <sys/systm.h> |
50 | #include <sys/kernel.h> | | 50 | #include <sys/kernel.h> |
| @@ -571,27 +571,27 @@ mach_init(int argc, int32_t argv32[], ui | | | @@ -571,27 +571,27 @@ mach_init(int argc, int32_t argv32[], ui |
571 | | | 571 | |
572 | physmem = arcsmem = 0; | | 572 | physmem = arcsmem = 0; |
573 | mem_cluster_cnt = 0; | | 573 | mem_cluster_cnt = 0; |
574 | mem = NULL; | | 574 | mem = NULL; |
575 | | | 575 | |
576 | #ifdef DEBUG | | 576 | #ifdef DEBUG |
577 | i = 0; | | 577 | i = 0; |
578 | mem = NULL; | | 578 | mem = NULL; |
579 | | | 579 | |
580 | do { | | 580 | do { |
581 | if ((mem = arcbios_GetMemoryDescriptor(mem)) != NULL) { | | 581 | if ((mem = arcbios_GetMemoryDescriptor(mem)) != NULL) { |
582 | i++; | | 582 | i++; |
583 | printf("Mem block %d: type %d, " | | 583 | printf("Mem block %d: type %d, " |
584 | "base 0x%04lx, size 0x%04lx\n", | | 584 | "base 0x%04"PRIx32", size 0x%04"PRIx32"\n", |
585 | i, mem->Type, mem->BasePage, mem->PageCount); | | 585 | i, mem->Type, mem->BasePage, mem->PageCount); |
586 | } | | 586 | } |
587 | } while (mem != NULL); | | 587 | } while (mem != NULL); |
588 | #endif | | 588 | #endif |
589 | | | 589 | |
590 | /* | | 590 | /* |
591 | * XXX This code assumes that ARCS provides the memory | | 591 | * XXX This code assumes that ARCS provides the memory |
592 | * XXX sorted in ascending order. | | 592 | * XXX sorted in ascending order. |
593 | */ | | 593 | */ |
594 | mem = NULL; | | 594 | mem = NULL; |
595 | for (i = 0; mem_cluster_cnt < VM_PHYSSEG_MAX; i++) { | | 595 | for (i = 0; mem_cluster_cnt < VM_PHYSSEG_MAX; i++) { |
596 | mem = arcbios_GetMemoryDescriptor(mem); | | 596 | mem = arcbios_GetMemoryDescriptor(mem); |
597 | | | 597 | |