3 *
4 * The contents of this file are subject to the terms of the
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 (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
23 */
24
25 /*
26 * UNIX machine dependent virtual memory support.
27 */
28
29 #ifndef _VM_DEP_H
30 #define _VM_DEP_H
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 #include <vm/hat_sfmmu.h>
37 #include <sys/archsystm.h>
38 #include <sys/memnode.h>
39
40 #define GETTICK() gettick()
41
42 /* tick value that should be used for random values */
557 */
558 #define FULL_REGION_CNT(rg_szc) (8)
559
560 /*
561 * The counter base must be per page_counter element to prevent
562 * races when re-indexing, and the base page size element should
563 * be aligned on a boundary of the given region size.
564 *
565 * We also round up the number of pages spanned by the counters
566 * for a given region to PC_BASE_ALIGN in certain situations to simplify
567 * the coding for some non-performance critical routines.
568 */
569 #define PC_BASE_ALIGN ((pfn_t)1 << PAGE_BSZS_SHIFT(mmu_page_sizes-1))
570 #define PC_BASE_ALIGN_MASK (PC_BASE_ALIGN - 1)
571
572 extern int ecache_alignsize;
573 #define L2CACHE_ALIGN ecache_alignsize
574 #define L2CACHE_ALIGN_MAX 512
575
576 extern int update_proc_pgcolorbase_after_fork;
577 extern int consistent_coloring;
578 extern uint_t vac_colors_mask;
579 extern int vac_size;
580 extern int vac_shift;
581
582 /*
583 * Kernel mem segment in 64-bit space
584 */
585 extern caddr_t kmem64_base, kmem64_end, kmem64_aligned_end;
586 extern int kmem64_alignsize, kmem64_szc;
587 extern uint64_t kmem64_pabase;
588 extern int max_bootlp_tteszc;
589
590 /*
591 * Maximum and default values for user heap, stack, private and shared
592 * anonymous memory, and user text and initialized data.
593 *
594 * Initial values are defined in architecture specific mach_vm_dep.c file.
595 * Used by map_pgsz*() routines.
596 */
597 extern size_t max_uheap_lpsize;
|
3 *
4 * The contents of this file are subject to the terms of the
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 (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
24 */
25
26 /*
27 * UNIX machine dependent virtual memory support.
28 */
29
30 #ifndef _VM_DEP_H
31 #define _VM_DEP_H
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #include <vm/hat_sfmmu.h>
38 #include <sys/archsystm.h>
39 #include <sys/memnode.h>
40
41 #define GETTICK() gettick()
42
43 /* tick value that should be used for random values */
558 */
559 #define FULL_REGION_CNT(rg_szc) (8)
560
561 /*
562 * The counter base must be per page_counter element to prevent
563 * races when re-indexing, and the base page size element should
564 * be aligned on a boundary of the given region size.
565 *
566 * We also round up the number of pages spanned by the counters
567 * for a given region to PC_BASE_ALIGN in certain situations to simplify
568 * the coding for some non-performance critical routines.
569 */
570 #define PC_BASE_ALIGN ((pfn_t)1 << PAGE_BSZS_SHIFT(mmu_page_sizes-1))
571 #define PC_BASE_ALIGN_MASK (PC_BASE_ALIGN - 1)
572
573 extern int ecache_alignsize;
574 #define L2CACHE_ALIGN ecache_alignsize
575 #define L2CACHE_ALIGN_MAX 512
576
577 extern int update_proc_pgcolorbase_after_fork;
578 extern volatile int consistent_coloring;
579 extern uint_t vac_colors_mask;
580 extern int vac_size;
581 extern int vac_shift;
582
583 /*
584 * Kernel mem segment in 64-bit space
585 */
586 extern caddr_t kmem64_base, kmem64_end, kmem64_aligned_end;
587 extern int kmem64_alignsize, kmem64_szc;
588 extern uint64_t kmem64_pabase;
589 extern int max_bootlp_tteszc;
590
591 /*
592 * Maximum and default values for user heap, stack, private and shared
593 * anonymous memory, and user text and initialized data.
594 *
595 * Initial values are defined in architecture specific mach_vm_dep.c file.
596 * Used by map_pgsz*() routines.
597 */
598 extern size_t max_uheap_lpsize;
|