mb/system76/cml-u/dt: Make use of chipset devicetree
[coreboot.git] / src / soc / intel / common / Makefile.mk
blobb273ed7c12b9ecb7f70e6a8b4953629388228cc1
1 ## SPDX-License-Identifier: GPL-2.0-only
2 ifeq ($(CONFIG_SOC_INTEL_COMMON),y)
4 subdirs-y += basecode/
5 subdirs-y += block/
6 subdirs-y += pch/
8 verstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
10 bootblock-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
12 romstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
13 romstage-$(CONFIG_MMA) += mma.c
14 romstage-y += smbios.c
16 postcar-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
18 ramstage-y += hda_verb.c
19 ramstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
20 ramstage-$(CONFIG_MMA) += mma.c
21 ramstage-y += vbt.c
22 ramstage-$(CONFIG_SOC_INTEL_COMMON_NHLT) += nhlt.c
24 all-$(CONFIG_TPM_GOOGLE) += tpm_tis.c
26 romstage-$(CONFIG_SOC_INTEL_COMMON_FSP_RESET) += fsp_reset.c
27 ramstage-$(CONFIG_SOC_INTEL_COMMON_FSP_RESET) += fsp_reset.c
29 ifeq ($(CONFIG_MMA),y)
30 MMA_BLOBS_PATH = $(call strip_quotes,$(CONFIG_MMA_BLOBS_PATH))
31 MMA_TEST_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/tests/*))
32 MMA_TEST_CONFIG_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/*))
35 # MMA_CBFS_template is the template to be expanded by eval
36 # where $(1) is file name
37 # $(2) is file path
38 # $(3) is file type, efi for test names (all .EFI files under $(MMA_BLOBS_PATH)/tests )
39 # , mma for test param (all .BIN files under $(MMA_BLOBS_PATH)/configs/<test name>)
41 # $(MMA_BLOBS_PATH)/tests/<testX>.efi has corresponding test params
42 # at $(MMA_BLOBS_PATH)/configs/<testX>/<XYZ>.bin
46 define MMA_CBFS_template =
47 cbfs-files-y += $(1)
48 $(1)-file := $(MMA_BLOBS_PATH)/$(2)/$(1)
49 $(1)-type := $(3)
50 endef
53 # following loop calls MMA_CBFS_template for each .EFI file under $(MMA_BLOBS_PATH)/tests with type = efi
55 $(foreach mma_test,$(MMA_TEST_NAMES),$(eval $(call MMA_CBFS_template,$(mma_test),tests,efi)))
59 # following nested loops calls MMA_CBFS_template for each .BIN file under each MMA_TEST_CONFIG_NAMES
61 # foreach <testX> do following
62 # foreach <XYZ>.bin in <testX> do following
63 # call MMA_CBFS_template for each <XYZ>.bin under current <testX> with type = mma
66 $(foreach mma_test, $(MMA_TEST_CONFIG_NAMES),\
67 $(eval $(foreach mma_config,$(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/$(mma_test)/*)),\
68 $(eval $(call MMA_CBFS_template,$(mma_config),configs/$(mma_test),mma)))))
70 endif
72 # SI_DESC contains soft straps that may modify security-relevant behavior, so it should be
73 # verified by GSCVD.
74 vboot-gscvd-ranges += $(shell ( \
75 offset=$$($(call fmap-section-offset-cmd,SI_DESC)) ;\
76 if [ -n "$$offset" ]; then \
77 printf "%x:%x" $$offset $$($(call fmap-section-size-cmd,SI_DESC)) ;\
78 fi ;\
81 endif