Fri Aug 26 09:10:41 2011 UTC ()
Add checks for architectures that need a check for VM_MIN_ADDRESS


(reinoud)
diff -r1.10 -r1.11 src/sys/arch/acorn26/include/vmparam.h
diff -r1.8 -r1.9 src/sys/arch/usermode/include/vmparam.h

cvs diff -r1.10 -r1.11 src/sys/arch/acorn26/include/Attic/vmparam.h (expand / switch to unified diff)

--- src/sys/arch/acorn26/include/Attic/vmparam.h 2010/11/06 15:42:43 1.10
+++ src/sys/arch/acorn26/include/Attic/vmparam.h 2011/08/26 09:10:41 1.11
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vmparam.h,v 1.10 2010/11/06 15:42:43 uebayasi Exp $ */ 1/* $NetBSD: vmparam.h,v 1.11 2011/08/26 09:10:41 reinoud Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988 The Regents of the University of California. 4 * Copyright (c) 1988 The Regents of the University of California.
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.
@@ -73,26 +73,28 @@ @@ -73,26 +73,28 @@
73 * These specify the range of virtual pages available to user 73 * These specify the range of virtual pages available to user
74 * processes and to the kernel. This is a bit of a delicate balancing 74 * processes and to the kernel. This is a bit of a delicate balancing
75 * act, as we've only got 32Mb between them. There should probably be 75 * act, as we've only got 32Mb between them. There should probably be
76 * an option to have separate kernel and user spaces to ease this. 76 * an option to have separate kernel and user spaces to ease this.
77 */ 77 */
78 78
79#define KVM_SIZE 0x00800000 /* 8Mb */ 79#define KVM_SIZE 0x00800000 /* 8Mb */
80 80
81/* User VM range */ 81/* User VM range */
82#define VM_MIN_ADDRESS ((vm_offset_t)0x00008000) 82#define VM_MIN_ADDRESS ((vm_offset_t)0x00008000)
83#define VM_MAX_ADDRESS ((vm_offset_t)0x02000000 - KVM_SIZE) 83#define VM_MAX_ADDRESS ((vm_offset_t)0x02000000 - KVM_SIZE)
84#define VM_MAXUSER_ADDRESS VM_MAX_ADDRESS 84#define VM_MAXUSER_ADDRESS VM_MAX_ADDRESS
85 85
 86#define VM_CHECK_MIN_ADDRESS
 87
86/* Kernel VM range */ 88/* Kernel VM range */
87#define VM_MIN_KERNEL_ADDRESS VM_MAX_ADDRESS 89#define VM_MIN_KERNEL_ADDRESS VM_MAX_ADDRESS
88#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0x02000000) 90#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0x02000000)
89#define VM_MAXKERN_ADDRESS VM_MAX_KERNEL_ADDRESS 91#define VM_MAXKERN_ADDRESS VM_MAX_KERNEL_ADDRESS
90 92
91/* XXX max. amount of KVM to be used by buffers. */ 93/* XXX max. amount of KVM to be used by buffers. */
92#ifndef VM_MAX_KERNEL_BUF 94#ifndef VM_MAX_KERNEL_BUF
93#define VM_MAX_KERNEL_BUF \ 95#define VM_MAX_KERNEL_BUF \
94 ((VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 4) 96 ((VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 4)
95#endif 97#endif
96 98
97/* Physical memory parameters */ 99/* Physical memory parameters */
98 100

cvs diff -r1.8 -r1.9 src/sys/arch/usermode/include/vmparam.h (expand / switch to unified diff)

--- src/sys/arch/usermode/include/vmparam.h 2011/08/24 12:54:47 1.8
+++ src/sys/arch/usermode/include/vmparam.h 2011/08/26 09:10:41 1.9
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vmparam.h,v 1.8 2011/08/24 12:54:47 reinoud Exp $ */ 1/* $NetBSD: vmparam.h,v 1.9 2011/08/26 09:10:41 reinoud Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca> 4 * Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca>
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.
@@ -32,26 +32,28 @@ @@ -32,26 +32,28 @@
32#include <machine/pmap.h> 32#include <machine/pmap.h>
33#include "opt_memsize.h" 33#include "opt_memsize.h"
34 34
35extern paddr_t kmem_k_start, kmem_k_end; 35extern paddr_t kmem_k_start, kmem_k_end;
36extern paddr_t kmem_ext_start, kmem_ext_end; 36extern paddr_t kmem_ext_start, kmem_ext_end;
37extern paddr_t kmem_user_start, kmem_user_end; 37extern paddr_t kmem_user_start, kmem_user_end;
38 38
39#define VM_MIN_KERNEL_ADDRESS kmem_k_start 39#define VM_MIN_KERNEL_ADDRESS kmem_k_start
40#define VM_MAX_KERNEL_ADDRESS kmem_k_end 40#define VM_MAX_KERNEL_ADDRESS kmem_k_end
41#define VM_MIN_ADDRESS kmem_user_start 41#define VM_MIN_ADDRESS kmem_user_start
42#define VM_MAXUSER_ADDRESS kmem_user_end 42#define VM_MAXUSER_ADDRESS kmem_user_end
43#define VM_MAX_ADDRESS kmem_ext_end 43#define VM_MAX_ADDRESS kmem_ext_end
44 44
 45#define VM_CHECK_MIN_ADDRESS
 46
45#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST 47#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
46#define VM_PHYSSEG_MAX 1 48#define VM_PHYSSEG_MAX 1
47#define VM_NFREELIST 1 49#define VM_NFREELIST 1
48#define VM_FREELIST_DEFAULT 0 50#define VM_FREELIST_DEFAULT 0
49 51
50#define USRSTACK VM_MAXUSER_ADDRESS 52#define USRSTACK VM_MAXUSER_ADDRESS
51 53
52#if defined(__i386__)  54#if defined(__i386__)
53#define PAGE_SHIFT 12 55#define PAGE_SHIFT 12
54#define PAGE_SIZE (1 << PAGE_SHIFT) 56#define PAGE_SIZE (1 << PAGE_SHIFT)
55#define PAGE_MASK (PAGE_SIZE - 1) 57#define PAGE_MASK (PAGE_SIZE - 1)
56#define MAXSSIZ (64 * 1024 * 1024) 58#define MAXSSIZ (64 * 1024 * 1024)
57#define MAXTSIZ (64 * 1024 * 1024) 59#define MAXTSIZ (64 * 1024 * 1024)