xref: /illumos-gate/usr/src/uts/i86pc/Makefile.files (revision c3d5f7c4)
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 2021 Oxide Computer Company
29#
30#	This Makefile defines file modules in the directory uts/i86pc
31#	and its children. These are the source files which are i86pc
32#	"implementation architecture" dependent.
33#
34
35#
36#	object lists
37#
38CORE_OBJS +=			\
39	acpi_stubs.o		\
40	biosdisk.o		\
41	bios_call.o		\
42	cbe.o			\
43	cmi.o			\
44	cmi_hw.o		\
45	cms.o			\
46	comm_page.o		\
47	confunix.o		\
48	cpu_idle.o		\
49	cpuid.o			\
50	cpuid_subr.o		\
51	cpupm.o			\
52	cpupm_mach.o		\
53	cpupm_amd.o		\
54	cpupm_intel.o		\
55	cpupm_throttle.o	\
56	cpu_acpi.o		\
57	dis_tables.o		\
58	ddi_impl.o		\
59	dtrace_subr.o		\
60	dvma.o			\
61	fpu_subr.o		\
62	fakebop.o		\
63	fastboot.o		\
64	fb_swtch.o		\
65	graphics.o		\
66	hardclk.o		\
67	hat_i86.o		\
68	hat_kdi.o		\
69	hma.o			\
70	hma_asm.o		\
71	hma_fpu.o		\
72	hment.o			\
73	hold_page.o		\
74	hpet_acpi.o		\
75	hrtimers.o		\
76	htable.o		\
77	hypercall.o		\
78	hypersubr.o		\
79	i86_mmu.o		\
80	ibft.o			\
81	instr_size.o		\
82	intr.o			\
83	kboot_mmu.o		\
84	kdi_idt.o		\
85	kdi_idthdl.o		\
86	kdi_asm.o		\
87	lgrpplat.o		\
88	mach_kdi.o		\
89	mach_sysconfig.o	\
90	machdep.o		\
91	md_clear.o		\
92	mem_config.o		\
93	mem_config_stubs.o	\
94	mem_config_arch.o	\
95	memlist_new.o		\
96	memnode.o		\
97	microcode.o		\
98	mlsetup.o		\
99	mp_call.o		\
100	mp_implfuncs.o		\
101	mp_machdep.o		\
102	mp_pc.o			\
103	mp_startup.o		\
104	memscrub.o		\
105	mpcore.o		\
106	notes.o			\
107	pci_bios.o		\
108	pci_cfgacc.o		\
109	pci_cfgacc_x86.o	\
110	pci_cfgspace.o		\
111	pci_mech1.o		\
112	pci_mech1_amd.o		\
113	pci_mech2.o		\
114	pci_neptune.o		\
115	pci_orion.o		\
116	pmem.o			\
117	ppage.o			\
118	pwrnow.o		\
119	smt.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	trap.o			\
128	turbo.o			\
129	vm_machdep.o		\
130	xpv_platform.o		\
131	x_call.o
132
133#
134#	Add the SMBIOS subsystem object files directly to the list of objects
135#	built into unix itself; this is all common code except for smb_dev.c.
136#
137CORE_OBJS += $(SMBIOS_OBJS)
138
139#
140# These get compiled twice:
141# - once in the dboot (direct boot) identity mapped code
142# - once for use during early startup in unix
143#
144BOOT_DRIVER_OBJS =		\
145	boot_console.o		\
146	boot_keyboard.o		\
147	boot_keyboard_table.o	\
148	boot_vga.o		\
149	boot_fb.o		\
150	boot_mmu.o		\
151	dboot_multiboot2.o	\
152	$(FONT_OBJS)
153
154CORE_OBJS += $(BOOT_DRIVER_OBJS)
155
156#
157#	locore.o is special. It must be the first file relocated so that it
158#	it is relocated just where its name implies.
159#
160SPECIAL_OBJS +=			\
161	locore.o		\
162	fast_trap_asm.o		\
163	interrupt.o		\
164	syscall_asm_amd64.o	\
165	kpti_trampolines.o
166
167#
168# Objects that get compiled into the identity mapped PT_LOAD section of unix
169# to handle the earliest part of booting.
170#
171DBOOT_OBJS_32 =
172
173DBOOT_OBJS_64 += dboot_elfload.o
174
175DBOOT_OBJS +=			\
176	dboot_asm.o		\
177	dboot_grub.o		\
178	dboot_printf.o		\
179	dboot_startkern.o	\
180	memcpy.o		\
181	memset.o		\
182	muldiv.o		\
183	sha1.o			\
184	string.o		\
185	$(BOOT_DRIVER_OBJS)	\
186	$(DBOOT_OBJS_$(CLASS))
187
188#
189#			driver and misc modules
190#
191GFX_PRIVATE_OBJS	+= gfx_private.o gfxp_pci.o gfxp_segmap.o \
192			   gfxp_devmap.o gfxp_vgatext.o gfxp_vm.o vgasubr.o \
193			   gfxp_fb.o gfxp_bitmap.o
194FIPE_OBJS += fipe_drv.o fipe_pm.o
195IOAT_OBJS += ioat.o ioat_rs.o ioat_ioctl.o ioat_chan.o
196ISANEXUS_OBJS += isa.o dma_engine.o i8237A.o
197PCIE_MISC_OBJS += pcie_acpi.o pciehpc_acpi.o pcie_x86.o
198PCI_E_NEXUS_OBJS += npe.o npe_misc.o
199PCI_E_NEXUS_OBJS += pci_common.o pci_kstats.o pci_tools.o
200PCINEXUS_OBJS += pci.o pci_common.o pci_kstats.o pci_tools.o
201PCPLUSMP_OBJS += apic.o apic_regops.o psm_common.o apic_introp.o	\
202			mp_platform_common.o mp_platform_misc.o		\
203			apic_common.o apic_timer.o
204APIX_OBJS += apix.o apic_regops.o psm_common.o apix_intr.o apix_utils.o \
205		apix_irm.o mp_platform_common.o apic_common.o \
206		apic_timer.o apix_regops.o
207
208
209ACPI_DRV_OBJS	+= acpi_drv.o acpi_video.o
210ACPINEX_OBJS	+= acpinex_drv.o acpinex_event.o
211
212CPUDRV_OBJS	+= \
213	cpudrv.o \
214	cpudrv_mach.o
215
216PPM_OBJS	+= ppm_subr.o ppm.o ppm_plat.o
217
218ACPIPPM_OBJS	+= acpippm.o acpisleep.o
219ACPIDEV_OBJS += acpidev_drv.o \
220	acpidev_scope.o acpidev_device.o \
221	acpidev_container.o \
222	acpidev_cpu.o \
223	acpidev_dr.o \
224	acpidev_memory.o \
225	acpidev_pci.o \
226	acpidev_resource.o \
227	acpidev_usbport.o \
228	acpidev_util.o
229
230DRMACH_ACPI_OBJS += drmach_acpi.o dr_util.o drmach_err.o
231
232DR_OBJS	+= dr.o dr_cpu.o dr_err.o dr_io.o dr_mem_acpi.o dr_quiesce.o dr_util.o
233
234ROOTNEX_OBJS += rootnex.o immu.o immu_dmar.o immu_dvma.o \
235		immu_intrmap.o immu_qinv.o immu_regs.o
236
237TZMON_OBJS	+= tzmon.o
238UPPC_OBJS += uppc.o psm_common.o
239XSVC_OBJS += xsvc.o
240AMD_IOMMU_OBJS +=	amd_iommu.o amd_iommu_impl.o amd_iommu_acpi.o \
241			amd_iommu_cmd.o amd_iommu_log.o amd_iommu_page_tables.o
242VMM_OBJS += vmm.o \
243	vmm_sol_dev.o \
244	vmm_host.o \
245	vmm_instruction_emul.o \
246	vmm_ioport.o \
247	vmm_lapic.o \
248	vmm_mem.o \
249	vmm_stat.o \
250	vmm_util.o \
251	x86.o \
252	iommu.o \
253	vatpic.o \
254	vatpit.o \
255	vhpet.o \
256	vioapic.o \
257	vlapic.o \
258	vrtc.o \
259	vpmtmr.o \
260	ept.o \
261	vmcs.o \
262	vmx_msr.o \
263	vmx.o \
264	vmx_support.o \
265	vtd.o \
266	vtd_sol.o \
267	svm.o \
268	svm_msr.o \
269	npt.o \
270	vmcb.o \
271	svm_support.o \
272	amdv.o \
273	vmm_gpt.o \
274	seg_vmm.o \
275	vmm_reservoir.o \
276	vmm_sol_vm.o \
277	vmm_sol_glue.o \
278	vmm_sol_ept.o \
279	vmm_sol_rvi.o \
280	vmm_support.o \
281	vmm_zsd.o
282
283VIONA_OBJS += viona_main.o \
284	viona_ring.o \
285	viona_rx.o \
286	viona_tx.o \
287	viona_hook.o \
288
289PPT_OBJS += ppt.o
290
291#
292#	Build up defines and paths.
293#
294ALL_DEFS	+= -Di86pc
295INC_PATH	+= -I$(UTSBASE)/i86pc -I$(SRC)/common
296INC_PATH	+= -I$(UTSBASE)/i86xpv -I$(UTSBASE)/common/xen
297
298#
299# Since the assym files are derived, the dependencies must be explicit for
300# all files including this file. (This is only actually required in the
301# instance when the .nse_depinfo file does not exist.)
302#
303
304ASSYM_DEPS      +=		\
305	copy.o			\
306	desctbls_asm.o		\
307	ddi_i86_asm.o		\
308	exception.o		\
309	fast_trap_asm.o		\
310	float.o			\
311	i86_subr.o		\
312	interrupt.o		\
313	lock_prim.o		\
314	locore.o		\
315	mpcore.o		\
316	sseblk.o		\
317	swtch.o			\
318	syscall_asm_amd64.o	\
319	kpti_trampolines.o	\
320	cpr_wakecode.o
321
322CPR_IMPL_OBJS	= cpr_impl.o	cpr_wakecode.o
323
324$(KDI_ASSYM_DEPS:%=$(OBJS_DIR)/%):	$(DSF_DIR)/$(OBJS_DIR)/kdi_assym.h
325
326#
327# Intel Integrated Memory Controller
328# (Sandy Bridge - Cascade Lake)
329#
330IMC_OBJS =	imc.o imc_decode.o imc_dump.o
331IMCSTUB_OBJS =	imcstub.o
332