xref: /illumos-gate/usr/src/uts/sun4u/Makefile.sun4u (revision 0aaef2f5)
12063d9c0SJosef '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
52063d9c0SJosef 'Jeff' Sipek# Common Development and Distribution License (the "License").
62063d9c0SJosef '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#
212063d9c0SJosef 'Jeff' Sipek
222063d9c0SJosef 'Jeff' Sipek#
232063d9c0SJosef 'Jeff' Sipek# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
252063d9c0SJosef 'Jeff' Sipek# Copyright (c) 2013 Andrew Stormont.  All rights reserved.
262a1fd0ffSPeter Tribble# Copyright 2019 Peter Tribble.
27*91ab9467SPatrick Mooney# Copyright 2019 Joyent, Inc.
282063d9c0SJosef 'Jeff' Sipek#
292063d9c0SJosef 'Jeff' Sipek#	This makefile contains the common definitions for the sun4u unix
302063d9c0SJosef 'Jeff' Sipek#	and all sun4u implementation architecture dependent modules.
312063d9c0SJosef 'Jeff' Sipek#
322063d9c0SJosef 'Jeff' Sipek
332063d9c0SJosef 'Jeff' Sipek#
342063d9c0SJosef 'Jeff' Sipek#	Machine type (implementation architecture):
352063d9c0SJosef 'Jeff' Sipek#
362063d9c0SJosef 'Jeff' SipekPLATFORM	 = sun4u
372063d9c0SJosef 'Jeff' SipekPROMIF		 = ieee1275
382063d9c0SJosef 'Jeff' SipekPSMBASE		 = $(UTSBASE)/../psm
392063d9c0SJosef 'Jeff' Sipek
402063d9c0SJosef 'Jeff' Sipek#
412063d9c0SJosef 'Jeff' Sipek#	uname -m value
422063d9c0SJosef 'Jeff' Sipek#
432063d9c0SJosef 'Jeff' SipekUNAME_M		= $(PLATFORM)
442063d9c0SJosef 'Jeff' Sipek
452063d9c0SJosef 'Jeff' Sipek#
462063d9c0SJosef 'Jeff' Sipek# Definitions for the platform-specific /platform directories.
472063d9c0SJosef 'Jeff' Sipek#
482063d9c0SJosef 'Jeff' Sipek# PLATFORMS designates those sun4u machines which have no platform
492063d9c0SJosef 'Jeff' Sipek# specific code.
502063d9c0SJosef 'Jeff' Sipek#
512063d9c0SJosef 'Jeff' Sipek# IMPLEMENTATIONS is used to designate sun4u machines which do have
522063d9c0SJosef 'Jeff' Sipek# platform specific modules (perhaps including their own unix).  All
532063d9c0SJosef 'Jeff' Sipek# code specific to a given implementation resides in the appropriately
542063d9c0SJosef 'Jeff' Sipek# named subdirectory.   This requires these platforms to have their
552063d9c0SJosef 'Jeff' Sipek# own Makefiles to define ROOT_PLAT_DIRS, USR_PLAT_DIRS, etc.
562063d9c0SJosef 'Jeff' Sipek#
572063d9c0SJosef 'Jeff' Sipek# So if we had an implementation named 'foo', we would need the following
582063d9c0SJosef 'Jeff' Sipek# Makefiles in the foo subdirectory:
592063d9c0SJosef 'Jeff' Sipek#
602063d9c0SJosef 'Jeff' Sipek#	sun4u/foo/Makefile
612063d9c0SJosef 'Jeff' Sipek#	sun4u/foo/Makefile.foo
622063d9c0SJosef 'Jeff' Sipek#	sun4u/foo/Makefile.targ
632063d9c0SJosef 'Jeff' Sipek#
642063d9c0SJosef 'Jeff' Sipek
652063d9c0SJosef 'Jeff' Sipek#
662063d9c0SJosef 'Jeff' Sipek# /usr/platform/$(IMPLEMENTED_PLATFORM) is created as a directory that
672063d9c0SJosef 'Jeff' Sipek# all the $(LINKED_PLATFORMS) link to.
682063d9c0SJosef 'Jeff' Sipek#
692063d9c0SJosef 'Jeff' SipekIMPLEMENTED_PLATFORM	= SUNW,Ultra-2
702063d9c0SJosef 'Jeff' Sipek
712063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS	+= SUNW,Ultra-30
722063d9c0SJosef 'Jeff' SipekLINKED_PLATFORMS	+= SUNW,Ultra-60
732063d9c0SJosef 'Jeff' Sipek
742063d9c0SJosef 'Jeff' Sipek#
752063d9c0SJosef 'Jeff' Sipek# all PLATFORMS that do not belong in the $(IMPLEMENTATIONS) list
762063d9c0SJosef 'Jeff' Sipek# ie. all desktop platforms
772063d9c0SJosef 'Jeff' Sipek#
782063d9c0SJosef 'Jeff' SipekPLATFORMS                = $(IMPLEMENTED_PLATFORM)
792063d9c0SJosef 'Jeff' SipekPLATFORMS               += $(LINKED_PLATFORMS)
802063d9c0SJosef 'Jeff' Sipek
812063d9c0SJosef 'Jeff' SipekROOT_PLAT_DIRS		= $(PLATFORMS:%=$(ROOT_PLAT_DIR)/%)
822063d9c0SJosef 'Jeff' SipekUSR_PLAT_DIRS		= $(PLATFORMS:%=$(USR_PLAT_DIR)/%)
832063d9c0SJosef 'Jeff' Sipek
842063d9c0SJosef 'Jeff' SipekUSR_DESKTOP_DIR		= $(USR_PLAT_DIR)/$(IMPLEMENTED_PLATFORM)
852063d9c0SJosef 'Jeff' SipekUSR_DESKTOP_INC_DIR	= $(USR_DESKTOP_DIR)/include
862063d9c0SJosef 'Jeff' SipekUSR_DESKTOP_SBIN_DIR	= $(USR_DESKTOP_DIR)/sbin
872063d9c0SJosef 'Jeff' SipekUSR_DESKTOP_LIB_DIR	= $(USR_DESKTOP_DIR)/lib
882063d9c0SJosef 'Jeff' Sipek
892063d9c0SJosef 'Jeff' Sipek#
902063d9c0SJosef 'Jeff' Sipek# Welcome to SPARC V9.
912063d9c0SJosef 'Jeff' Sipek#
922063d9c0SJosef 'Jeff' Sipek
932063d9c0SJosef 'Jeff' Sipek#
942063d9c0SJosef 'Jeff' Sipek#	Define supported builds
952063d9c0SJosef 'Jeff' Sipek#
962063d9c0SJosef 'Jeff' SipekDEF_BUILDS	= $(DEF_BUILDS64)
972063d9c0SJosef 'Jeff' SipekALL_BUILDS	= $(ALL_BUILDS64)
982063d9c0SJosef 'Jeff' Sipek
992063d9c0SJosef 'Jeff' Sipek#
1002063d9c0SJosef 'Jeff' Sipek#	Everybody needs to know how to build modstubs.o and to locate unix.o
1012063d9c0SJosef 'Jeff' Sipek#
1022063d9c0SJosef 'Jeff' SipekUNIX_DIR	 = $(UTSBASE)/$(PLATFORM)/unix
1032063d9c0SJosef 'Jeff' SipekGENLIB_DIR	 = $(UTSBASE)/$(PLATFORM)/genunix
1042063d9c0SJosef 'Jeff' SipekMODSTUBS_DIR	 = $(UNIX_DIR)
1052063d9c0SJosef 'Jeff' SipekDSF_DIR		 = $(UTSBASE)/$(PLATFORM)/genassym
1061f4c6dbcSPeter Tribble
1072063d9c0SJosef 'Jeff' SipekDTRACESTUBS_O	 = $(OBJS_DIR)/dtracestubs.o
1082063d9c0SJosef 'Jeff' SipekDTRACESTUBS	 = $(OBJS_DIR)/libdtracestubs.so
1092063d9c0SJosef 'Jeff' Sipek
1102063d9c0SJosef 'Jeff' SipekUNIX_O		 = $(UNIX_DIR)/$(OBJS_DIR)/unix.o
1112063d9c0SJosef 'Jeff' SipekMODSTUBS_O	 = $(MODSTUBS_DIR)/$(OBJS_DIR)/modstubs.o
1121f4c6dbcSPeter TribbleGENLIB		 = $(GENLIB_DIR)/$(OBJS_DIR)/libgenunix.so
1132063d9c0SJosef 'Jeff' Sipek
1142063d9c0SJosef 'Jeff' Sipek#
1152063d9c0SJosef 'Jeff' Sipek#	cpu and platform modules need to know how to build their own symcheck module
1162063d9c0SJosef 'Jeff' Sipek#
1172063d9c0SJosef 'Jeff' SipekPLATMOD		 = platmod
1182063d9c0SJosef 'Jeff' SipekPLATLIB		 = $(PLAT_DIR)/$(OBJS_DIR)/libplatmod.so
1192063d9c0SJosef 'Jeff' Sipek
1202063d9c0SJosef 'Jeff' SipekCPUNAME		 = cpu
1212063d9c0SJosef 'Jeff' SipekCPULIB		 = $(CPU_DIR)/$(OBJS_DIR)/libcpu.so
1222063d9c0SJosef 'Jeff' Sipek
1232063d9c0SJosef 'Jeff' SipekSYM_MOD		 = $(OBJS_DIR)/unix.sym
1242063d9c0SJosef 'Jeff' Sipek
1252063d9c0SJosef 'Jeff' Sipek#
1262063d9c0SJosef 'Jeff' Sipek#	Include the makefiles which define build rule templates, the
1272063d9c0SJosef 'Jeff' Sipek#	collection of files per module, and a few specific flags. Note
1282063d9c0SJosef 'Jeff' Sipek#	that order is significant, just as with an include path. The
1292063d9c0SJosef 'Jeff' Sipek#	first build rule template which matches the files name will be
1302063d9c0SJosef 'Jeff' Sipek#	used. By including these in order from most machine dependent
1312063d9c0SJosef 'Jeff' Sipek#	to most machine independent, we allow a machine dependent file
1322063d9c0SJosef 'Jeff' Sipek#	to be used in preference over a machine independent version
1332063d9c0SJosef 'Jeff' Sipek#	(Such as a machine specific optimization, which preserves the
1342063d9c0SJosef 'Jeff' Sipek#	interfaces.)
1352063d9c0SJosef 'Jeff' Sipek#
1362063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sun4/Makefile.files
1372063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/$(PLATFORM)/Makefile.files
1382063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sfmmu/Makefile.files
1392063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sparc/v9/Makefile.files
1402063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sparc/Makefile.files
1412063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/sun/Makefile.files
1422063d9c0SJosef 'Jeff' Sipekinclude $(SRC)/psm/promif/$(PROMIF)/common/Makefile.files
1432063d9c0SJosef 'Jeff' Sipekinclude $(SRC)/psm/promif/$(PROMIF)/$(PLATFORM)/Makefile.files
1442063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/common/Makefile.files
1452063d9c0SJosef 'Jeff' Sipek
1462063d9c0SJosef 'Jeff' Sipek#
1472063d9c0SJosef 'Jeff' Sipek#	Include machine independent rules. Note that this does not imply
1482063d9c0SJosef 'Jeff' Sipek#	that the resulting module from rules in Makefile.uts is	machine
1492063d9c0SJosef 'Jeff' Sipek#	independent. Only that the build rules are machine independent.
1502063d9c0SJosef 'Jeff' Sipek#
1512063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/Makefile.uts
1522063d9c0SJosef 'Jeff' Sipek
1532063d9c0SJosef 'Jeff' Sipek# These come after Makefile.uts.
1541f4c6dbcSPeter TribbleIMPLEMENTATIONS		 = tazmo
1551f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= javelin
1561f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= darwin
1571f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= quasar
1581f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= grover
1591f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= enchilada
1601f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= taco
1611f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= mpxu
1621f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= excalibur
1631f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= serengeti
1641f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= littleneck
1651f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= daktari
1661f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= cherrystone
1671f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= fjlite
1681f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= schumacher
1691f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= boston
1701f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= seattle
1711f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= chicago
1721f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= sunfire
1731f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= lw8
1741f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= opl
1751f4c6dbcSPeter TribbleIMPLEMENTATIONS		+= lw2plus
1762063d9c0SJosef 'Jeff' Sipek
1772063d9c0SJosef 'Jeff' Sipek#
1782063d9c0SJosef 'Jeff' Sipek#	machine specific optimization, override default in Makefile.master
1792063d9c0SJosef 'Jeff' Sipek#
1802063d9c0SJosef 'Jeff' SipekCC_XARCH	= -m64 -xarch=sparcvis
1812063d9c0SJosef 'Jeff' SipekAS_XARCH	= -xarch=v9a
1822063d9c0SJosef 'Jeff' SipekCOPTIMIZE	= -xO3
1832063d9c0SJosef 'Jeff' SipekCCMODE		= -Xa
1842063d9c0SJosef 'Jeff' Sipek
1852063d9c0SJosef 'Jeff' SipekCFLAGS		= -xchip=ultra $(CCABS32) $(CCREGSYM)
1862063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(CC_XARCH)
1872063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(COPTIMIZE)
1882063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(EXTRA_CFLAGS)
1892063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(XAOPT)
1902063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(INLINES) -D_ASM_INLINES
1912063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(CCMODE)
1922063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(SPACEFLAG)
1932063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(CERRWARN)
1942063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(CTF_FLAGS_$(CLASS))
195bd0ce624SYuri PankovCFLAGS		+= $(CSTD)
1962063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(CCUNBOUND)
1972063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(CCNOAUTOINLINE)
1982063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(CCSTATICSYM)
1992063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(CC32BITCALLERS)
2002063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(IROPTFLAG)
2012063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(CGLOBALSTATIC)
2022063d9c0SJosef 'Jeff' SipekCFLAGS		+= -xregs=no%float
2032063d9c0SJosef 'Jeff' SipekCFLAGS		+= -xstrconst
2042063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(CSOURCEDEBUGFLAGS)
2052063d9c0SJosef 'Jeff' SipekCFLAGS		+= $(CUSERFLAGS)
2062063d9c0SJosef 'Jeff' Sipek
2072063d9c0SJosef 'Jeff' SipekASFLAGS		+= $(AS_XARCH)
2082063d9c0SJosef 'Jeff' Sipek
2092063d9c0SJosef 'Jeff' SipekAS_INC_PATH	+= -I$(DSF_DIR)/$(OBJS_DIR)
2102063d9c0SJosef 'Jeff' Sipek
2112063d9c0SJosef 'Jeff' Sipek
2122063d9c0SJosef 'Jeff' Sipek
2132063d9c0SJosef 'Jeff' Sipek#
2142063d9c0SJosef 'Jeff' Sipek#	The following must be defined for all implementations:
2152063d9c0SJosef 'Jeff' Sipek#
216*91ab9467SPatrick Mooney#	UNIX_MAPFILE:		ld mapfile for the build of kernel/unix.
2172063d9c0SJosef 'Jeff' Sipek#	MODSTUBS:		Module stubs source file.
2182063d9c0SJosef 'Jeff' Sipek#	GENCONST_SRC:		genconst.c
2192063d9c0SJosef 'Jeff' Sipek#	OFFSETS:		offsets.in
2202063d9c0SJosef 'Jeff' Sipek#	PLATFORM_OFFSETS:	Platform specific mach_offsets.in
2212063d9c0SJosef 'Jeff' Sipek#	FDOFFSETS:		fd_offsets.in
2222063d9c0SJosef 'Jeff' Sipek#
223*91ab9467SPatrick MooneyUNIX_MAPFILE	 = $(UTSBASE)/sun4/conf/Mapfile
2242063d9c0SJosef 'Jeff' SipekMODSTUBS	 = $(UTSBASE)/sparc/ml/modstubs.s
2252063d9c0SJosef 'Jeff' SipekGENCONST_SRC	 = $(UTSBASE)/sun4/ml/genconst.c
2262063d9c0SJosef 'Jeff' SipekOFFSETS		 = $(UTSBASE)/sun4/ml/offsets.in
2272063d9c0SJosef 'Jeff' SipekPLATFORM_OFFSETS = $(UTSBASE)/sun4u/ml/mach_offsets.in
2281f4c6dbcSPeter TribbleFDOFFSETS	 = $(UTSBASE)/sun/io/fd_offsets.in
2292063d9c0SJosef 'Jeff' Sipek
2302063d9c0SJosef 'Jeff' Sipek#
2312063d9c0SJosef 'Jeff' Sipek#	Define the actual specific platforms
2322063d9c0SJosef 'Jeff' Sipek#
2332063d9c0SJosef 'Jeff' Sipek
2342063d9c0SJosef 'Jeff' SipekMACHINE_DEFS	= -D$(PLATFORM) -D_MACHDEP -DSFMMU
2352063d9c0SJosef 'Jeff' Sipek
2362063d9c0SJosef 'Jeff' Sipek#
2372063d9c0SJosef 'Jeff' Sipek#	Software workarounds for hardware "features"
2382063d9c0SJosef 'Jeff' Sipek#
2392063d9c0SJosef 'Jeff' Sipek
2402063d9c0SJosef 'Jeff' Sipekinclude $(UTSBASE)/$(PLATFORM)/Makefile.workarounds
2412063d9c0SJosef 'Jeff' Sipek
2427c478bd9Sstevel@tonic-gate#
2432063d9c0SJosef 'Jeff' Sipek#	Debugging level
2447c478bd9Sstevel@tonic-gate#
2452063d9c0SJosef 'Jeff' Sipek#	Special knowledge of which special debugging options effect which
2462063d9c0SJosef 'Jeff' Sipek#	file is used to optimize the build if these flags are changed.
2472063d9c0SJosef 'Jeff' Sipek#
2482063d9c0SJosef 'Jeff' Sipek#	XXX: The above could possibly be done for more flags and files, but
2492063d9c0SJosef 'Jeff' Sipek#	     is left as an experiment to the interested reader. Be forewarned,
2502063d9c0SJosef 'Jeff' Sipek#	     that excessive use could lead to maintenance difficulties.
2512063d9c0SJosef 'Jeff' Sipek#
2522063d9c0SJosef 'Jeff' Sipek#	Note: kslice can be enabled for the sun4u, but is disabled by default
2532063d9c0SJosef 'Jeff' Sipek#	      in all cases.
2542063d9c0SJosef 'Jeff' Sipek#
2552063d9c0SJosef 'Jeff' Sipek
2562063d9c0SJosef 'Jeff' SipekDEBUG_DEFS_OBJ64	=
2572063d9c0SJosef 'Jeff' SipekDEBUG_DEFS_DBG64	= -DDEBUG
2582063d9c0SJosef 'Jeff' SipekDEBUG_DEFS		= $(DEBUG_DEFS_$(BUILD_TYPE))
2592063d9c0SJosef 'Jeff' Sipek
2602063d9c0SJosef 'Jeff' SipekDEBUG_COND_OBJ64	= $(POUND_SIGN)
2611f4c6dbcSPeter TribbleDEBUG_COND_DBG64	=
2622063d9c0SJosef 'Jeff' SipekIF_DEBUG_OBJ		= $(DEBUG_COND_$(BUILD_TYPE))$(OBJS_DIR)/
2632063d9c0SJosef 'Jeff' Sipek
2642063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)trap.o		:=	DEBUG_DEFS	+= -DTRAPDEBUG
2652063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)mach_trap.o	:=	DEBUG_DEFS	+= -DTRAPDEBUG
2662063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)syscall_trap.o	:=	DEBUG_DEFS	+= -DSYSCALLTRACE
2672063d9c0SJosef 'Jeff' Sipek$(IF_DEBUG_OBJ)clock.o		:=	DEBUG_DEFS	+= -DKSLICE=0
2682063d9c0SJosef 'Jeff' Sipek
2692063d9c0SJosef 'Jeff' SipekIF_TRAPTRACE_OBJ = $(IF_DEBUG_OBJ)
2702063d9c0SJosef 'Jeff' Sipek# comment this out for a non-debug kernel with TRAPTRACE
2712063d9c0SJosef 'Jeff' Sipek#IF_TRAPTRACE_OBJ = $(OBJS_DIR)/
2722063d9c0SJosef 'Jeff' Sipek
2732063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_locore.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
2742063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mlsetup.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2751f4c6dbcSPeter Tribble$(IF_TRAPTRACE_OBJ)syscall_trap.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
2762063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)startup.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2772063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_startup.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
2782063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mp_startup.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2792063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)cpu_states.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2802063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_cpu_states.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
2812063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)interrupt.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2822063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_interrupt.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
2832063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)sfmmu_asm.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2842063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)trap_table.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2852063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)xc.o			:=	DEBUG_DEFS	+= -DTRAPTRACE
2862063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_xc.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2872063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)wbuf.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2882063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)trap.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2892063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)mach_trap.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2902063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)x_call.o		:=	DEBUG_DEFS	+= -DTRAPTRACE
2912063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)spitfire_asm.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
2922063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)us3_common_asm.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
2932063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)us3_cheetah_asm.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
2942063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)us3_cheetahplus_asm.o :=	DEBUG_DEFS	+= -DTRAPTRACE
2952063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)us3_jalapeno_asm.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
2962063d9c0SJosef 'Jeff' Sipek$(IF_TRAPTRACE_OBJ)opl_olympus_asm.o	:=	DEBUG_DEFS	+= -DTRAPTRACE
2972063d9c0SJosef 'Jeff' Sipek
2982063d9c0SJosef 'Jeff' Sipek# Comment these out if you don't want dispatcher lock statistics.
2992063d9c0SJosef 'Jeff' Sipek
3002063d9c0SJosef 'Jeff' Sipek#$(IF_DEBUG_OBJ)lock_prim.o	:= DEBUG_DEFS	+= -DDISP_LOCK_STATS
3012063d9c0SJosef 'Jeff' Sipek#$(IF_DEBUG_OBJ)disp.o		:= DEBUG_DEFS	+= -DDISP_LOCK_STATS
3022063d9c0SJosef 'Jeff' Sipek
3031f4c6dbcSPeter Tribble# Comment these out if you don't want dispatcher debugging
3042063d9c0SJosef 'Jeff' Sipek
3052063d9c0SJosef 'Jeff' Sipek#$(IF_DEBUG_OBJ)lock_prim.o	:= DEBUG_DEFS	+= -DDISP_DEBUG
3062063d9c0SJosef 'Jeff' Sipek
3072063d9c0SJosef 'Jeff' Sipek#
3082063d9c0SJosef 'Jeff' Sipek#	Collect the preprocessor definitions to be associated with *all*
3092063d9c0SJosef 'Jeff' Sipek#	files.
3102063d9c0SJosef 'Jeff' Sipek#
3112063d9c0SJosef 'Jeff' SipekALL_DEFS	 = $(MACHINE_DEFS) $(WORKAROUND_DEFS) $(DEBUG_DEFS) \
3122063d9c0SJosef 'Jeff' Sipek		   $(OPTION_DEFS)
3132063d9c0SJosef 'Jeff' SipekGENCONST_DEFS	 = $(MACHINE_DEFS) $(OPTION_DEFS)
3142063d9c0SJosef 'Jeff' Sipek
3152063d9c0SJosef 'Jeff' Sipek#
3162063d9c0SJosef 'Jeff' Sipek# ----- TRANSITIONAL SECTION --------------------------------------------------
3172063d9c0SJosef 'Jeff' Sipek#
3182063d9c0SJosef 'Jeff' Sipek
3192063d9c0SJosef 'Jeff' Sipek#
3202063d9c0SJosef 'Jeff' Sipek#	Not everything which *should* be a module is a module yet. The
3212063d9c0SJosef 'Jeff' Sipek#	following is a list of such objects which are currently part of
3222063d9c0SJosef 'Jeff' Sipek#	the base kernel but should soon become kmods.
3232063d9c0SJosef 'Jeff' Sipek#
3242063d9c0SJosef 'Jeff' SipekMACH_NOT_YET_KMODS	 = $(AUTOCONF_OBJS)
3252063d9c0SJosef 'Jeff' Sipek
3262063d9c0SJosef 'Jeff' Sipek#
3272063d9c0SJosef 'Jeff' Sipek# ----- END OF TRANSITIONAL SECTION -------------------------------------------
3282063d9c0SJosef 'Jeff' Sipek#
3292063d9c0SJosef 'Jeff' Sipek
3302063d9c0SJosef 'Jeff' Sipek#
3312063d9c0SJosef 'Jeff' Sipek#	The kernels modules which are "implementation architecture"
3322063d9c0SJosef 'Jeff' Sipek#	specific for this machine are enumerated below. Note that most
3332063d9c0SJosef 'Jeff' Sipek#	of these modules must exist (in one form or another) for each
3342063d9c0SJosef 'Jeff' Sipek#	architecture.
3352063d9c0SJosef 'Jeff' Sipek#
3362063d9c0SJosef 'Jeff' Sipek#	Common Drivers (usually pseudo drivers) (/kernel/drv):
3372063d9c0SJosef 'Jeff' Sipek#
3382063d9c0SJosef 'Jeff' Sipek
3392063d9c0SJosef 'Jeff' Sipek#
3402063d9c0SJosef 'Jeff' Sipek#	Machine Specific Driver Modules (/kernel/drv):
3412063d9c0SJosef 'Jeff' Sipek#
3422063d9c0SJosef 'Jeff' Sipek#	XXX: How many of these are really machine specific?
3432063d9c0SJosef 'Jeff' Sipek#
3442063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= bbc_beep
3452063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= cpc
3462063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= fd
3472063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= rootnex sbusmem upa64s zs zsh
3482063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= sbus
3492063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= pcisch pcipsy simba
3502063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= px
3512063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= ebus
3522063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= su
3532063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= tod
3542063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= power
3552063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= epic
3562063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= grbeep
3572063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= pcf8584 max1617 seeprom tda8444 pca9556
3582063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= ics951601 adm1031
3592063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= lm75 ltc1427 pcf8591 pcf8574 ssc050 ssc100
3602063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= pic16f819
3612063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= pic16f747
3622063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= adm1026
3632063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= us
3642063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= ppm schppm jbusppm
3652063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= mc-us3
3662063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= mc-us3i
3672063d9c0SJosef 'Jeff' SipekDRV_KMODS       += smbus
3682063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= db21554
3692063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= gpio_87317
3702063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= isadma
3712063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= sbbc
3722063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= pmubus
3732063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= pmugpio
3742063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= pmc
3752063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= trapstat
3762063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= rmc_comm
3772063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= rmcadm
3782063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= rmclomv
3792063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= sf
3802063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= nxge
3812063d9c0SJosef 'Jeff' SipekDRV_KMODS	+= mem_cache
3822063d9c0SJosef 'Jeff' Sipek
3832063d9c0SJosef 'Jeff' Sipek#
3842063d9c0SJosef 'Jeff' Sipek#	Exec Class Modules (/kernel/exec):
3852063d9c0SJosef 'Jeff' Sipek#
3862063d9c0SJosef 'Jeff' SipekEXEC_KMODS	+=
3872063d9c0SJosef 'Jeff' Sipek
3882063d9c0SJosef 'Jeff' Sipek#
3892063d9c0SJosef 'Jeff' Sipek#	Scheduling Class Modules (/kernel/sched):
3902063d9c0SJosef 'Jeff' Sipek#
3912063d9c0SJosef 'Jeff' SipekSCHED_KMODS	+=
3922063d9c0SJosef 'Jeff' Sipek
3932063d9c0SJosef 'Jeff' Sipek#
3942063d9c0SJosef 'Jeff' Sipek#	File System Modules (/kernel/fs):
3952063d9c0SJosef 'Jeff' Sipek#
3962063d9c0SJosef 'Jeff' SipekFS_KMODS	+=
3972063d9c0SJosef 'Jeff' Sipek
3982063d9c0SJosef 'Jeff' Sipek#
3992063d9c0SJosef 'Jeff' Sipek#	'System' Modules (/kernel/sys):
4002063d9c0SJosef 'Jeff' Sipek#
4012063d9c0SJosef 'Jeff' SipekSYS_KMODS	+=
4022063d9c0SJosef 'Jeff' Sipek
4032063d9c0SJosef 'Jeff' Sipek#
4042063d9c0SJosef 'Jeff' Sipek#	'User' Modules (/kernel/misc):
4052063d9c0SJosef 'Jeff' Sipek#
4062063d9c0SJosef 'Jeff' SipekMISC_KMODS	+= bignum
4072063d9c0SJosef 'Jeff' SipekMISC_KMODS	+= obpsym bootdev vis cpr platmod md5 sha1 i2c_svc
4082063d9c0SJosef 'Jeff' SipekMISC_KMODS	+= sbd
4092063d9c0SJosef 'Jeff' Sipek
4102063d9c0SJosef 'Jeff' SipekMISC_KMODS	+= opl_cfg
4112063d9c0SJosef 'Jeff' SipekMISC_KMODS	+= gptwo_cpu gptwocfg
4122063d9c0SJosef 'Jeff' SipekMISC_KMODS	+= pcie
4132063d9c0SJosef 'Jeff' Sipek
4142063d9c0SJosef 'Jeff' Sipek#
4152063d9c0SJosef 'Jeff' Sipek#	Brand modules
4162063d9c0SJosef 'Jeff' Sipek#
4172063d9c0SJosef 'Jeff' SipekBRAND_KMODS	+= sn1_brand s10_brand
4187c478bd9Sstevel@tonic-gate
4192063d9c0SJosef 'Jeff' Sipek#
4202063d9c0SJosef 'Jeff' Sipek#	Software Cryptographic Providers (/kernel/crypto):
4212063d9c0SJosef 'Jeff' Sipek#
4222063d9c0SJosef 'Jeff' SipekCRYPTO_KMODS	+= aes
4232063d9c0SJosef 'Jeff' SipekCRYPTO_KMODS	+= arcfour
4242063d9c0SJosef 'Jeff' SipekCRYPTO_KMODS	+= des
4252063d9c0SJosef 'Jeff' Sipek
4262063d9c0SJosef 'Jeff' Sipek#
4272063d9c0SJosef 'Jeff' Sipek#	generic-unix module (/kernel/genunix):
4282063d9c0SJosef 'Jeff' Sipek#
4292063d9c0SJosef 'Jeff' SipekGENUNIX_KMODS	+= genunix
4302063d9c0SJosef 'Jeff' Sipek
4312063d9c0SJosef 'Jeff' Sipek#
4322063d9c0SJosef 'Jeff' Sipek#	Modules eXcluded from the product:
4332063d9c0SJosef 'Jeff' Sipek#
4342063d9c0SJosef 'Jeff' SipekXMODS		+=
4357c478bd9Sstevel@tonic-gate
4362063d9c0SJosef 'Jeff' Sipek#
4372063d9c0SJosef 'Jeff' Sipek#	cpu modules
4382063d9c0SJosef 'Jeff' Sipek#
4392063d9c0SJosef 'Jeff' SipekCPU_KMODS	+= cheetah cheetahplus jalapeno serrano spitfire hummingbird
4402063d9c0SJosef 'Jeff' Sipek
4412063d9c0SJosef 'Jeff' Sipek#
4422063d9c0SJosef 'Jeff' Sipek#	sun4u 'TOD' Modules (/platform/.../kernel/tod):
4432063d9c0SJosef 'Jeff' Sipek#
4441f4c6dbcSPeter TribbleTOD_KMODS	+= todds1287 todds1337 todmostek
44566582b60SPeter TribbleTOD_KMODS	+= todm5819 todbq4802 todsg todopl
4461f4c6dbcSPeter TribbleTOD_KMODS	+= todm5819p_rmc
4472063d9c0SJosef 'Jeff' Sipek
4482063d9c0SJosef 'Jeff' Sipek#
4492063d9c0SJosef 'Jeff' Sipek#	Performance Counter BackEnd Modules (/usr/kernel/pcbe):
4502063d9c0SJosef 'Jeff' Sipek#
4512063d9c0SJosef 'Jeff' SipekPCBE_KMODS	+= us234_pcbe
4522063d9c0SJosef 'Jeff' SipekPCBE_KMODS	+= opl_pcbe
453