mb/google/brya/var/orisa: Update Type C DisplayPort HPD Configuration
[coreboot2.git] / src / cpu / x86 / Makefile.mk
blob26e5d9c9c269798b8eff492a5da27d61a8407f83
1 ## SPDX-License-Identifier: GPL-2.0-only
3 subdirs-y += lapic
4 subdirs-y += mtrr
5 subdirs-y += pae
6 subdirs-$(CONFIG_HAVE_SMI_HANDLER) += smm
7 subdirs-$(CONFIG_UDELAY_TSC) += tsc
8 # Use ARCH_BOOTBLOCK_X86_64 as a proxy for knowing if 64bit is going to be used
9 subdirs-$(CONFIG_ARCH_BOOTBLOCK_X86_64) += 64bit
10 subdirs-y += cache
12 subdirs-$(CONFIG_PARALLEL_MP) += name
14 ifeq ($(CONFIG_HAVE_SMI_HANDLER),y)
15 $(obj)/ramstage/cpu/x86/smm_start32_offset.h: $(dir)/smm_start32_offset.h.template $(obj)/smmstub/smmstub.elf
16 cp $< $@.temp
17 sed -i 's/##START32_OFFSET##/0x'$$($(NM_smmstub) -an $(obj)/smmstub/smmstub.elf | grep smm_trampolin | cut -d' ' -f1)'/' $@.temp
18 mv $@.temp $@
19 else
20 $(obj)/ramstage/cpu/x86/smm_start32_offset.h: $(dir)/smm_start32_offset.h.template
21 cp $< $@.temp
22 sed -i 's/##START32_OFFSET##/0x0/' $@.temp
23 mv $@.temp $@
24 endif
26 $(call src-to-obj,ramstage,$(dir)/mp_init.c): $(obj)/ramstage/cpu/x86/smm_start32_offset.h
27 ramstage-$(CONFIG_PARALLEL_MP) += mp_init.c
29 ramstage-y += backup_default_smm.c
30 ramstage-y += smi_trigger.c
31 smm-y += smi_trigger.c
33 subdirs-$(CONFIG_CPU_INTEL_COMMON_SMM) += ../intel/smm
35 bootblock-y += entry32.S
36 bootblock-y += entry16.S
37 bootblock-y += reset16.S
39 additional-dirs += $(obj)/cpu/x86
41 SIPI_ELF=$(obj)/cpu/x86/sipi_vector.elf
42 SIPI_RMOD=$(SIPI_ELF).rmod
43 SIPI_BIN=$(SIPI_ELF:.elf=)
44 SIPI_DOTO=$(SIPI_ELF:.elf=.o)
46 ifeq ($(CONFIG_HAVE_RAMSTAGE),y)
47 TARGET_STAGE=ramstage
48 else ifeq ($(CONFIG_RAMPAYLOAD),y)
49 TARGET_STAGE=postcar
50 else
51 $(error Halting the build due to unknown TARGET_STAGE select)
52 endif
54 ifeq ($(CONFIG_PARALLEL_MP),y)
55 $(TARGET_STAGE)-srcs += $(SIPI_BIN).manual
56 endif
57 rmodules_$(ARCH-$(TARGET_STAGE)-y)-$(CONFIG_PARALLEL_MP) += sipi_vector.S
59 $(SIPI_DOTO): $(call src-to-obj,rmodules_$(ARCH-$(TARGET_STAGE)-y),src/cpu/x86/sipi_vector.S)
60 $(LD_rmodules_$(ARCH-$(TARGET_STAGE)-y)) -nostdlib -r -o $@ $^
62 $(eval $(call rmodule_link,$(SIPI_ELF), $(SIPI_DOTO),$(ARCH-$(TARGET_STAGE)-y)))
64 $(SIPI_BIN): $(SIPI_RMOD)
65 $(OBJCOPY_$(TARGET_STAGE)) -O binary $< $@
67 $(call src-to-obj,$(TARGET_STAGE),$(SIPI_BIN).manual): $(SIPI_BIN)
68 @printf " OBJCOPY $(subst $(obj)/,,$(@))\n"
69 cd $(dir $<); $(OBJCOPY_rmodules_$(ARCH-$(TARGET_STAGE)-y)) -I binary $(notdir $<) $(target-objcopy) $(abspath $@)
71 ramstage-y += topology.c