| 1 |
|
| 2 |
|
| 3 |
ifeq ($(CONFIG_PLATFORM_USES_FSP2_0),y) |
| 4 |
|
| 5 |
bootblock-$(CONFIG_FSP_CAR) += fspt_report.c |
| 6 |
|
| 7 |
romstage-y += debug.c |
| 8 |
romstage-$(CONFIG_FSP_USES_CB_DEBUG_EVENT_HANDLER) += fsp_debug_event.c |
| 9 |
romstage-y += hand_off_block.c |
| 10 |
romstage-$(CONFIG_DISPLAY_FSP_HEADER) += header_display.c |
| 11 |
romstage-$(CONFIG_DISPLAY_HOBS) += hob_display.c |
| 12 |
romstage-$(CONFIG_DISPLAY_UPD_DATA) += upd_display.c |
| 13 |
romstage-$(CONFIG_VERIFY_HOBS) += hob_verify.c |
| 14 |
romstage-y += util.c |
| 15 |
romstage-y += memory_init.c |
| 16 |
romstage-$(CONFIG_MMA) += mma_core.c |
| 17 |
romstage-y += cbmem.c |
| 18 |
romstage-$(CONFIG_ENABLE_FSP_ERROR_INFO) += fsp_error_info_hob.c |
| 19 |
romstage-$(CONFIG_CACHE_MRC_SETTINGS) += save_mrc_data.c |
| 20 |
|
| 21 |
ramstage-y += debug.c |
| 22 |
ramstage-$(CONFIG_FSP_USES_CB_DEBUG_EVENT_HANDLER) += fsp_debug_event.c |
| 23 |
ramstage-$(CONFIG_USE_INTEL_FSP_MP_INIT) += fsp_mpinit.c |
| 24 |
ramstage-$(CONFIG_DISPLAY_FSP_TIMESTAMPS) += fsp_timestamp.c |
| 25 |
ramstage-$(CONFIG_RUN_FSP_GOP) += graphics.c |
| 26 |
ramstage-y += hand_off_block.c |
| 27 |
ramstage-$(CONFIG_DISPLAY_FSP_HEADER) += header_display.c |
| 28 |
ramstage-$(CONFIG_DISPLAY_HOBS) += hob_display.c |
| 29 |
ramstage-$(CONFIG_VERIFY_HOBS) += hob_verify.c |
| 30 |
ramstage-y += notify.c |
| 31 |
ramstage-y += silicon_init.c |
| 32 |
ramstage-$(CONFIG_DISPLAY_UPD_DATA) += upd_display.c |
| 33 |
ramstage-y += util.c |
| 34 |
ramstage-$(CONFIG_FSP_NVS_DATA_POST_SILICON_INIT) += save_mrc_data.c |
| 35 |
ramstage-$(CONFIG_MMA) += mma_core.c |
| 36 |
ramstage-$(CONFIG_ENABLE_FSP_ERROR_INFO) += fsp_error_info_hob.c |
| 37 |
ramstage-$(CONFIG_BMP_LOGO) += fsp_gop_blt.c |
| 38 |
ramstage-$(CONFIG_USE_COREBOOT_FOR_BMP_RENDERING) += cb_logo.c |
| 39 |
|
| 40 |
ifneq ($(CONFIG_NO_FSP_TEMP_RAM_EXIT),y) |
| 41 |
postcar-$(CONFIG_FSP_CAR) += temp_ram_exit.c |
| 42 |
endif |
| 43 |
postcar-$(CONFIG_FSP_CAR) += util.c |
| 44 |
postcar-$(CONFIG_DISPLAY_FSP_HEADER) += header_display.c |
| 45 |
postcar-y += hand_off_block.c |
| 46 |
|
| 47 |
CPPFLAGS_common += -I$(src)/drivers/intel/fsp2_0/include |
| 48 |
|
| 49 |
FSP_T_CBFS = $(call strip_quotes,$(CONFIG_FSP_T_CBFS)) |
| 50 |
FSP_M_CBFS = $(call strip_quotes,$(CONFIG_FSP_M_CBFS)) |
| 51 |
FSP_M_CBFS_2 = $(call strip_quotes,$(CONFIG_FSP_M_CBFS_2)) |
| 52 |
FSP_S_CBFS = $(call strip_quotes,$(CONFIG_FSP_S_CBFS)) |
| 53 |
FSP_S_CBFS_2 = $(call strip_quotes,$(CONFIG_FSP_S_CBFS_2)) |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
ifeq ($(CONFIG_ADD_FSP_BINARIES)$(CONFIG_FSP_CAR),yy) |
| 58 |
cbfs-files-y += $(FSP_T_CBFS) |
| 59 |
$(FSP_T_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_T_FILE)) |
| 60 |
$(FSP_T_CBFS)-type := fsp |
| 61 |
ifeq ($(CONFIG_FSP_T_XIP),y) |
| 62 |
$(FSP_T_CBFS)-options := --xip $(TXTIBB) |
| 63 |
$(FSP_T_CBFS)-position = $(CONFIG_FSP_T_LOCATION) |
| 64 |
endif |
| 65 |
endif |
| 66 |
|
| 67 |
cbfs-files-$(CONFIG_ADD_FSP_BINARIES) += $(FSP_M_CBFS) |
| 68 |
ifeq ($(CONFIG_PLATFORM_USES_SECOND_FSP)$(CONFIG_ADD_FSP_BINARIES),yy) |
| 69 |
cbfs-files-y += $(FSP_M_CBFS_2) |
| 70 |
endif |
| 71 |
$(FSP_M_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_M_FILE)) |
| 72 |
$(FSP_M_CBFS_2)-file := $(call strip_quotes,$(CONFIG_FSP_M_FILE_2)) |
| 73 |
$(FSP_M_CBFS)-type := fsp |
| 74 |
$(FSP_M_CBFS_2)-type := fsp |
| 75 |
ifeq ($(CONFIG_FSP_M_XIP),y) |
| 76 |
$(FSP_M_CBFS)-options := --xip $(TXTIBB) |
| 77 |
$(FSP_M_CBFS_2)-options := --xip $(TXTIBB) |
| 78 |
endif |
| 79 |
ifeq ($(CONFIG_FSP_COMPRESS_FSP_M_LZMA),y) |
| 80 |
$(FSP_M_CBFS)-compression := LZMA |
| 81 |
$(FSP_M_CBFS_2)-compression := LZMA |
| 82 |
else ifeq ($(CONFIG_FSP_COMPRESS_FSP_M_LZ4),y) |
| 83 |
$(FSP_M_CBFS)-compression := LZ4 |
| 84 |
$(FSP_M_CBFS_2)-compression := LZ4 |
| 85 |
endif |
| 86 |
ifneq ($(CONFIG_FSP_ALIGNMENT_FSP_M),) |
| 87 |
$(FSP_M_CBFS)-align := $(CONFIG_FSP_ALIGNMENT_FSP_M) |
| 88 |
$(FSP_M_CBFS_2)-align := $(CONFIG_FSP_ALIGNMENT_FSP_M) |
| 89 |
endif |
| 90 |
|
| 91 |
cbfs-files-$(CONFIG_ADD_FSP_BINARIES) += $(FSP_S_CBFS) |
| 92 |
ifeq ($(CONFIG_PLATFORM_USES_SECOND_FSP)$(CONFIG_ADD_FSP_BINARIES),yy) |
| 93 |
cbfs-files-y += $(FSP_S_CBFS_2) |
| 94 |
endif |
| 95 |
$(FSP_S_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_S_FILE)) |
| 96 |
$(FSP_S_CBFS_2)-file := $(call strip_quotes,$(CONFIG_FSP_S_FILE_2)) |
| 97 |
$(FSP_S_CBFS)-type := fsp |
| 98 |
$(FSP_S_CBFS_2)-type := fsp |
| 99 |
ifeq ($(CONFIG_FSP_COMPRESS_FSP_S_LZMA),y) |
| 100 |
$(FSP_S_CBFS)-compression := LZMA |
| 101 |
$(FSP_S_CBFS_2)-compression := LZMA |
| 102 |
else ifeq ($(CONFIG_FSP_COMPRESS_FSP_S_LZ4),y) |
| 103 |
$(FSP_S_CBFS)-compression := LZ4 |
| 104 |
$(FSP_S_CBFS_2)-compression := LZ4 |
| 105 |
endif |
| 106 |
ifneq ($(CONFIG_FSP_ALIGNMENT_FSP_S),) |
| 107 |
$(FSP_S_CBFS)-align := $(CONFIG_FSP_ALIGNMENT_FSP_S) |
| 108 |
$(FSP_S_CBFS_2)-align := $(CONFIG_FSP_ALIGNMENT_FSP_S) |
| 109 |
endif |
| 110 |
|
| 111 |
ifeq ($(CONFIG_FSP_FULL_FD),y) |
| 112 |
$(obj)/Fsp_M.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH)) $(DOTCONFIG) |
| 113 |
python 3rdparty/fsp/Tools/SplitFspBin.py split -f $(CONFIG_FSP_FD_PATH) -o "$(obj)" -n "Fsp.fd" |
| 114 |
|
| 115 |
$(obj)/Fsp_S.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH)) $(obj)/Fsp_M.fd |
| 116 |
true |
| 117 |
|
| 118 |
$(obj)/Fsp_T.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH)) $(obj)/Fsp_M.fd |
| 119 |
true |
| 120 |
endif |
| 121 |
|
| 122 |
ifeq ($(CONFIG_PLATFORM_USES_SECOND_FSP)$(CONFIG_FSP_FULL_FD),yy) |
| 123 |
$(obj)/Fsp_2_M.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH_2)) $(DOTCONFIG) |
| 124 |
python 3rdparty/fsp/Tools/SplitFspBin.py split -f $(CONFIG_FSP_FD_PATH_2) -o "$(obj)" -n "Fsp_2.fd" |
| 125 |
|
| 126 |
$(obj)/Fsp_2_S.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH_2)) $(obj)/Fsp_M.fd |
| 127 |
true |
| 128 |
endif |
| 129 |
|
| 130 |
ifneq ($(call strip_quotes,$(CONFIG_FSP_HEADER_PATH)),) |
| 131 |
CPPFLAGS_common+=-I$(CONFIG_FSP_HEADER_PATH) |
| 132 |
endif |
| 133 |
|
| 134 |
|
| 135 |
ifeq ($(CONFIG_ADD_FSP_BINARIES),y) |
| 136 |
ifeq ($(CONFIG_FSP_CAR),y) |
| 137 |
ifeq ($(call strip_quotes,$(CONFIG_FSP_T_FILE)),) |
| 138 |
$(error No FSP-T binary file specified.) |
| 139 |
endif |
| 140 |
endif |
| 141 |
ifeq ($(call strip_quotes,$(CONFIG_FSP_M_FILE)),) |
| 142 |
$(error No FSP-M binary file specified.) |
| 143 |
endif |
| 144 |
ifeq ($(call strip_quotes,$(CONFIG_FSP_S_FILE)),) |
| 145 |
$(error No FSP-S binary file specified.) |
| 146 |
endif |
| 147 |
ifeq ($(CONFIG_PLATFORM_USES_SECOND_FSP),y) |
| 148 |
ifeq ($(call strip_quotes,$(CONFIG_FSP_M_FILE_2)),) |
| 149 |
$(error No second FSP-M binary file specified.) |
| 150 |
endif |
| 151 |
ifeq ($(call strip_quotes,$(CONFIG_FSP_S_FILE_2)),) |
| 152 |
$(error No second FSP-S binary file specified.) |
| 153 |
endif |
| 154 |
endif |
| 155 |
else |
| 156 |
show_notices:: warn_no_fsp_binaries |
| 157 |
endif |
| 158 |
|
| 159 |
PHONY+=warn_no_fsp_binaries |
| 160 |
warn_no_fsp_binaries: |
| 161 |
printf "\n\t** WARNING **\n" |
| 162 |
printf "ADD_FSP_BINARIES isn't selected even though this SoC relies on the FSP.\n" |
| 163 |
printf "The resulting image won't contain the FSP binaries and will not boot unless\n" |
| 164 |
printf "they are added later.\n" |
| 165 |
|
| 166 |
subdirs-y += ppi |
| 167 |
|
| 168 |
endif |