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 2018 Joyent, Inc. 27 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association. 28 # 29 # This Makefile defines file modules in the directory uts/i86pc 30 # and its children. These are the source files which are i86pc 31 # "implementation architecture" dependent. 32 # 33 34 # 35 # object lists 36 # 37 CORE_OBJS += \ 38 acpi_stubs.o \ 39 biosdisk.o \ 40 bios_call.o \ 41 cbe.o \ 42 cmi.o \ 43 cmi_hw.o \ 44 cms.o \ 45 comm_page.o \ 46 confunix.o \ 47 cpu_idle.o \ 48 cpuid.o \ 49 cpuid_subr.o \ 50 cpupm.o \ 51 cpupm_mach.o \ 52 cpupm_amd.o \ 53 cpupm_intel.o \ 54 cpupm_throttle.o \ 55 cpu_acpi.o \ 56 dis_tables.o \ 57 ddi_impl.o \ 58 dtrace_subr.o \ 59 dvma.o \ 60 fpu_subr.o \ 61 fakebop.o \ 62 fastboot.o \ 63 fb_swtch.o \ 64 graphics.o \ 65 hardclk.o \ 66 hat_i86.o \ 67 hat_kdi.o \ 68 hma_fpu.o \ 69 hment.o \ 70 hold_page.o \ 71 hrtimers.o \ 72 ht.o \ 73 htable.o \ 74 hypercall.o \ 75 hypersubr.o \ 76 i86_mmu.o \ 77 ibft.o \ 78 instr_size.o \ 79 intr.o \ 80 kboot_mmu.o \ 81 kdi_idt.o \ 82 kdi_idthdl.o \ 83 kdi_asm.o \ 84 lgrpplat.o \ 85 mach_kdi.o \ 86 mach_sysconfig.o \ 87 machdep.o \ 88 mem_config.o \ 89 mem_config_stubs.o \ 90 mem_config_arch.o \ 91 memlist_new.o \ 92 memnode.o \ 93 microcode.o \ 94 microfind.o \ 95 mlsetup.o \ 96 mp_call.o \ 97 mp_implfuncs.o \ 98 mp_machdep.o \ 99 mp_pc.o \ 100 mp_startup.o \ 101 memscrub.o \ 102 mpcore.o \ 103 notes.o \ 104 pci_bios.o \ 105 pci_cfgacc.o \ 106 pci_cfgacc_x86.o \ 107 pci_cfgspace.o \ 108 pci_mech1.o \ 109 pci_mech1_amd.o \ 110 pci_mech2.o \ 111 pci_neptune.o \ 112 pci_orion.o \ 113 pmem.o \ 114 ppage.o \ 115 pwrnow.o \ 116 speedstep.o \ 117 ssp.o \ 118 startup.o \ 119 timestamp.o \ 120 todpc_subr.o \ 121 trap.o \ 122 turbo.o \ 123 vm_machdep.o \ 124 xpv_platform.o \ 125 x_call.o 126 127 # 128 # Add the SMBIOS subsystem object files directly to the list of objects 129 # built into unix itself; this is all common code except for smb_dev.c. 130 # 131 CORE_OBJS += $(SMBIOS_OBJS) 132 133 # 134 # These get compiled twice: 135 # - once in the dboot (direct boot) identity mapped code 136 # - once for use during early startup in unix 137 # 138 BOOT_DRIVER_OBJS = \ 139 boot_console.o \ 140 boot_keyboard.o \ 141 boot_keyboard_table.o \ 142 boot_vga.o \ 143 boot_fb.o \ 144 boot_mmu.o \ 145 dboot_multiboot2.o \ 146 $(FONT_OBJS) 147 148 CORE_OBJS += $(BOOT_DRIVER_OBJS) 149 150 # 151 # locore.o is special. It must be the first file relocated so that it 152 # it is relocated just where its name implies. 153 # 154 SPECIAL_OBJS_32 += \ 155 locore.o \ 156 fast_trap_asm.o \ 157 interrupt.o \ 158 syscall_asm.o 159 160 SPECIAL_OBJS_64 += \ 161 locore.o \ 162 fast_trap_asm.o \ 163 interrupt.o \ 164 syscall_asm_amd64.o \ 165 kpti_trampolines.o 166 167 SPECIAL_OBJS += $(SPECIAL_OBJS_$(CLASS)) 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 # 173 DBOOT_OBJS_32 = 174 175 DBOOT_OBJS_64 += dboot_elfload.o 176 177 DBOOT_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 # 193 GFX_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 196 FIPE_OBJS += fipe_drv.o fipe_pm.o 197 IOAT_OBJS += ioat.o ioat_rs.o ioat_ioctl.o ioat_chan.o 198 ISANEXUS_OBJS += isa.o dma_engine.o i8237A.o 199 PCIE_MISC_OBJS += pcie_acpi.o pciehpc_acpi.o pcie_x86.o 200 PCI_E_NEXUS_OBJS += npe.o npe_misc.o 201 PCI_E_NEXUS_OBJS += pci_common.o pci_kstats.o pci_tools.o 202 PCINEXUS_OBJS += pci.o pci_common.o pci_kstats.o pci_tools.o 203 PCPLUSMP_OBJS += apic.o apic_regops.o psm_common.o apic_introp.o \ 204 mp_platform_common.o mp_platform_misc.o \ 205 hpet_acpi.o apic_common.o apic_timer.o 206 APIX_OBJS += apix.o apic_regops.o psm_common.o apix_intr.o apix_utils.o \ 207 apix_irm.o mp_platform_common.o hpet_acpi.o apic_common.o \ 208 apic_timer.o apix_regops.o 209 210 211 ACPI_DRV_OBJS += acpi_drv.o acpi_video.o 212 ACPINEX_OBJS += acpinex_drv.o acpinex_event.o 213 214 CPUDRV_OBJS += \ 215 cpudrv.o \ 216 cpudrv_mach.o 217 218 PPM_OBJS += ppm_subr.o ppm.o ppm_plat.o 219 220 ACPIPPM_OBJS += acpippm.o acpisleep.o 221 ACPIDEV_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 232 DRMACH_ACPI_OBJS += drmach_acpi.o dr_util.o drmach_err.o 233 234 DR_OBJS += dr.o dr_cpu.o dr_err.o dr_io.o dr_mem_acpi.o dr_quiesce.o dr_util.o 235 236 ROOTNEX_OBJS += rootnex.o immu.o immu_dmar.o immu_dvma.o \ 237 immu_intrmap.o immu_qinv.o immu_regs.o 238 239 TZMON_OBJS += tzmon.o 240 UPPC_OBJS += uppc.o psm_common.o 241 XSVC_OBJS += xsvc.o 242 AMD_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 244 245 # 246 # Build up defines and paths. 247 # 248 ALL_DEFS += -Di86pc 249 INC_PATH += -I$(UTSBASE)/i86pc -I$(SRC)/common 250 INC_PATH += -I$(UTSBASE)/i86xpv -I$(UTSBASE)/common/xen 251 252 # 253 # Since the assym files are derived, the dependencies must be explicit for 254 # all files including this file. (This is only actually required in the 255 # instance when the .nse_depinfo file does not exist.) 256 # 257 258 ASSYM_DEPS += \ 259 copy.o \ 260 desctbls_asm.o \ 261 ddi_i86_asm.o \ 262 exception.o \ 263 fast_trap_asm.o \ 264 float.o \ 265 i86_subr.o \ 266 interrupt.o \ 267 lock_prim.o \ 268 locore.o \ 269 mpcore.o \ 270 sseblk.o \ 271 swtch.o \ 272 syscall_asm.o \ 273 syscall_asm_amd64.o \ 274 kpti_trampolines.o \ 275 cpr_wakecode.o 276 277 CPR_IMPL_OBJS = cpr_impl.o cpr_wakecode.o 278 279 $(KDI_ASSYM_DEPS:%=$(OBJS_DIR)/%): $(DSF_DIR)/$(OBJS_DIR)/kdi_assym.h