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_stat.o \ 251 vmm_util.o \ 252 x86.o \ 253 iommu.o \ 254 vatpic.o \ 255 vatpit.o \ 256 vhpet.o \ 257 vioapic.o \ 258 vlapic.o \ 259 vrtc.o \ 260 vpmtmr.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 vmcb.o \ 270 svm_support.o \ 271 amdv.o \ 272 vmm_gpt.o \ 273 seg_vmm.o \ 274 vmm_reservoir.o \ 275 vmm_sol_glue.o \ 276 vmm_sol_ept.o \ 277 vmm_sol_rvi.o \ 278 vmm_support.o \ 279 vmm_vm.o \ 280 vmm_zsd.o 281 282VIONA_OBJS += viona_main.o \ 283 viona_ring.o \ 284 viona_rx.o \ 285 viona_tx.o \ 286 viona_hook.o \ 287 288PPT_OBJS += ppt.o 289 290# 291# Build up defines and paths. 292# 293ALL_DEFS += -Di86pc 294INC_PATH += -I$(UTSBASE)/i86pc -I$(SRC)/common 295INC_PATH += -I$(UTSBASE)/i86xpv -I$(UTSBASE)/common/xen 296 297# 298# Since the assym files are derived, the dependencies must be explicit for 299# all files including this file. (This is only actually required in the 300# instance when the .nse_depinfo file does not exist.) 301# 302 303ASSYM_DEPS += \ 304 copy.o \ 305 desctbls_asm.o \ 306 ddi_i86_asm.o \ 307 exception.o \ 308 fast_trap_asm.o \ 309 float.o \ 310 i86_subr.o \ 311 interrupt.o \ 312 lock_prim.o \ 313 locore.o \ 314 mpcore.o \ 315 sseblk.o \ 316 swtch.o \ 317 syscall_asm_amd64.o \ 318 kpti_trampolines.o \ 319 cpr_wakecode.o 320 321CPR_IMPL_OBJS = cpr_impl.o cpr_wakecode.o 322 323$(KDI_ASSYM_DEPS:%=$(OBJS_DIR)/%): $(DSF_DIR)/$(OBJS_DIR)/kdi_assym.h 324