Mon Mar 5 12:15:24 2012 UTC ()
increase kernel VM space.
fixed problem can't boot on WS011SH (probably other 128MB RAM model too).


(nonaka)
diff -r1.13 -r1.14 src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c

cvs diff -r1.13 -r1.14 src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c (expand / switch to unified diff)

--- src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c 2011/07/19 15:37:39 1.13
+++ src/sys/arch/hpcarm/hpcarm/pxa2x0_hpc_machdep.c 2012/03/05 12:15:23 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pxa2x0_hpc_machdep.c,v 1.13 2011/07/19 15:37:39 dyoung Exp $ */ 1/* $NetBSD: pxa2x0_hpc_machdep.c,v 1.14 2012/03/05 12:15:23 nonaka Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1994-1998 Mark Brinicombe. 4 * Copyright (c) 1994-1998 Mark Brinicombe.
5 * Copyright (c) 1994 Brini. 5 * Copyright (c) 1994 Brini.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * This code is derived from software written for Brini by Mark Brinicombe 8 * This code is derived from software written for Brini by Mark Brinicombe
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -30,27 +30,27 @@ @@ -30,27 +30,27 @@
30 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 30 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * SUCH DAMAGE. 35 * SUCH DAMAGE.
36 */ 36 */
37 37
38/* 38/*
39 * Machine dependent functions for kernel setup. 39 * Machine dependent functions for kernel setup.
40 */ 40 */
41 41
42#include <sys/cdefs.h> 42#include <sys/cdefs.h>
43__KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_machdep.c,v 1.13 2011/07/19 15:37:39 dyoung Exp $"); 43__KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_machdep.c,v 1.14 2012/03/05 12:15:23 nonaka Exp $");
44 44
45#include "opt_ddb.h" 45#include "opt_ddb.h"
46#include "opt_dram_pages.h" 46#include "opt_dram_pages.h"
47#include "opt_modular.h" 47#include "opt_modular.h"
48#include "opt_pmap_debug.h" 48#include "opt_pmap_debug.h"
49#include "ksyms.h" 49#include "ksyms.h"
50 50
51#include <sys/param.h> 51#include <sys/param.h>
52#include <sys/systm.h> 52#include <sys/systm.h>
53#include <sys/kernel.h> 53#include <sys/kernel.h>
54#include <sys/reboot.h> 54#include <sys/reboot.h>
55#include <sys/proc.h> 55#include <sys/proc.h>
56#include <sys/msgbuf.h> 56#include <sys/msgbuf.h>
@@ -92,28 +92,35 @@ __KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_m @@ -92,28 +92,35 @@ __KERNEL_RCSID(0, "$NetBSD: pxa2x0_hpc_m
92#include <machine/signal.h> 92#include <machine/signal.h>
93 93
94#include <dev/hpc/apm/apmvar.h> 94#include <dev/hpc/apm/apmvar.h>
95#include <dev/ic/comreg.h> 95#include <dev/ic/comreg.h>
96 96
97#include <sys/mount.h> 97#include <sys/mount.h>
98#include <nfs/rpcv2.h> 98#include <nfs/rpcv2.h>
99#include <nfs/nfsproto.h> 99#include <nfs/nfsproto.h>
100#include <nfs/nfs.h> 100#include <nfs/nfs.h>
101#include <nfs/nfsmount.h> 101#include <nfs/nfsmount.h>
102 102
103/* Kernel text starts 2MB in from the bottom of the kernel address space. */ 103/* Kernel text starts 2MB in from the bottom of the kernel address space. */
104#define KERNEL_TEXT_BASE (KERNEL_BASE + 0x00200000) 104#define KERNEL_TEXT_BASE (KERNEL_BASE + 0x00200000)
105#define KERNEL_VM_BASE (KERNEL_BASE + 0x00C00000) 105#ifndef KERNEL_VM_BASE
106#define KERNEL_VM_SIZE 0x05000000 106#define KERNEL_VM_BASE (KERNEL_BASE + 0x01000000)
 107#endif
 108
 109/*
 110 * The range 0xc1000000 - 0xccffffff is available for kernel VM space
 111 * Core-logic registers and I/O mappings occupy 0xfd000000 - 0xffffffff
 112 */
 113#define KERNEL_VM_SIZE 0x0c000000
107 114
108/* 115/*
109 * Address to call from cpu_reset() to reset the machine. 116 * Address to call from cpu_reset() to reset the machine.
110 * This is machine architecture dependent as it varies depending 117 * This is machine architecture dependent as it varies depending
111 * on where the ROM appears when you turn the MMU off. 118 * on where the ROM appears when you turn the MMU off.
112 */ 119 */
113u_int cpu_reset_address = 0; 120u_int cpu_reset_address = 0;
114 121
115/* Define various stack sizes in pages */ 122/* Define various stack sizes in pages */
116#define IRQ_STACK_SIZE 1 123#define IRQ_STACK_SIZE 1
117#define ABT_STACK_SIZE 1 124#define ABT_STACK_SIZE 1
118#define UND_STACK_SIZE 1 125#define UND_STACK_SIZE 1
119 126
@@ -138,29 +145,28 @@ extern char *boot_args; @@ -138,29 +145,28 @@ extern char *boot_args;
138extern char boot_file[16]; 145extern char boot_file[16];
139 146
140extern vaddr_t msgbufphys; 147extern vaddr_t msgbufphys;
141 148
142extern u_int data_abort_handler_address; 149extern u_int data_abort_handler_address;
143extern u_int prefetch_abort_handler_address; 150extern u_int prefetch_abort_handler_address;
144extern u_int undefined_handler_address; 151extern u_int undefined_handler_address;
145extern int end; 152extern int end;
146 153
147#ifdef PMAP_DEBUG 154#ifdef PMAP_DEBUG
148extern int pmap_debug_level; 155extern int pmap_debug_level;
149#endif /* PMAP_DEBUG */ 156#endif /* PMAP_DEBUG */
150 157
151#define KERNEL_PT_VMEM 0 /* Page table for mapping video memory */ 158#define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */
152#define KERNEL_PT_SYS 1 /* Page table for mapping proc0 zero page */ 159#define KERNEL_PT_KERNEL 1 /* Page table for mapping kernel */
153#define KERNEL_PT_KERNEL 2 /* Page table for mapping kernel */ 
154#define KERNEL_PT_KERNEL_NUM 4 160#define KERNEL_PT_KERNEL_NUM 4
155#define KERNEL_PT_VMDATA (KERNEL_PT_KERNEL + KERNEL_PT_KERNEL_NUM) 161#define KERNEL_PT_VMDATA (KERNEL_PT_KERNEL + KERNEL_PT_KERNEL_NUM)
156 /* Page tables for mapping kernel VM */ 162 /* Page tables for mapping kernel VM */
157#define KERNEL_PT_VMDATA_NUM 4 /* start with 16MB of KVM */ 163#define KERNEL_PT_VMDATA_NUM 4 /* start with 16MB of KVM */
158#define NUM_KERNEL_PTS (KERNEL_PT_VMDATA + KERNEL_PT_VMDATA_NUM) 164#define NUM_KERNEL_PTS (KERNEL_PT_VMDATA + KERNEL_PT_VMDATA_NUM)
159 165
160pv_addr_t kernel_pt_table[NUM_KERNEL_PTS]; 166pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
161 167
162pv_addr_t minidataclean; 168pv_addr_t minidataclean;
163 169
164/* Prototypes */ 170/* Prototypes */
165void data_abort_handler(trapframe_t *); 171void data_abort_handler(trapframe_t *);
166void prefetch_abort_handler(trapframe_t *); 172void prefetch_abort_handler(trapframe_t *);