xref: /illumos-gate/usr/src/uts/i86pc/Makefile.files (revision fc910014e8a32a65612105835a10995f2c13d942)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
24#
25# Copyright (c) 2010, Intel Corporation.
26# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
27# Copyright 2020 Joyent, Inc.
28# Copyright 2023 Oxide Computer Company
29# Copyright 2021 Jason King
30#
31#	This Makefile defines file modules in the directory uts/i86pc
32#	and its children. These are the source files which are i86pc
33#	"implementation architecture" dependent.
34#
35
36#
37#	object lists
38#
39CORE_OBJS +=			\
40	acpi_stubs.o		\
41	biosdisk.o		\
42	bios_call.o		\
43	cbe.o			\
44	cmi.o			\
45	cmi_hw.o		\
46	cms.o			\
47	comm_page.o		\
48	confunix.o		\
49	cpu_idle.o		\
50	cpuid.o			\
51	cpuid_subr.o		\
52	cpupm.o			\
53	cpupm_mach.o		\
54	cpupm_amd.o		\
55	cpupm_intel.o		\
56	cpupm_throttle.o	\
57	cpu_acpi.o		\
58	dis_tables.o		\
59	ddi_impl.o		\
60	dtrace_subr.o		\
61	dvma.o			\
62	fpu_subr.o		\
63	fakebop.o		\
64	fastboot.o		\
65	fb_swtch.o		\
66	graphics.o		\
67	hardclk.o		\
68	hat_i86.o		\
69	hat_kdi.o		\
70	hment.o			\
71	hold_page.o		\
72	hpet_acpi.o		\
73	hrtimers.o		\
74	htable.o		\
75	hypercall.o		\
76	hypersubr.o		\
77	i86_mmu.o		\
78	ibft.o			\
79	instr_size.o		\
80	intr.o			\
81	kboot_mmu.o		\
82	kdi_idt.o		\
83	kdi_idthdl.o		\
84	kdi_asm.o		\
85	lgrpplat.o		\
86	mach_kdi.o		\
87	mach_sysconfig.o	\
88	machdep.o		\
89	md_clear.o		\
90	mem_config.o		\
91	mem_config_stubs.o	\
92	mem_config_arch.o	\
93	memlist_new.o		\
94	memnode.o		\
95	microcode_amd.o		\
96	microcode_intel.o	\
97	mlsetup.o		\
98	mp_call.o		\
99	mp_implfuncs.o		\
100	mp_machdep.o		\
101	mp_pc.o			\
102	mp_startup.o		\
103	memscrub.o		\
104	mpcore.o		\
105	notes.o			\
106	pci_bios.o		\
107	pci_cfgacc.o		\
108	pci_cfgacc_x86.o	\
109	pci_cfgspace.o		\
110	pci_mech1.o		\
111	pci_mech1_amd.o		\
112	pci_mech2.o		\
113	pci_neptune.o		\
114	pci_orion.o		\
115	pmem.o			\
116	ppage.o			\
117	prom_panic.o		\
118	prom_reboot.o		\
119	pwrnow.o		\
120	speedstep.o		\
121	ssp.o			\
122	startup.o		\
123	timestamp.o		\
124	todpc_subr.o		\
125	tscc_hpet.o		\
126	tscc_pit.o		\
127	tscc_vmware.o		\
128	trap.o			\
129	turbo.o			\
130	ucode_utils_amd.o	\
131	ucode_utils_intel.o	\
132	vm_machdep.o		\
133	xpv_platform.o		\
134	x_call.o
135
136#
137#	Add the SMBIOS subsystem object files directly to the list of objects
138#	built into unix itself; this is all common code except for smb_dev.c.
139#
140CORE_OBJS += $(SMBIOS_OBJS)
141
142#
143# These get compiled twice:
144# - once in the dboot (direct boot) identity mapped code
145# - once for use during early startup in unix
146#
147BOOT_DRIVER_OBJS =		\
148	boot_console.o		\
149	boot_keyboard.o		\
150	boot_keyboard_table.o	\
151	boot_vga.o		\
152	boot_fb.o		\
153	boot_mmu.o		\
154	dboot_multiboot2.o	\
155	$(FONT_OBJS)
156
157CORE_OBJS += $(BOOT_DRIVER_OBJS)
158
159#
160#	locore.o is special. It must be the first file relocated so that it
161#	it is relocated just where its name implies.
162#
163SPECIAL_OBJS +=			\
164	locore.o		\
165	fast_trap_asm.o		\
166	interrupt.o		\
167	syscall_asm_amd64.o	\
168	kpti_trampolines.o
169
170#
171# Objects that get compiled into the identity mapped PT_LOAD section of unix
172# to handle the earliest part of booting.
173#
174DBOOT_OBJS_32 =
175
176DBOOT_OBJS_64 += dboot_elfload.o
177
178DBOOT_OBJS +=			\
179	dboot_asm.o		\
180	dboot_grub.o		\
181	dboot_printf.o		\
182	dboot_startkern.o	\
183	memcpy.o		\
184	memset.o		\
185	muldiv.o		\
186	sha1.o			\
187	string.o		\
188	$(BOOT_DRIVER_OBJS)	\
189	$(DBOOT_OBJS_$(CLASS))
190
191#
192#			driver and misc modules
193#
194GFX_PRIVATE_OBJS	+= gfx_private.o gfxp_pci.o gfxp_segmap.o \
195			   gfxp_devmap.o gfxp_vgatext.o gfxp_vm.o vgasubr.o \
196			   gfxp_fb.o gfxp_bitmap.o
197FIPE_OBJS += fipe_drv.o fipe_pm.o
198IOAT_OBJS += ioat.o ioat_rs.o ioat_ioctl.o ioat_chan.o
199ISANEXUS_OBJS += isa.o dma_engine.o i8237A.o
200PCIE_MISC_OBJS += pcie_acpi.o pciehpc_acpi.o pcie_x86.o
201PCI_E_NEXUS_OBJS += npe.o npe_misc.o
202PCI_E_NEXUS_OBJS += pci_common.o pci_kstats.o pci_tools.o
203PCINEXUS_OBJS += pci.o pci_common.o pci_kstats.o pci_tools.o
204PCPLUSMP_OBJS += apic.o apic_regops.o psm_common.o apic_introp.o	\
205			mp_platform_common.o mp_platform_misc.o		\
206			apic_common.o apic_timer.o
207APIX_OBJS += apix.o apic_regops.o psm_common.o apix_intr.o apix_utils.o \
208		apix_irm.o mp_platform_common.o apic_common.o \
209		apic_timer.o apix_regops.o
210
211
212ACPI_DRV_OBJS	+= acpi_drv.o acpi_video.o
213ACPINEX_OBJS	+= acpinex_drv.o acpinex_event.o
214
215CPUDRV_OBJS	+= \
216	cpudrv.o \
217	cpudrv_mach.o
218
219PPM_OBJS	+= ppm_subr.o ppm.o ppm_plat.o
220
221ACPIPPM_OBJS	+= acpippm.o acpisleep.o
222ACPIDEV_OBJS += acpidev_drv.o \
223	acpidev_scope.o acpidev_device.o \
224	acpidev_container.o \
225	acpidev_cpu.o \
226	acpidev_dr.o \
227	acpidev_memory.o \
228	acpidev_pci.o \
229	acpidev_resource.o \
230	acpidev_usbport.o \
231	acpidev_util.o
232
233DRMACH_ACPI_OBJS += drmach_acpi.o dr_util.o drmach_err.o
234
235DR_OBJS	+= dr.o dr_cpu.o dr_err.o dr_io.o dr_mem_acpi.o dr_quiesce.o dr_util.o
236
237ROOTNEX_OBJS += rootnex.o immu.o immu_dmar.o immu_dvma.o \
238		immu_intrmap.o immu_qinv.o immu_regs.o
239
240TZMON_OBJS	+= tzmon.o
241UPPC_OBJS += uppc.o psm_common.o
242XSVC_OBJS += xsvc.o
243AMD_IOMMU_OBJS +=	amd_iommu.o amd_iommu_impl.o amd_iommu_acpi.o \
244			amd_iommu_cmd.o amd_iommu_log.o amd_iommu_page_tables.o
245
246PCI_PRD_OBJS += pci_prd_i86pc.o pci_memlist.o
247
248#
249#	Build up defines and paths.
250#
251ALL_DEFS	+= -Di86pc
252INC_PATH	+= -I$(UTSBASE)/i86pc -I$(SRC)/common
253INC_PATH	+= -I$(UTSBASE)/i86xpv -I$(UTSBASE)/common/xen
254
255#
256# Since the assym files are derived, the dependencies must be explicit for
257# all files including this file. (This is only actually required in the
258# instance when the .nse_depinfo file does not exist.)
259#
260
261ASSYM_DEPS      +=		\
262	copy.o			\
263	desctbls_asm.o		\
264	ddi_i86_asm.o		\
265	exception.o		\
266	fast_trap_asm.o		\
267	float.o			\
268	i86_subr.o		\
269	interrupt.o		\
270	lock_prim.o		\
271	locore.o		\
272	mpcore.o		\
273	sseblk.o		\
274	swtch.o			\
275	syscall_asm_amd64.o	\
276	kpti_trampolines.o	\
277	cpr_wakecode.o
278
279CPR_IMPL_OBJS	= cpr_impl.o	cpr_wakecode.o
280
281$(KDI_ASSYM_DEPS:%=$(OBJS_DIR)/%):	$(DSF_DIR)/$(OBJS_DIR)/kdi_assym.h
282