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