blob: 8e4a7936a56c9d82a407865f2031885e3584b1a1 [file] [log] [blame]
Stefan Reinauer9616f3c2015-04-29 10:45:22 -07001ifeq ($(CONFIG_SOC_INTEL_COMMON),y)
Stefan Reinaueraae53ab2015-04-27 14:03:57 -07002
Aaron Durbinb66d6732015-10-07 16:10:43 -05003verstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
4
Duncan Lauried8c4f2b2014-04-22 10:46:06 -07005romstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
Lee Leahy14ecb542015-02-09 21:16:14 -08006romstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Lee Leahy94b856e2015-10-15 12:07:03 -07007romstage-y += util.c
Pratik Prajapatib90b94d2015-09-11 13:51:38 -07008romstage-$(CONFIG_MMA) += mma.c
Lee Leahy0946ec32015-04-20 15:24:54 -07009
Lee Leahy0946ec32015-04-20 15:24:54 -070010ramstage-y += hda_verb.c
11ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
12ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += nvm.c
13ramstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Lee Leahy94b856e2015-10-15 12:07:03 -070014ramstage-y += util.c
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070015ramstage-$(CONFIG_MMA) += mma.c
Duncan Laurie63ebc802015-09-08 16:09:28 -070016ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI_WAKE_SOURCE) += acpi_wake_source.c
Andrey Petrov060b2152016-05-13 15:27:42 -070017ramstage-y += vbt.c
Andrey Petrovdc4ae112016-05-12 19:10:11 -070018ramstage-$(CONFIG_SOC_INTEL_COMMON_GFX_OPREGION) += opregion.c
Hannah Williamsf8daa372016-04-18 13:40:04 -070019ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI) += ./acpi/acpi.c
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070020
Hannah Williamsba0fc472016-05-04 18:15:49 -070021smm-$(CONFIG_SOC_INTEL_COMMON_SMI) += smihandler.c
22
Alexandru Gagniucbc140cf2015-08-28 14:28:35 -040023# Create and add the MRC cache to the cbfs image
24ifneq ($(CONFIG_CHROMEOS),y)
25$(obj)/mrc.cache: $(obj)/config.h
26 dd if=/dev/zero count=1 \
27 bs=$(shell printf "%d" $(CONFIG_MRC_SETTINGS_CACHE_SIZE) ) | \
28 tr '\000' '\377' > $@
29
30cbfs-files-$(CONFIG_CACHE_MRC_SETTINGS) += mrc.cache
31mrc.cache-file := $(obj)/mrc.cache
32mrc.cache-position := $(CONFIG_MRC_SETTINGS_CACHE_BASE)
33mrc.cache-type := mrc_cache
34endif
35
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070036ifeq ($(CONFIG_MMA),y)
37MMA_BLOBS_PATH = $(call strip_quotes,$(CONFIG_MMA_BLOBS_PATH))
38MMA_TEST_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/tests/*))
39MMA_TEST_CONFIG_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/*))
40
41#
42# MMA_CBFS_template is the template to be expanded by eval
43# where $(1) is file name
44# $(2) is file path
45# $(3) is file type, efi for test names (all .EFI files under $(MMA_BLOBS_PATH)/tests )
46# , mma for test param (all .BIN files under $(MMA_BLOBS_PATH)/configs/<test name>)
47#
48# $(MMA_BLOBS_PATH)/tests/<testX>.efi has coresponding test params
49# at $(MMA_BLOBS_PATH)/configs/<testX>/<XYZ>.bin
50#
51
52
53define MMA_CBFS_template =
54 cbfs-files-y += $(1)
55 $(1)-file := $(MMA_BLOBS_PATH)/$(2)/$(1)
56 $(1)-type := $(3)
57endef
58
59#
60# following loop calls MMA_CBFS_template for each .EFI file under $(MMA_BLOBS_PATH)/tests with type = efi
61#
62$(foreach mma_test,$(MMA_TEST_NAMES),$(eval $(call MMA_CBFS_template,$(mma_test),tests,efi)))
63
64
65#
66# following nested loops calls MMA_CBFS_template for each .BIN file under each MMA_TEST_CONFIG_NAMES
67#
68# foreach <testX> do following
69# foreach <XYZ>.bin in <testX> do following
70# call MMA_CBFS_template for each <XYZ>.bin under current <testX> with type = mma
71#
72
73$(foreach mma_test, $(MMA_TEST_CONFIG_NAMES),\
74 $(eval $(foreach mma_config,$(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/$(mma_test)/*)),\
75 $(eval $(call MMA_CBFS_template,$(mma_config),configs/$(mma_test),mma)))))
76
77endif
78
Andrey Petrov060b2152016-05-13 15:27:42 -070079cbfs-files-$(CONFIG_ADD_VBT_DATA_FILE) += vbt.bin
80vbt.bin-file := $(call strip_quotes,$(CONFIG_VBT_FILE))
81vbt.bin-type := raw
82
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070083endif