/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. */ #ifndef _SYS_MACHPARAM_H #define _SYS_MACHPARAM_H #ifdef __cplusplus extern "C" { #endif #ifndef _ASM #define ADDRESS_C(c) c ## ul #else /* _ASM */ #define ADDRESS_C(c) (c) #endif /* _ASM */ /* * Machine dependent parameters and limits - sun4v version. */ /* * Define the VAC symbol (etc.) if we could run on a machine * which has a Virtual Address Cache */ /* * The maximum possible number of UPA devices in a system. * MAX_UPA maybe defined in a platform's makefile. */ #ifndef MAX_UPA #define MAX_UPA 32 #endif /* * Maximum cpuid value that we support. NCPU can be defined in a platform's * makefile. */ #ifndef NCPU #define NCPU 512 #define NCPU_LOG2 9 #elif (!defined(NCPU_LOG2)) #error "Must define NCPU_LOG2 together with NCPU" #endif /* NCPU_P2 is NCPU rounded to a power of 2 */ #define NCPU_P2 (1 << NCPU_LOG2) /* * Maximum number of processors that we support. With CMP processors, the * portid may not be equal to cpuid. MAX_CPU_CHIPID can be defined in a * platform's makefile. */ #ifndef MAX_CPU_CHIPID #define MAX_CPU_CHIPID NCPU #endif /* * Define the FPU symbol if we could run on a machine with an external * FPU (i.e. not integrated with the normal machine state like the vax). * * The fpu is defined in the architecture manual, and the kernel hides * its absence if it is not present, that's pretty integrated, no? */ /* * MMU_PAGES* describes the physical page size used by the mapping hardware. * PAGES* describes the logical page size used by the system. */ #define MMU_PAGE_SIZES 6 /* max sun4v mmu-supported page sizes */ #define DEFAULT_MMU_PAGE_SIZES 4 /* default sun4v supported page sizes */ /* * XXX make sure the MMU_PAGESHIFT definition here is * consistent with the one in param.h */ #define MMU_PAGESHIFT 13 #define MMU_PAGESIZE (1<