blob: b273ed7c12b9ecb7f70e6a8b4953629388228cc1 [file] [log] [blame]
Martin Roth9231f0b2022-10-28 22:39:23 -06001## SPDX-License-Identifier: GPL-2.0-only
Stefan Reinauer9616f3c2015-04-29 10:45:22 -07002ifeq ($(CONFIG_SOC_INTEL_COMMON),y)
Stefan Reinaueraae53ab2015-04-27 14:03:57 -07003
Subrata Banik9a0245a2017-02-22 14:22:44 +05304subdirs-y += basecode/
5subdirs-y += block/
Subrata Banik19cd07f2018-05-17 13:53:29 +05306subdirs-y += pch/
Subrata Banik9a0245a2017-02-22 14:22:44 +05307
Aaron Durbinb66d6732015-10-07 16:10:43 -05008verstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
9
Subrata Banike4a85372016-07-24 00:36:12 +053010bootblock-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Subrata Banike4a85372016-07-24 00:36:12 +053011
Lee Leahy14ecb542015-02-09 21:16:14 -080012romstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070013romstage-$(CONFIG_MMA) += mma.c
Barnali Sarkare13b7752017-02-21 16:24:49 +053014romstage-y += smbios.c
Lee Leahy0946ec32015-04-20 15:24:54 -070015
Furquan Shaikh566fedd2016-10-28 14:55:46 -070016postcar-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Lee Leahy4c18de22016-07-30 07:17:13 -070017
Lee Leahy0946ec32015-04-20 15:24:54 -070018ramstage-y += hda_verb.c
Lee Leahy0946ec32015-04-20 15:24:54 -070019ramstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070020ramstage-$(CONFIG_MMA) += mma.c
Andrey Petrov060b2152016-05-13 15:27:42 -070021ramstage-y += vbt.c
Aaron Durbinc14a1a92016-06-28 15:41:07 -050022ramstage-$(CONFIG_SOC_INTEL_COMMON_NHLT) += nhlt.c
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070023
Jes B. Klinkec6b041a12022-04-19 14:00:33 -070024all-$(CONFIG_TPM_GOOGLE) += tpm_tis.c
Aaron Durbin9d9a1212017-04-19 10:02:27 -050025
Subrata Banik2b2ade92020-10-31 21:07:16 +053026romstage-$(CONFIG_SOC_INTEL_COMMON_FSP_RESET) += fsp_reset.c
27ramstage-$(CONFIG_SOC_INTEL_COMMON_FSP_RESET) += fsp_reset.c
28
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070029ifeq ($(CONFIG_MMA),y)
30MMA_BLOBS_PATH = $(call strip_quotes,$(CONFIG_MMA_BLOBS_PATH))
31MMA_TEST_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/tests/*))
32MMA_TEST_CONFIG_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/*))
33
34#
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>)
40#
Martin Roth26f97f92021-10-01 14:53:22 -060041# $(MMA_BLOBS_PATH)/tests/<testX>.efi has corresponding test params
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070042# at $(MMA_BLOBS_PATH)/configs/<testX>/<XYZ>.bin
43#
44
45
46define MMA_CBFS_template =
47 cbfs-files-y += $(1)
48 $(1)-file := $(MMA_BLOBS_PATH)/$(2)/$(1)
49 $(1)-type := $(3)
50endef
51
52#
53# following loop calls MMA_CBFS_template for each .EFI file under $(MMA_BLOBS_PATH)/tests with type = efi
54#
55$(foreach mma_test,$(MMA_TEST_NAMES),$(eval $(call MMA_CBFS_template,$(mma_test),tests,efi)))
56
57
58#
59# following nested loops calls MMA_CBFS_template for each .BIN file under each MMA_TEST_CONFIG_NAMES
60#
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
64#
65
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)))))
69
70endif
71
Julius Werner39914a52022-08-01 15:04:44 -070072# SI_DESC contains soft straps that may modify security-relevant behavior, so it should be
73# verified by GSCVD.
74vboot-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 ;\
79))
80
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070081endif