1*2063d9c0SJosef 'Jeff' Sipek# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 5*2063d9c0SJosef 'Jeff' Sipek# Common Development and Distribution License (the "License"). 6*2063d9c0SJosef 'Jeff' Sipek# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 21*2063d9c0SJosef 'Jeff' Sipek 22*2063d9c0SJosef 'Jeff' Sipek# 23*2063d9c0SJosef 'Jeff' Sipek# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 25*2063d9c0SJosef 'Jeff' Sipek# Copyright (c) 2013 Andrew Stormont. All rights reserved. 267c478bd9Sstevel@tonic-gate# 27*2063d9c0SJosef 'Jeff' Sipek# This makefile contains the common definitions for the sun4v unix 28*2063d9c0SJosef 'Jeff' Sipek# and all sun4v implementation architecture dependent modules. 297c478bd9Sstevel@tonic-gate# 307c478bd9Sstevel@tonic-gate 31*2063d9c0SJosef 'Jeff' Sipek# 32*2063d9c0SJosef 'Jeff' Sipek# Machine type (implementation architecture): 33*2063d9c0SJosef 'Jeff' Sipek# 34*2063d9c0SJosef 'Jeff' SipekPLATFORM = sun4v 35*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,Sun-Fire-T1000 36*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,SPARC-Enterprise-T5120 37*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,SPARC-Enterprise-T5220 38*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,T5140 39*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,T5240 40*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,T5440 41*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,SPARC-Enterprise-T1000 42*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,Sun-Blade-T6300 43*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,Sun-Blade-T6320 44*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,Netra-CP3260 45*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,Netra-T5220 46*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,USBRDT-5240 47*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,Netra-T5440 48*2063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS += SUNW,Sun-Blade-T6340 49*2063d9c0SJosef 'Jeff' SipekPROMIF = ieee1275 50*2063d9c0SJosef 'Jeff' SipekPSMBASE = $(UTSBASE)/../psm 517c478bd9Sstevel@tonic-gate 52*2063d9c0SJosef 'Jeff' Sipek# 53*2063d9c0SJosef 'Jeff' Sipek# uname -m value 54*2063d9c0SJosef 'Jeff' Sipek# 55*2063d9c0SJosef 'Jeff' SipekUNAME_M = $(PLATFORM) 56*2063d9c0SJosef 'Jeff' Sipek 57*2063d9c0SJosef 'Jeff' Sipek# 58*2063d9c0SJosef 'Jeff' Sipek# Definitions for the platform-specific /platform directories. 59*2063d9c0SJosef 'Jeff' Sipek# 60*2063d9c0SJosef 'Jeff' Sipek# PLATFORMS designates those sun4v machines which have no platform 61*2063d9c0SJosef 'Jeff' Sipek# specific code. 62*2063d9c0SJosef 'Jeff' Sipek# 63*2063d9c0SJosef 'Jeff' Sipek# IMPLEMENTATIONS is used to designate sun4v machines which have 64*2063d9c0SJosef 'Jeff' Sipek# platform specific modules. All code specific to a given implementation 65*2063d9c0SJosef 'Jeff' Sipek# resides in the appropriately named subdirectory. This requires 66*2063d9c0SJosef 'Jeff' Sipek# these platforms to have their own Makefiles to define ROOT_PLAT_DIRS, 67*2063d9c0SJosef 'Jeff' Sipek# USR_PLAT_DIRS, etc. 68*2063d9c0SJosef 'Jeff' Sipek# The number of IMPLEMENTATIONS should not grow! 69*2063d9c0SJosef 'Jeff' Sipek# 70*2063d9c0SJosef 'Jeff' Sipek# So if we had an implementation named 'foo', we would need the following 71*2063d9c0SJosef 'Jeff' Sipek# Makefiles in the foo subdirectory: 72*2063d9c0SJosef 'Jeff' Sipek# 73*2063d9c0SJosef 'Jeff' Sipek# sun4v/foo/Makefile 74*2063d9c0SJosef 'Jeff' Sipek# sun4v/foo/Makefile.foo 75*2063d9c0SJosef 'Jeff' Sipek# sun4v/foo/Makefile.targ 76*2063d9c0SJosef 'Jeff' Sipek# 77*2063d9c0SJosef 'Jeff' Sipek 78*2063d9c0SJosef 'Jeff' Sipek# 79*2063d9c0SJosef 'Jeff' Sipek# all PLATFORMS that do not belong in the $(IMPLEMENTATIONS) list. 80*2063d9c0SJosef 'Jeff' Sipek# This list should be empty. A platform without platform modules 81*2063d9c0SJosef 'Jeff' Sipek# is a plain, generic sun4v platform. 82*2063d9c0SJosef 'Jeff' Sipek# 83*2063d9c0SJosef 'Jeff' Sipek#IMPLEMENTED_PLATFORM = 84*2063d9c0SJosef 'Jeff' Sipek#PLATFORMS = $(IMPLEMENTED_PLATFORM) 85*2063d9c0SJosef 'Jeff' Sipek 86*2063d9c0SJosef 'Jeff' SipekIMPLEMENTATIONS = ontario montoya huron maramba 87*2063d9c0SJosef 'Jeff' Sipek 88*2063d9c0SJosef 'Jeff' Sipek#ROOT_PLAT_DIRS = $(PLATFORMS:%=$(ROOT_PLAT_DIR)/%) 89*2063d9c0SJosef 'Jeff' Sipek#USR_PLAT_DIRS = $(PLATFORMS:%=$(USR_PLAT_DIR)/%) 90*2063d9c0SJosef 'Jeff' Sipek 91*2063d9c0SJosef 'Jeff' Sipek#USR_DESKTOP_DIR = $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM) 92*2063d9c0SJosef 'Jeff' Sipek#USR_DESKTOP_INC_DIR = $(USR_DESKTOP_DIR)/include 93*2063d9c0SJosef 'Jeff' Sipek#USR_DESKTOP_SBIN_DIR = $(USR_DESKTOP_DIR)/sbin 94*2063d9c0SJosef 'Jeff' Sipek#USR_DESKTOP_LIB_DIR = $(USR_DESKTOP_DIR)/lib 95*2063d9c0SJosef 'Jeff' Sipek 96*2063d9c0SJosef 'Jeff' Sipek# 97*2063d9c0SJosef 'Jeff' Sipek# Define supported builds 98*2063d9c0SJosef 'Jeff' Sipek# 99*2063d9c0SJosef 'Jeff' SipekDEF_BUILDS = $(DEF_BUILDS64) 100*2063d9c0SJosef 'Jeff' SipekALL_BUILDS = $(ALL_BUILDS64) 101*2063d9c0SJosef 'Jeff' Sipek 102*2063d9c0SJosef 'Jeff' Sipek# 103*2063d9c0SJosef 'Jeff' Sipek# Everybody needs to know how to build modstubs.o and to locate unix.o 104*2063d9c0SJosef 'Jeff' Sipek# 105*2063d9c0SJosef 'Jeff' SipekUNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix 106*2063d9c0SJosef 'Jeff' SipekGENLIB_DIR = $(UTSBASE)/$(PLATFORM)/genunix 107*2063d9c0SJosef 'Jeff' SipekMODSTUBS_DIR = $(UNIX_DIR) 108*2063d9c0SJosef 'Jeff' SipekDSF_DIR = $(UTSBASE)/$(PLATFORM)/genassym 109*2063d9c0SJosef 'Jeff' SipekLINTS_DIR = $(OBJS_DIR) 110*2063d9c0SJosef 'Jeff' SipekLINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/lint-libs/$(OBJS_DIR) 111*2063d9c0SJosef 'Jeff' Sipek 112*2063d9c0SJosef 'Jeff' SipekDTRACESTUBS_O = $(OBJS_DIR)/dtracestubs.o 113*2063d9c0SJosef 'Jeff' SipekDTRACESTUBS = $(OBJS_DIR)/libdtracestubs.so 114*2063d9c0SJosef 'Jeff' Sipek 115*2063d9c0SJosef 'Jeff' SipekUNIX_O = $(UNIX_DIR)/$(OBJS_DIR)/unix.o 116*2063d9c0SJosef 'Jeff' SipekMODSTUBS_O = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o 117*2063d9c0SJosef 'Jeff' SipekGENLIB = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so 118*2063d9c0SJosef 'Jeff' Sipek 119*2063d9c0SJosef 'Jeff' SipekLINT_LIB = $(LINT_LIB_DIR)/llib-lunix.ln 120*2063d9c0SJosef 'Jeff' SipekGEN_LINT_LIB = $(LINT_LIB_DIR)/llib-lgenunix.ln 121*2063d9c0SJosef 'Jeff' Sipek 122*2063d9c0SJosef 'Jeff' SipekLINT64_DIRS = $(LINT64_BUILDS:%=$(UTSBASE)/$(PLATFORM)/lint-libs/%) 123*2063d9c0SJosef 'Jeff' SipekLINT64_FILES = $(LINT64_DIRS:%=%/llib-l$(MODULE).ln) 124*2063d9c0SJosef 'Jeff' Sipek 125*2063d9c0SJosef 'Jeff' Sipek# 126*2063d9c0SJosef 'Jeff' Sipek# cpu and platform modules need to know how to build their own symcheck module 127*2063d9c0SJosef 'Jeff' Sipek# 128*2063d9c0SJosef 'Jeff' SipekPLATMOD = platmod 129*2063d9c0SJosef 'Jeff' SipekPLATLIB = $(PLAT_DIR)/$(OBJS_DIR)/libplatmod.so 130*2063d9c0SJosef 'Jeff' Sipek 131*2063d9c0SJosef 'Jeff' SipekCPUNAME = cpu 132*2063d9c0SJosef 'Jeff' SipekCPULIB = $(CPU_DIR)/$(OBJS_DIR)/libcpu.so 133*2063d9c0SJosef 'Jeff' Sipek 134*2063d9c0SJosef 'Jeff' SipekSYM_MOD = $(OBJS_DIR)/unix.sym 135*2063d9c0SJosef 'Jeff' Sipek 136*2063d9c0SJosef 'Jeff' Sipek# 137*2063d9c0SJosef 'Jeff' Sipek# Include the makefiles which define build rule templates, the 138*2063d9c0SJosef 'Jeff' Sipek# collection of files per module, and a few specific flags. Note 139*2063d9c0SJosef 'Jeff' Sipek# that order is significant, just as with an include path. The 140*2063d9c0SJosef 'Jeff' Sipek# first build rule template which matches the files name will be 141*2063d9c0SJosef 'Jeff' Sipek# used. By including these in order from most machine dependent 142*2063d9c0SJosef 'Jeff' Sipek# to most machine independent, we allow a machine dependent file 143*2063d9c0SJosef 'Jeff' Sipek# to be used in preference over a machine independent version 144*2063d9c0SJosef 'Jeff' Sipek# (Such as a machine specific optimization, which preserves the 145*2063d9c0SJosef 'Jeff' Sipek# interfaces.) 146*2063d9c0SJosef 'Jeff' Sipek# 147*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sun4/Makefile.files 148*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/$(PLATFORM)/Makefile.files 149*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sfmmu/Makefile.files 150*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sparc/v9/Makefile.files 151*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sparc/Makefile.files 152*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sun/Makefile.files 153*2063d9c0SJosef 'Jeff' Sipekinclude $(SRC)/psm/promif/$(PROMIF)/common/Makefile.files 154*2063d9c0SJosef 'Jeff' Sipekinclude $(SRC)/psm/promif/$(PROMIF)/$(PLATFORM)/Makefile.files 155*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/common/Makefile.files 156*2063d9c0SJosef 'Jeff' Sipek 157*2063d9c0SJosef 'Jeff' Sipek# 158*2063d9c0SJosef 'Jeff' Sipek# Include machine independent rules. Note that this does not imply 159*2063d9c0SJosef 'Jeff' Sipek# that the resulting module from rules in Makefile.uts is machine 160*2063d9c0SJosef 'Jeff' Sipek# independent. Only that the build rules are machine independent. 161*2063d9c0SJosef 'Jeff' Sipek# 162*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/Makefile.uts 163*2063d9c0SJosef 'Jeff' Sipek 164*2063d9c0SJosef 'Jeff' SipekCTFMERGE_GUDIR = sun4v 165*2063d9c0SJosef 'Jeff' Sipek 166*2063d9c0SJosef 'Jeff' Sipek# 167*2063d9c0SJosef 'Jeff' Sipek# machine specific optimization, override default in Makefile.master 168*2063d9c0SJosef 'Jeff' Sipek# 169*2063d9c0SJosef 'Jeff' SipekCC_XARCH = -m64 -xarch=sparcvis 170*2063d9c0SJosef 'Jeff' SipekAS_XARCH = -xarch=v9v 171*2063d9c0SJosef 'Jeff' SipekCOPTIMIZE = -xO3 172*2063d9c0SJosef 'Jeff' SipekCCMODE = -Xa 173*2063d9c0SJosef 'Jeff' Sipek 174*2063d9c0SJosef 'Jeff' SipekCFLAGS = -xchip=ultra $(CCABS32) $(CCREGSYM) 175*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CC_XARCH) 176*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(COPTIMIZE) 177*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(EXTRA_CFLAGS) 178*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(XAOPT) 179*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(INLINES) -D_ASM_INLINES 180*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CCMODE) 181*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(SPACEFLAG) 182*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CERRWARN) 183*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CTF_FLAGS_$(CLASS)) 184*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(C99MODE) 185*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CCUNBOUND) 186*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CCNOAUTOINLINE) 187*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CCSTATICSYM) 188*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CC32BITCALLERS) 189*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(IROPTFLAG) 190*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CGLOBALSTATIC) 191*2063d9c0SJosef 'Jeff' SipekCFLAGS += -xregs=no%float 192*2063d9c0SJosef 'Jeff' SipekCFLAGS += -xstrconst 193*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CSOURCEDEBUGFLAGS) 194*2063d9c0SJosef 'Jeff' SipekCFLAGS += $(CUSERFLAGS) 195*2063d9c0SJosef 'Jeff' Sipek 196*2063d9c0SJosef 'Jeff' SipekCPPFLAGS += -DGLREG 197*2063d9c0SJosef 'Jeff' Sipek 198*2063d9c0SJosef 'Jeff' SipekASFLAGS += $(AS_XARCH) -DGLREG 199*2063d9c0SJosef 'Jeff' Sipek 200*2063d9c0SJosef 'Jeff' SipekAS_INC_PATH += -I$(DSF_DIR)/$(OBJS_DIR) 201*2063d9c0SJosef 'Jeff' Sipek 202*2063d9c0SJosef 'Jeff' SipekLINT_KMODS += $(GENUNIX_KMODS) 203*2063d9c0SJosef 'Jeff' Sipek 204*2063d9c0SJosef 'Jeff' SipekLINT_DEFS = -m64 205*2063d9c0SJosef 'Jeff' Sipek 206*2063d9c0SJosef 'Jeff' Sipek# 207*2063d9c0SJosef 'Jeff' Sipek# The following must be defined for all implementations: 208*2063d9c0SJosef 'Jeff' Sipek# 209*2063d9c0SJosef 'Jeff' Sipek# MAPFILE: ld mapfile for the build of kernel/unix. 210*2063d9c0SJosef 'Jeff' Sipek# MODSTUBS: Module stubs source file. 211*2063d9c0SJosef 'Jeff' Sipek# GENCONST_SRC: genconst.c 212*2063d9c0SJosef 'Jeff' Sipek# OFFSETS: offsets.in 213*2063d9c0SJosef 'Jeff' Sipek# PLATFORM_OFFSETS: Platform specific mach_offsets.in 214*2063d9c0SJosef 'Jeff' Sipek# FDOFFSETS: fd_offsets.in 215*2063d9c0SJosef 'Jeff' Sipek# 216*2063d9c0SJosef 'Jeff' SipekMAPFILE = $(UTSBASE)/sun4/conf/Mapfile 217*2063d9c0SJosef 'Jeff' SipekMODSTUBS = $(UTSBASE)/sparc/ml/modstubs.s 218*2063d9c0SJosef 'Jeff' SipekGENCONST_SRC = $(UTSBASE)/sun4/ml/genconst.c 219*2063d9c0SJosef 'Jeff' SipekOFFSETS = $(UTSBASE)/sun4/ml/offsets.in 220*2063d9c0SJosef 'Jeff' SipekPLATFORM_OFFSETS = $(UTSBASE)/sun4v/ml/mach_offsets.in 221*2063d9c0SJosef 'Jeff' SipekFDOFFSETS = $(UTSBASE)/sun/io/fd_offsets.in 222*2063d9c0SJosef 'Jeff' Sipek 223*2063d9c0SJosef 'Jeff' Sipek# 224*2063d9c0SJosef 'Jeff' Sipek# Define the actual specific platforms 225*2063d9c0SJosef 'Jeff' Sipek# 226*2063d9c0SJosef 'Jeff' Sipek 227*2063d9c0SJosef 'Jeff' SipekMACHINE_DEFS = -D$(PLATFORM) -D_MACHDEP -DSFMMU 228*2063d9c0SJosef 'Jeff' SipekMACHINE_DEFS += -DMAX_MEM_NODES=8 229*2063d9c0SJosef 'Jeff' Sipek 230*2063d9c0SJosef 'Jeff' Sipek# 231*2063d9c0SJosef 'Jeff' Sipek# Software workarounds for hardware "features" 232*2063d9c0SJosef 'Jeff' Sipek# 233*2063d9c0SJosef 'Jeff' Sipek 234*2063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/$(PLATFORM)/Makefile.workarounds 235*2063d9c0SJosef 'Jeff' Sipek 236*2063d9c0SJosef 'Jeff' Sipek# 237*2063d9c0SJosef 'Jeff' Sipek# Debugging level 238*2063d9c0SJosef 'Jeff' Sipek# 239*2063d9c0SJosef 'Jeff' Sipek# Special knowledge of which special debugging options effect which 240*2063d9c0SJosef 'Jeff' Sipek# file is used to optimize the build if these flags are changed. 241*2063d9c0SJosef 'Jeff' Sipek# 242*2063d9c0SJosef 'Jeff' Sipek# XXX: The above could possibly be done for more flags and files, but 243*2063d9c0SJosef 'Jeff' Sipek# is left as an experiment to the interested reader. Be forewarned, 244*2063d9c0SJosef 'Jeff' Sipek# that excessive use could lead to maintenance difficulties. 245*2063d9c0SJosef 'Jeff' Sipek# 246*2063d9c0SJosef 'Jeff' Sipek# Note: kslice can be enabled for the sun4v, but is disabled by default 247*2063d9c0SJosef 'Jeff' Sipek# in all cases. 248*2063d9c0SJosef 'Jeff' Sipek# 249*2063d9c0SJosef 'Jeff' Sipek 250*2063d9c0SJosef 'Jeff' SipekDEBUG_DEFS_OBJ64 = 251*2063d9c0SJosef 'Jeff' SipekDEBUG_DEFS_DBG64 = -DDEBUG 252*2063d9c0SJosef 'Jeff' SipekDEBUG_DEFS = $(DEBUG_DEFS_$(BUILD_TYPE)) 253*2063d9c0SJosef 'Jeff' Sipek 254*2063d9c0SJosef 'Jeff' SipekDEBUG_COND_OBJ64 = $(POUND_SIGN) 255*2063d9c0SJosef 'Jeff' SipekDEBUG_COND_DBG64 = 256*2063d9c0SJosef 'Jeff' SipekIF_DEBUG_OBJ = $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/ 257*2063d9c0SJosef 'Jeff' Sipek 258*2063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)trap.o := DEBUG_DEFS += -DTRAPDEBUG 259*2063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPDEBUG 260*2063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)syscall_trap.o := DEBUG_DEFS += -DSYSCALLTRACE 261*2063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)clock.o := DEBUG_DEFS += -DKSLICE=0 262*2063d9c0SJosef 'Jeff' Sipek 263*2063d9c0SJosef 'Jeff' SipekIF_TRAPTRACE_OBJ = $(IF_DEBUG_OBJ) 264*2063d9c0SJosef 'Jeff' Sipek# comment this out for a non-debug kernel with TRAPTRACE 265*2063d9c0SJosef 'Jeff' Sipek#IF_TRAPTRACE_OBJ = $(OBJS_DIR)/ 266*2063d9c0SJosef 'Jeff' Sipek 267*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_locore.o := DEBUG_DEFS += -DTRAPTRACE 268*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mlsetup.o := DEBUG_DEFS += -DTRAPTRACE 269*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)syscall_trap.o := DEBUG_DEFS += -DTRAPTRACE 270*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)startup.o := DEBUG_DEFS += -DTRAPTRACE 271*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_startup.o := DEBUG_DEFS += -DTRAPTRACE 272*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mp_startup.o := DEBUG_DEFS += -DTRAPTRACE 273*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)cpu_states.o := DEBUG_DEFS += -DTRAPTRACE 274*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_cpu_states.o := DEBUG_DEFS += -DTRAPTRACE 275*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)interrupt.o := DEBUG_DEFS += -DTRAPTRACE 276*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_interrupt.o := DEBUG_DEFS += -DTRAPTRACE 277*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)sfmmu_asm.o := DEBUG_DEFS += -DTRAPTRACE 278*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)trap_table.o := DEBUG_DEFS += -DTRAPTRACE 279*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)xc.o := DEBUG_DEFS += -DTRAPTRACE 280*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_xc.o := DEBUG_DEFS += -DTRAPTRACE 281*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)wbuf.o := DEBUG_DEFS += -DTRAPTRACE 282*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)trap.o := DEBUG_DEFS += -DTRAPTRACE 283*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_trap.o := DEBUG_DEFS += -DTRAPTRACE 284*2063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)x_call.o := DEBUG_DEFS += -DTRAPTRACE 285*2063d9c0SJosef 'Jeff' Sipek 286*2063d9c0SJosef 'Jeff' Sipek# Comment these out if you don't want dispatcher lock statistics. 287*2063d9c0SJosef 'Jeff' Sipek 288*2063d9c0SJosef 'Jeff' Sipek#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_LOCK_STATS 289*2063d9c0SJosef 'Jeff' Sipek#$(IF_DEBUG_OBJ)disp.o := DEBUG_DEFS += -DDISP_LOCK_STATS 290*2063d9c0SJosef 'Jeff' Sipek 291*2063d9c0SJosef 'Jeff' Sipek# Comment these out if you don't want dispatcher debugging 292*2063d9c0SJosef 'Jeff' Sipek 293*2063d9c0SJosef 'Jeff' Sipek#$(IF_DEBUG_OBJ)lock_prim.o := DEBUG_DEFS += -DDISP_DEBUG 294*2063d9c0SJosef 'Jeff' Sipek 295*2063d9c0SJosef 'Jeff' Sipek# 296*2063d9c0SJosef 'Jeff' Sipek# Collect the preprocessor definitions to be associated with *all* 297*2063d9c0SJosef 'Jeff' Sipek# files. 298*2063d9c0SJosef 'Jeff' Sipek# 299*2063d9c0SJosef 'Jeff' SipekALL_DEFS = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \ 300*2063d9c0SJosef 'Jeff' Sipek $(OPTION_DEFS) 301*2063d9c0SJosef 'Jeff' SipekGENCONST_DEFS = $(MACHINE_DEFS) $(OPTION_DEFS) 302*2063d9c0SJosef 'Jeff' Sipek 303*2063d9c0SJosef 'Jeff' Sipek# 304*2063d9c0SJosef 'Jeff' Sipek# ----- TRANSITIONAL SECTION -------------------------------------------------- 305*2063d9c0SJosef 'Jeff' Sipek# 306*2063d9c0SJosef 'Jeff' Sipek 307*2063d9c0SJosef 'Jeff' Sipek# 308*2063d9c0SJosef 'Jeff' Sipek# Not everything which *should* be a module is a module yet. The 309*2063d9c0SJosef 'Jeff' Sipek# following is a list of such objects which are currently part of 310*2063d9c0SJosef 'Jeff' Sipek# the base kernel but should soon become kmods. 311*2063d9c0SJosef 'Jeff' Sipek# 312*2063d9c0SJosef 'Jeff' SipekMACH_NOT_YET_KMODS = $(AUTOCONF_OBJS) 313*2063d9c0SJosef 'Jeff' Sipek 314*2063d9c0SJosef 'Jeff' Sipek# 315*2063d9c0SJosef 'Jeff' Sipek# ----- END OF TRANSITIONAL SECTION ------------------------------------------- 316*2063d9c0SJosef 'Jeff' Sipek# 317*2063d9c0SJosef 'Jeff' Sipek 318*2063d9c0SJosef 'Jeff' Sipek# 319*2063d9c0SJosef 'Jeff' Sipek# The kernels modules which are "implementation architecture" 320*2063d9c0SJosef 'Jeff' Sipek# specific for this machine are enumerated below. Note that most 321*2063d9c0SJosef 'Jeff' Sipek# of these modules must exist (in one form or another) for each 322*2063d9c0SJosef 'Jeff' Sipek# architecture. 323*2063d9c0SJosef 'Jeff' Sipek# 324*2063d9c0SJosef 'Jeff' Sipek# Common Drivers (usually pseudo drivers) (/kernel/drv): 325*2063d9c0SJosef 'Jeff' Sipek# 326*2063d9c0SJosef 'Jeff' Sipek 327*2063d9c0SJosef 'Jeff' Sipek# 328*2063d9c0SJosef 'Jeff' Sipek# Machine Specific Driver Modules (/kernel/drv): 329*2063d9c0SJosef 'Jeff' Sipek# 330*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += bge 331*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += cnex 332*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += cpc 333*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += drctl 334*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += ds_pri 335*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += ds_snmp 336*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += ebus 337*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += fpc 338*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += glvc 339*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += mdesc 340*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += niumx 341*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += ntwdt 342*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += nxge 343*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += n2piupc 344*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += iospc 345*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += n2rng 346*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += px 347*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += qcn 348*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += rootnex 349*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += su 350*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += tpm 351*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += trapstat 352*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += vcc 353*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += vdc 354*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += vds 355*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += vldc 356*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += vlds 357*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += vnet 358*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += vnex 359*2063d9c0SJosef 'Jeff' SipekDRV_KMODS += vsw 360*2063d9c0SJosef 'Jeff' Sipek 361*2063d9c0SJosef 'Jeff' Sipek# 362*2063d9c0SJosef 'Jeff' Sipek# Exec Class Modules (/kernel/exec): 363*2063d9c0SJosef 'Jeff' Sipek# 364*2063d9c0SJosef 'Jeff' SipekEXEC_KMODS += 365*2063d9c0SJosef 'Jeff' Sipek 366*2063d9c0SJosef 'Jeff' Sipek# 367*2063d9c0SJosef 'Jeff' Sipek# Scheduling Class Modules (/kernel/sched): 368*2063d9c0SJosef 'Jeff' Sipek# 369*2063d9c0SJosef 'Jeff' SipekSCHED_KMODS += 370*2063d9c0SJosef 'Jeff' Sipek 371*2063d9c0SJosef 'Jeff' Sipek# 372*2063d9c0SJosef 'Jeff' Sipek# File System Modules (/kernel/fs): 373*2063d9c0SJosef 'Jeff' Sipek# 374*2063d9c0SJosef 'Jeff' SipekFS_KMODS += 375*2063d9c0SJosef 'Jeff' Sipek 376*2063d9c0SJosef 'Jeff' Sipek# 377*2063d9c0SJosef 'Jeff' Sipek# Streams Modules (/kernel/strmod): 378*2063d9c0SJosef 'Jeff' Sipek# 379*2063d9c0SJosef 'Jeff' Sipek# STRMOD_KMODS += kb 380*2063d9c0SJosef 'Jeff' Sipek 381*2063d9c0SJosef 'Jeff' Sipek# 382*2063d9c0SJosef 'Jeff' Sipek# 'System' Modules (/kernel/sys): 383*2063d9c0SJosef 'Jeff' Sipek# 384*2063d9c0SJosef 'Jeff' SipekSYS_KMODS += 385*2063d9c0SJosef 'Jeff' Sipek 386*2063d9c0SJosef 'Jeff' Sipek# 387*2063d9c0SJosef 'Jeff' Sipek# 'User' Modules (/kernel/misc): 388*2063d9c0SJosef 'Jeff' Sipek# 389*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += bootdev 390*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += dr_cpu 391*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += dr_io 392*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += dr_mem 393*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += ds 394*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += fault_iso 395*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += ldc 396*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += obpsym 397*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += platmod 398*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += platsvc 399*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += vis 400*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += pcie 401*2063d9c0SJosef 'Jeff' Sipek 402*2063d9c0SJosef 'Jeff' Sipek# md5 optimized for Niagara 403*2063d9c0SJosef 'Jeff' Sipek# 404*2063d9c0SJosef 'Jeff' SipekMISC_KMODS += md5 405*2063d9c0SJosef 'Jeff' Sipek 406*2063d9c0SJosef 'Jeff' Sipek# 407*2063d9c0SJosef 'Jeff' Sipek# Brand modules 408*2063d9c0SJosef 'Jeff' Sipek# 409*2063d9c0SJosef 'Jeff' SipekBRAND_KMODS += sn1_brand s10_brand 410*2063d9c0SJosef 'Jeff' Sipek 411*2063d9c0SJosef 'Jeff' Sipek# 412*2063d9c0SJosef 'Jeff' Sipek# Software Cryptographic Providers (/kernel/crypto): 413*2063d9c0SJosef 'Jeff' Sipek# 414*2063d9c0SJosef 'Jeff' SipekCRYPTO_KMODS += arcfour 415*2063d9c0SJosef 'Jeff' Sipek 416*2063d9c0SJosef 'Jeff' Sipek# 417*2063d9c0SJosef 'Jeff' Sipek# generic-unix module (/kernel/genunix): 418*2063d9c0SJosef 'Jeff' Sipek# 419*2063d9c0SJosef 'Jeff' SipekGENUNIX_KMODS += genunix 420*2063d9c0SJosef 'Jeff' Sipek 421*2063d9c0SJosef 'Jeff' Sipek# 422*2063d9c0SJosef 'Jeff' Sipek# Modules eXcluded from the product: 423*2063d9c0SJosef 'Jeff' Sipek# 424*2063d9c0SJosef 'Jeff' SipekXMODS += 425*2063d9c0SJosef 'Jeff' Sipek 426*2063d9c0SJosef 'Jeff' Sipek# 427*2063d9c0SJosef 'Jeff' Sipek# cpu modules 428*2063d9c0SJosef 'Jeff' Sipek# 429*2063d9c0SJosef 'Jeff' SipekCPU_KMODS += generic niagara niagara2 vfalls kt 430*2063d9c0SJosef 'Jeff' Sipek 431*2063d9c0SJosef 'Jeff' SipekLINT_CPU_KMODS += generic 432*2063d9c0SJosef 'Jeff' Sipek 433*2063d9c0SJosef 'Jeff' Sipek# 434*2063d9c0SJosef 'Jeff' Sipek# Performance Counter BackEnd Modules (/usr/kernel/pcbe): 435*2063d9c0SJosef 'Jeff' Sipek# 436*2063d9c0SJosef 'Jeff' SipekPCBE_KMODS += niagara_pcbe 437*2063d9c0SJosef 'Jeff' SipekPCBE_KMODS += niagara2_pcbe 438*2063d9c0SJosef 'Jeff' SipekPCBE_KMODS += vfalls_pcbe 439*2063d9c0SJosef 'Jeff' SipekPCBE_KMODS += kt_pcbe 440