/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (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 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ #ifndef _SYS_MACHPARAM_H #define _SYS_MACHPARAM_H #pragma ident "%Z%%M% %I% %E% SMI" #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 - sun4u version. */ /* * Define the VAC symbol (etc.) if we could run on a machine * which has a Virtual Address Cache * * This stuff gotta go. */ #define VAC /* support virtual addressed caches */ /* * The maximum possible number of UPA devices in a system. * MAX_UPA maybe defined in a platform's makefile. */ #ifdef _STARFIRE /* * We have a 7 bit id space for UPA devices in Xfire */ #define MAX_UPA 128 #else #ifndef MAX_UPA #define MAX_UPA 32 #endif #endif /* _STARFIRE */ /* * Maximum cpuid value that we support. NCPU can be defined in a platform's * makefile. */ #if (defined(_STARFIRE) && !defined(lint)) #define NCPU 64 #else #ifndef NCPU #define NCPU 32 #endif #endif /* _STARFIRE && !lint */ /* * 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 sun4u mmu-supported page sizes */ #define DEFAULT_MMU_PAGE_SIZES 4 /* default sun4u 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<> 19) & 0x1FF) #define BUSTYPE_TO_PFN(btype, pfn) \ (((btype) << 19) | ((pfn) & 0x7FFFF)) #define IO_BUSTYPE(pfn) ((PFN_TO_BUSTYPE(pfn) & 0x100) >> 8) #ifdef _STARFIRE #define PFN_TO_UPAID(pfn) BUSTYPE_TO_UPAID(PFN_TO_BUSTYPE(pfn)) #else #define PFN_TO_UPAID(pfn) (((pfn) >> 20) & 0x1F) #endif /* _STARFIRE */ /* * Defines used for the ptl1_panic parameter, which is passed to the * ptl1_panic assembly routine in %g1. These #defines have string * names defined in sun4u/os/mach_cpu_states.c which should be kept up to * date if new #defines are added. */ #define PTL1_BAD_DEBUG 0 #define PTL1_BAD_WTRAP 1 #define PTL1_BAD_KMISS 2 #define PTL1_BAD_KPROT_FAULT 3 #define PTL1_BAD_ISM 4 #define PTL1_BAD_MMUTRAP 5 #define PTL1_BAD_TRAP 6 #define PTL1_BAD_FPTRAP 7 #define PTL1_BAD_INTR_REQ 8 #define PTL1_BAD_TRACE_PTR 9 #define PTL1_BAD_STACK 10 #define PTL1_BAD_DTRACE_FLAGS 11 #define PTL1_BAD_CTX_STEAL 12 #define PTL1_BAD_ECC 13 #define PTL1_BAD_CTX 14 /* * Defines used for ptl1 related data structs. */ #define PTL1_MAXTL 4 #define PTL1_DEBUG_TRAP 0x7C #define PTL1_SSIZE 1024 /* minimum stack size */ #define CPU_ALLOC_SIZE MMU_PAGESIZE #ifdef __cplusplus } #endif #endif /* _SYS_MACHPARAM_H */