/* * Copyright (c) 1993-2000 by Sun Microsystems, Inc. * All rights reserved. */ #ifndef _SYS_MACHPARAM_H #define _SYS_MACHPARAM_H #pragma ident "@(#)machparam.h 1.55 00/07/11 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 number of CPUs 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 */ /* * 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 4 /* supported page sizes by mmu */ /* * 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 */ #ifndef _ASM /* * Example buffer control and data headers stored in locore.s: */ typedef union { struct _ptl1_d { u_longlong_t ptl1_tstate; u_longlong_t ptl1_tick; u_longlong_t ptl1_tpc; u_longlong_t ptl1_tnpc; ushort_t ptl1_tt; ushort_t ptl1_tl; } d; uchar_t cache_linesize[64]; } PTL1_DAT; extern void ptl1_panic(uint_t reason); extern uint_t ptl1_panic_cpu; extern uint_t ptl1_panic_tr; extern PTL1_DAT ptl1_dat[]; extern char ptl1_stk[]; #endif /* _ASM */ /* * Defines used for ptl1_panic parameter. * %g1 comes in with one of these values. */ #define PTL1_BAD_WTRAP 1 #define PTL1_BAD_KMISS 2 #define PTL1_BAD_KPROT_TL0 3 #define PTL1_BAD_KPROT_FAULT 4 #define PTL1_BAD_KPROT_INVAL 5 #define PTL1_BAD_ISM 6 #define PTL1_BAD_TTE_PA 7 #define PTL1_BAD_MMUTRAP 8 #define PTL1_BAD_TRAP 9 #define PTL1_BAD_FPTRAP 10 #define PTL1_BAD_8KTSBP 11 #define PTL1_BAD_4MTSBP 12 /* * Defines used for tl1_bad_trap stack and related data structs. */ #define PTL1_MAXTL 4 #define PTL1_SSIZE DEFAULTSTKSZ #define PTL1_SIZE_SHIFT 6 #define PTL1_SIZE (1 << PTL1_SIZE_SHIFT) #ifdef __cplusplus } #endif #endif /* _SYS_MACHPARAM_H */