5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
27 /* All Rights Reserved */
28
29 /*
30 * Portions of this source code were derived from Berkeley 4.3 BSD
31 * under license from the Regents of the University of California.
32 */
33
34 /*
35 * UNIX machine dependent virtual memory support.
36 */
37
38 #include <sys/vm.h>
39 #include <sys/exec.h>
40 #include <sys/cmn_err.h>
41 #include <sys/cpu_module.h>
42 #include <sys/cpu.h>
43 #include <sys/elf_SPARC.h>
44 #include <sys/archsystm.h>
45 #include <vm/hat_sfmmu.h>
46 #include <sys/memnode.h>
47 #include <sys/mem_cage.h>
48 #include <vm/vm_dep.h>
49 #include <sys/error.h>
50 #include <sys/machsystm.h>
51 #include <vm/seg_kmem.h>
52 #include <sys/stack.h>
53 #include <sys/atomic.h>
54 #include <sys/promif.h>
55 #include <sys/random.h>
56
57 uint_t page_colors = 0;
58 uint_t page_colors_mask = 0;
59 uint_t page_coloring_shift = 0;
60 int consistent_coloring;
61 int update_proc_pgcolorbase_after_fork = 1;
62
63 uint_t mmu_page_sizes = MMU_PAGE_SIZES;
64 uint_t max_mmu_page_sizes = MMU_PAGE_SIZES;
65 uint_t mmu_hashcnt = MAX_HASHCNT;
66 uint_t max_mmu_hashcnt = MAX_HASHCNT;
67 size_t mmu_ism_pagesize = DEFAULT_ISM_PAGESIZE;
68
69 /*
70 * A bitmask of the page sizes supported by hardware based upon szc.
71 * The base pagesize (p_szc == 0) must always be supported by the hardware.
72 */
73 int mmu_exported_pagesize_mask;
74 uint_t mmu_exported_page_sizes;
75
76 uint_t szc_2_userszc[MMU_PAGE_SIZES];
77 uint_t userszc_2_szc[MMU_PAGE_SIZES];
78
79 extern uint_t vac_colors_mask;
80 extern int vac_shift;
|
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25 /*
26 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
27 */
28
29 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
30 /* All Rights Reserved */
31
32 /*
33 * Portions of this source code were derived from Berkeley 4.3 BSD
34 * under license from the Regents of the University of California.
35 */
36
37 /*
38 * UNIX machine dependent virtual memory support.
39 */
40
41 #include <sys/vm.h>
42 #include <sys/exec.h>
43 #include <sys/cmn_err.h>
44 #include <sys/cpu_module.h>
45 #include <sys/cpu.h>
46 #include <sys/elf_SPARC.h>
47 #include <sys/archsystm.h>
48 #include <vm/hat_sfmmu.h>
49 #include <sys/memnode.h>
50 #include <sys/mem_cage.h>
51 #include <vm/vm_dep.h>
52 #include <sys/error.h>
53 #include <sys/machsystm.h>
54 #include <vm/seg_kmem.h>
55 #include <sys/stack.h>
56 #include <sys/atomic.h>
57 #include <sys/promif.h>
58 #include <sys/random.h>
59
60 uint_t page_colors = 0;
61 uint_t page_colors_mask = 0;
62 uint_t page_coloring_shift = 0;
63 volatile int consistent_coloring;
64 int update_proc_pgcolorbase_after_fork = 1;
65
66 uint_t mmu_page_sizes = MMU_PAGE_SIZES;
67 uint_t max_mmu_page_sizes = MMU_PAGE_SIZES;
68 uint_t mmu_hashcnt = MAX_HASHCNT;
69 uint_t max_mmu_hashcnt = MAX_HASHCNT;
70 size_t mmu_ism_pagesize = DEFAULT_ISM_PAGESIZE;
71
72 /*
73 * A bitmask of the page sizes supported by hardware based upon szc.
74 * The base pagesize (p_szc == 0) must always be supported by the hardware.
75 */
76 int mmu_exported_pagesize_mask;
77 uint_t mmu_exported_page_sizes;
78
79 uint_t szc_2_userszc[MMU_PAGE_SIZES];
80 uint_t userszc_2_szc[MMU_PAGE_SIZES];
81
82 extern uint_t vac_colors_mask;
83 extern int vac_shift;
|