Patrick Georgi | c49d7a3 | 2020-05-08 22:50:46 +0200 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Stefan Reinauer | 86ddd73 | 2016-03-11 20:22:28 -0800 | [diff] [blame] | 2 | |
| 3 | ifeq ($(CONFIG_PLATFORM_USES_FSP2_0),y) |
| 4 | |
Arthur Heymans | 5a66334 | 2020-10-28 14:03:14 +0100 | [diff] [blame] | 5 | bootblock-$(CONFIG_FSP_CAR) += fspt_report.c |
| 6 | |
Lee Leahy | 672df16 | 2016-07-24 18:21:13 -0700 | [diff] [blame] | 7 | romstage-y += debug.c |
Subrata Banik | 3ba6f8c | 2022-03-23 03:22:28 +0530 | [diff] [blame] | 8 | romstage-$(CONFIG_FSP_USES_CB_DEBUG_EVENT_HANDLER) += fsp_debug_event.c |
Andrey Petrov | b37fd67 | 2016-03-01 16:25:38 -0800 | [diff] [blame] | 9 | romstage-y += hand_off_block.c |
Lee Leahy | 37b5ef2 | 2016-07-31 14:15:49 -0700 | [diff] [blame] | 10 | romstage-$(CONFIG_DISPLAY_FSP_HEADER) += header_display.c |
Lee Leahy | ac3b0a6 | 2016-07-27 07:40:25 -0700 | [diff] [blame] | 11 | romstage-$(CONFIG_DISPLAY_HOBS) += hob_display.c |
Lee Leahy | e6f2f74 | 2016-07-21 09:48:49 -0700 | [diff] [blame] | 12 | romstage-$(CONFIG_DISPLAY_UPD_DATA) += upd_display.c |
Lee Leahy | 52d0c68 | 2016-08-01 15:47:42 -0700 | [diff] [blame] | 13 | romstage-$(CONFIG_VERIFY_HOBS) += hob_verify.c |
Andrey Petrov | b37fd67 | 2016-03-01 16:25:38 -0800 | [diff] [blame] | 14 | romstage-y += util.c |
| 15 | romstage-y += memory_init.c |
Pratik Prajapati | ffc934d | 2016-11-18 14:36:34 -0800 | [diff] [blame] | 16 | romstage-$(CONFIG_MMA) += mma_core.c |
Michael Niewöhner | b8cd4b0 | 2019-11-04 22:13:44 +0100 | [diff] [blame] | 17 | romstage-y += cbmem.c |
Ray Han Lim, Ng | 65b7219 | 2022-01-21 14:33:11 +0800 | [diff] [blame] | 18 | romstage-$(CONFIG_ENABLE_FSP_ERROR_INFO) += fsp_error_info_hob.c |
Andrey Petrov | b37fd67 | 2016-03-01 16:25:38 -0800 | [diff] [blame] | 19 | |
Lee Leahy | 672df16 | 2016-07-24 18:21:13 -0700 | [diff] [blame] | 20 | ramstage-y += debug.c |
Subrata Banik | 3ba6f8c | 2022-03-23 03:22:28 +0530 | [diff] [blame] | 21 | ramstage-$(CONFIG_FSP_USES_CB_DEBUG_EVENT_HANDLER) += fsp_debug_event.c |
Subrata Banik | 96b32f1 | 2020-07-31 12:09:11 +0530 | [diff] [blame] | 22 | ramstage-$(CONFIG_USE_INTEL_FSP_MP_INIT) += fsp_mpinit.c |
Subrata Banik | 6de1d9f | 2022-03-20 19:50:38 +0530 | [diff] [blame] | 23 | ramstage-$(CONFIG_DISPLAY_FSP_TIMESTAMPS) += fsp_timestamp.c |
Nico Huber | 2e7f6cc | 2017-05-22 15:58:03 +0200 | [diff] [blame] | 24 | ramstage-$(CONFIG_RUN_FSP_GOP) += graphics.c |
Andrey Petrov | b37fd67 | 2016-03-01 16:25:38 -0800 | [diff] [blame] | 25 | ramstage-y += hand_off_block.c |
Lee Leahy | 37b5ef2 | 2016-07-31 14:15:49 -0700 | [diff] [blame] | 26 | ramstage-$(CONFIG_DISPLAY_FSP_HEADER) += header_display.c |
Lee Leahy | ac3b0a6 | 2016-07-27 07:40:25 -0700 | [diff] [blame] | 27 | ramstage-$(CONFIG_DISPLAY_HOBS) += hob_display.c |
Lee Leahy | 52d0c68 | 2016-08-01 15:47:42 -0700 | [diff] [blame] | 28 | ramstage-$(CONFIG_VERIFY_HOBS) += hob_verify.c |
Andrey Petrov | b37fd67 | 2016-03-01 16:25:38 -0800 | [diff] [blame] | 29 | ramstage-y += notify.c |
| 30 | ramstage-y += silicon_init.c |
Lee Leahy | e6f2f74 | 2016-07-21 09:48:49 -0700 | [diff] [blame] | 31 | ramstage-$(CONFIG_DISPLAY_UPD_DATA) += upd_display.c |
Andrey Petrov | b37fd67 | 2016-03-01 16:25:38 -0800 | [diff] [blame] | 32 | ramstage-y += util.c |
Reka Norman | 7b5a931 | 2022-09-13 14:06:52 +1000 | [diff] [blame] | 33 | ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += save_mrc_data.c |
Pratik Prajapati | ffc934d | 2016-11-18 14:36:34 -0800 | [diff] [blame] | 34 | ramstage-$(CONFIG_MMA) += mma_core.c |
Ray Han Lim, Ng | 65b7219 | 2022-01-21 14:33:11 +0800 | [diff] [blame] | 35 | ramstage-$(CONFIG_ENABLE_FSP_ERROR_INFO) += fsp_error_info_hob.c |
Subrata Banik | 7bc92f0 | 2023-08-03 10:11:28 +0000 | [diff] [blame] | 36 | ramstage-$(CONFIG_BMP_LOGO) += fsp_gop_blt.c |
Andrey Petrov | b37fd67 | 2016-03-01 16:25:38 -0800 | [diff] [blame] | 37 | |
Arthur Heymans | 98cc783 | 2020-12-08 12:49:38 +0100 | [diff] [blame] | 38 | ifneq ($(CONFIG_NO_FSP_TEMP_RAM_EXIT),y) |
Brenton Dong | 0a5971c | 2016-10-18 11:35:15 -0700 | [diff] [blame] | 39 | postcar-$(CONFIG_FSP_CAR) += temp_ram_exit.c |
Arthur Heymans | 98cc783 | 2020-12-08 12:49:38 +0100 | [diff] [blame] | 40 | endif |
Brenton Dong | 0a5971c | 2016-10-18 11:35:15 -0700 | [diff] [blame] | 41 | postcar-$(CONFIG_FSP_CAR) += util.c |
| 42 | postcar-$(CONFIG_DISPLAY_FSP_HEADER) += header_display.c |
Lijian Zhao | 8465a81 | 2017-07-11 12:33:22 -0700 | [diff] [blame] | 43 | postcar-y += hand_off_block.c |
Brandon Breitenstein | 135eae9 | 2016-09-30 13:57:12 -0700 | [diff] [blame] | 44 | |
Andrey Petrov | b37fd67 | 2016-03-01 16:25:38 -0800 | [diff] [blame] | 45 | CPPFLAGS_common += -I$(src)/drivers/intel/fsp2_0/include |
Stefan Reinauer | 86ddd73 | 2016-03-11 20:22:28 -0800 | [diff] [blame] | 46 | |
Wim Vervoorn | 8fc523e | 2019-11-01 12:43:58 +0100 | [diff] [blame] | 47 | FSP_T_CBFS = $(call strip_quotes,$(CONFIG_FSP_T_CBFS)) |
| 48 | FSP_M_CBFS = $(call strip_quotes,$(CONFIG_FSP_M_CBFS)) |
| 49 | FSP_S_CBFS = $(call strip_quotes,$(CONFIG_FSP_S_CBFS)) |
| 50 | |
Andrey Petrov | 9be1a11 | 2016-05-14 16:32:39 -0700 | [diff] [blame] | 51 | # Add FSP blobs into cbfs. SoC code may supply additional options with |
| 52 | # -options, e.g --xip or -b |
Felix Held | 2651d99 | 2021-08-28 02:31:41 +0200 | [diff] [blame] | 53 | ifeq ($(CONFIG_ADD_FSP_BINARIES)$(CONFIG_FSP_CAR),yy) |
| 54 | cbfs-files-y += $(FSP_T_CBFS) |
Wim Vervoorn | 8fc523e | 2019-11-01 12:43:58 +0100 | [diff] [blame] | 55 | $(FSP_T_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_T_FILE)) |
| 56 | $(FSP_T_CBFS)-type := fsp |
praveen hodagatta pranesh | 6c96542 | 2018-10-10 22:48:00 +0800 | [diff] [blame] | 57 | ifeq ($(CONFIG_FSP_T_XIP),y) |
Wim Vervoorn | 8fc523e | 2019-11-01 12:43:58 +0100 | [diff] [blame] | 58 | $(FSP_T_CBFS)-options := --xip $(TXTIBB) |
Arthur Heymans | 0f068a6 | 2021-05-03 10:59:45 +0200 | [diff] [blame] | 59 | $(FSP_T_CBFS)-position = $(CONFIG_FSP_T_LOCATION) |
Felix Held | 2651d99 | 2021-08-28 02:31:41 +0200 | [diff] [blame] | 60 | endif # CONFIG_FSP_T_XIP |
| 61 | endif # CONFIG_ADD_FSP_BINARIES && CONFIG_FSP_CAR |
Brenton Dong | 0a5971c | 2016-10-18 11:35:15 -0700 | [diff] [blame] | 62 | |
Wim Vervoorn | 8fc523e | 2019-11-01 12:43:58 +0100 | [diff] [blame] | 63 | cbfs-files-$(CONFIG_ADD_FSP_BINARIES) += $(FSP_M_CBFS) |
| 64 | $(FSP_M_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_M_FILE)) |
| 65 | $(FSP_M_CBFS)-type := fsp |
Rizwan Qureshi | 69966cc | 2016-09-09 12:16:11 +0530 | [diff] [blame] | 66 | ifeq ($(CONFIG_FSP_M_XIP),y) |
Wim Vervoorn | 8fc523e | 2019-11-01 12:43:58 +0100 | [diff] [blame] | 67 | $(FSP_M_CBFS)-options := --xip $(TXTIBB) |
Rizwan Qureshi | 69966cc | 2016-09-09 12:16:11 +0530 | [diff] [blame] | 68 | endif |
Aaron Durbin | ecbfa99 | 2020-05-15 17:01:58 -0600 | [diff] [blame] | 69 | ifeq ($(CONFIG_FSP_COMPRESS_FSP_M_LZMA),y) |
| 70 | $(FSP_M_CBFS)-compression := LZMA |
Felix Singer | 53a43f1 | 2023-08-20 03:09:49 +0200 | [diff] [blame^] | 71 | else ifeq ($(CONFIG_FSP_COMPRESS_FSP_M_LZ4),y) |
Aaron Durbin | ecbfa99 | 2020-05-15 17:01:58 -0600 | [diff] [blame] | 72 | $(FSP_M_CBFS)-compression := LZ4 |
| 73 | endif |
Raul E Rangel | 82897c9 | 2021-11-05 10:29:24 -0600 | [diff] [blame] | 74 | ifneq ($(CONFIG_FSP_ALIGNMENT_FSP_M),) |
| 75 | $(FSP_M_CBFS)-align := $(CONFIG_FSP_ALIGNMENT_FSP_M) |
| 76 | endif |
Andrey Petrov | 9be1a11 | 2016-05-14 16:32:39 -0700 | [diff] [blame] | 77 | |
Wim Vervoorn | 8fc523e | 2019-11-01 12:43:58 +0100 | [diff] [blame] | 78 | cbfs-files-$(CONFIG_ADD_FSP_BINARIES) += $(FSP_S_CBFS) |
| 79 | $(FSP_S_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_S_FILE)) |
| 80 | $(FSP_S_CBFS)-type := fsp |
Aaron Durbin | a85febc | 2020-05-15 15:09:10 -0600 | [diff] [blame] | 81 | ifeq ($(CONFIG_FSP_COMPRESS_FSP_S_LZMA),y) |
| 82 | $(FSP_S_CBFS)-compression := LZMA |
Felix Singer | 53a43f1 | 2023-08-20 03:09:49 +0200 | [diff] [blame^] | 83 | else ifeq ($(CONFIG_FSP_COMPRESS_FSP_S_LZ4),y) |
Aaron Durbin | a85febc | 2020-05-15 15:09:10 -0600 | [diff] [blame] | 84 | $(FSP_S_CBFS)-compression := LZ4 |
| 85 | endif |
Raul E Rangel | 82897c9 | 2021-11-05 10:29:24 -0600 | [diff] [blame] | 86 | ifneq ($(CONFIG_FSP_ALIGNMENT_FSP_S),) |
| 87 | $(FSP_S_CBFS)-align := $(CONFIG_FSP_ALIGNMENT_FSP_S) |
| 88 | endif |
Andrey Petrov | 9be1a11 | 2016-05-14 16:32:39 -0700 | [diff] [blame] | 89 | |
Michael Niewöhner | 59f06ad | 2020-11-25 13:55:42 +0100 | [diff] [blame] | 90 | ifeq ($(CONFIG_FSP_FULL_FD),y) |
Michael Niewöhner | 1aa8fc3 | 2020-12-10 02:55:47 +0100 | [diff] [blame] | 91 | $(obj)/Fsp_M.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH)) $(DOTCONFIG) |
Michael Niewöhner | 9990866 | 2021-10-02 21:05:20 +0200 | [diff] [blame] | 92 | python 3rdparty/fsp/Tools/SplitFspBin.py split -f $(CONFIG_FSP_FD_PATH) -o "$(obj)" -n "Fsp.fd" |
Patrick Georgi | 6539e10 | 2018-09-13 11:48:43 -0400 | [diff] [blame] | 93 | |
| 94 | $(obj)/Fsp_S.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH)) $(obj)/Fsp_M.fd |
| 95 | true |
| 96 | |
| 97 | $(obj)/Fsp_T.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH)) $(obj)/Fsp_M.fd |
| 98 | true |
| 99 | endif |
| 100 | |
Wim Vervoorn | cbc878d2 | 2019-11-28 14:45:12 +0100 | [diff] [blame] | 101 | # Add logo to the cbfs image |
Kyösti Mälkki | 4949a3d | 2021-01-09 20:38:43 +0200 | [diff] [blame] | 102 | cbfs-files-$(CONFIG_BMP_LOGO) += logo.bmp |
Wim Vervoorn | cbc878d2 | 2019-11-28 14:45:12 +0100 | [diff] [blame] | 103 | logo.bmp-file := $(call strip_quotes,$(CONFIG_FSP2_0_LOGO_FILE_NAME)) |
| 104 | logo.bmp-type := raw |
Subrata Banik | 7a6f888 | 2023-08-04 21:31:05 +0530 | [diff] [blame] | 105 | ifeq ($(CONFIG_BMP_LOGO_COMPRESS_LZMA),y) |
Wim Vervoorn | cbc878d2 | 2019-11-28 14:45:12 +0100 | [diff] [blame] | 106 | logo.bmp-compression := LZMA |
Subrata Banik | a0d4470 | 2023-08-18 20:17:16 +0530 | [diff] [blame] | 107 | else ifeq ($(CONFIG_BMP_LOGO_COMPRESS_LZ4),y) |
Subrata Banik | 7a6f888 | 2023-08-04 21:31:05 +0530 | [diff] [blame] | 108 | logo.bmp-compression := LZ4 |
| 109 | endif |
Wim Vervoorn | cbc878d2 | 2019-11-28 14:45:12 +0100 | [diff] [blame] | 110 | |
Patrick Georgi | 6539e10 | 2018-09-13 11:48:43 -0400 | [diff] [blame] | 111 | ifneq ($(call strip_quotes,$(CONFIG_FSP_HEADER_PATH)),) |
| 112 | CPPFLAGS_common+=-I$(CONFIG_FSP_HEADER_PATH) |
| 113 | endif |
| 114 | |
Felix Held | c958f84 | 2021-08-28 00:36:17 +0200 | [diff] [blame] | 115 | # check if the FSP files that are supposed to be added are specified |
| 116 | ifeq ($(CONFIG_ADD_FSP_BINARIES),y) |
| 117 | ifeq ($(CONFIG_FSP_CAR),y) |
| 118 | ifeq ($(call strip_quotes,$(CONFIG_FSP_T_FILE)),) |
| 119 | $(error No FSP-T binary file specified.) |
| 120 | endif # CONFIG_FSP_T_FILE |
| 121 | endif # CONFIG_FSP_CAR |
| 122 | ifeq ($(call strip_quotes,$(CONFIG_FSP_M_FILE)),) |
| 123 | $(error No FSP-M binary file specified.) |
| 124 | endif # CONFIG_FSP_M_FILE |
| 125 | ifeq ($(call strip_quotes,$(CONFIG_FSP_S_FILE)),) |
| 126 | $(error No FSP-S binary file specified.) |
| 127 | endif # CONFIG_FSP_S_FILE |
Felix Held | b33816e | 2021-09-03 16:18:28 +0200 | [diff] [blame] | 128 | else # CONFIG_ADD_FSP_BINARIES |
| 129 | build_complete:: warn_no_fsp_binaries |
Felix Held | c958f84 | 2021-08-28 00:36:17 +0200 | [diff] [blame] | 130 | endif # CONFIG_ADD_FSP_BINARIES |
| 131 | |
Felix Held | b33816e | 2021-09-03 16:18:28 +0200 | [diff] [blame] | 132 | PHONY+=warn_no_fsp_binaries |
| 133 | warn_no_fsp_binaries: |
| 134 | printf "\n\t** WARNING **\n" |
| 135 | printf "ADD_FSP_BINARIES isn't selected even though this SoC relies on the FSP.\n" |
| 136 | printf "The resulting image won't contain the FSP binaries and will not boot unless\n" |
| 137 | printf "they are added later.\n" |
| 138 | |
Furquan Shaikh | 1a5f25e | 2021-02-03 23:02:34 -0800 | [diff] [blame] | 139 | subdirs-y += ppi |
Subrata Banik | 52331ba | 2019-03-11 11:53:12 +0530 | [diff] [blame] | 140 | |
Stefan Reinauer | 86ddd73 | 2016-03-11 20:22:28 -0800 | [diff] [blame] | 141 | endif |