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 |
Andrey Petrov | b37fd67 | 2016-03-01 16:25:38 -0800 | [diff] [blame] | 36 | |
Arthur Heymans | 98cc783 | 2020-12-08 12:49:38 +0100 | [diff] [blame] | 37 | ifneq ($(CONFIG_NO_FSP_TEMP_RAM_EXIT),y) |
Brenton Dong | 0a5971c | 2016-10-18 11:35:15 -0700 | [diff] [blame] | 38 | postcar-$(CONFIG_FSP_CAR) += temp_ram_exit.c |
Arthur Heymans | 98cc783 | 2020-12-08 12:49:38 +0100 | [diff] [blame] | 39 | endif |
Brenton Dong | 0a5971c | 2016-10-18 11:35:15 -0700 | [diff] [blame] | 40 | postcar-$(CONFIG_FSP_CAR) += util.c |
| 41 | postcar-$(CONFIG_DISPLAY_FSP_HEADER) += header_display.c |
Lijian Zhao | 8465a81 | 2017-07-11 12:33:22 -0700 | [diff] [blame] | 42 | postcar-y += hand_off_block.c |
Brandon Breitenstein | 135eae9 | 2016-09-30 13:57:12 -0700 | [diff] [blame] | 43 | |
Andrey Petrov | b37fd67 | 2016-03-01 16:25:38 -0800 | [diff] [blame] | 44 | CPPFLAGS_common += -I$(src)/drivers/intel/fsp2_0/include |
Stefan Reinauer | 86ddd73 | 2016-03-11 20:22:28 -0800 | [diff] [blame] | 45 | |
Wim Vervoorn | 8fc523e | 2019-11-01 12:43:58 +0100 | [diff] [blame] | 46 | FSP_T_CBFS = $(call strip_quotes,$(CONFIG_FSP_T_CBFS)) |
| 47 | FSP_M_CBFS = $(call strip_quotes,$(CONFIG_FSP_M_CBFS)) |
| 48 | FSP_S_CBFS = $(call strip_quotes,$(CONFIG_FSP_S_CBFS)) |
| 49 | |
Andrey Petrov | 9be1a11 | 2016-05-14 16:32:39 -0700 | [diff] [blame] | 50 | # Add FSP blobs into cbfs. SoC code may supply additional options with |
| 51 | # -options, e.g --xip or -b |
Felix Held | 2651d99 | 2021-08-28 02:31:41 +0200 | [diff] [blame] | 52 | ifeq ($(CONFIG_ADD_FSP_BINARIES)$(CONFIG_FSP_CAR),yy) |
| 53 | cbfs-files-y += $(FSP_T_CBFS) |
Wim Vervoorn | 8fc523e | 2019-11-01 12:43:58 +0100 | [diff] [blame] | 54 | $(FSP_T_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_T_FILE)) |
| 55 | $(FSP_T_CBFS)-type := fsp |
praveen hodagatta pranesh | 6c96542 | 2018-10-10 22:48:00 +0800 | [diff] [blame] | 56 | ifeq ($(CONFIG_FSP_T_XIP),y) |
Wim Vervoorn | 8fc523e | 2019-11-01 12:43:58 +0100 | [diff] [blame] | 57 | $(FSP_T_CBFS)-options := --xip $(TXTIBB) |
Arthur Heymans | 0f068a6 | 2021-05-03 10:59:45 +0200 | [diff] [blame] | 58 | $(FSP_T_CBFS)-position = $(CONFIG_FSP_T_LOCATION) |
Felix Held | 2651d99 | 2021-08-28 02:31:41 +0200 | [diff] [blame] | 59 | endif # CONFIG_FSP_T_XIP |
| 60 | endif # CONFIG_ADD_FSP_BINARIES && CONFIG_FSP_CAR |
Brenton Dong | 0a5971c | 2016-10-18 11:35:15 -0700 | [diff] [blame] | 61 | |
Wim Vervoorn | 8fc523e | 2019-11-01 12:43:58 +0100 | [diff] [blame] | 62 | cbfs-files-$(CONFIG_ADD_FSP_BINARIES) += $(FSP_M_CBFS) |
| 63 | $(FSP_M_CBFS)-file := $(call strip_quotes,$(CONFIG_FSP_M_FILE)) |
| 64 | $(FSP_M_CBFS)-type := fsp |
Rizwan Qureshi | 69966cc | 2016-09-09 12:16:11 +0530 | [diff] [blame] | 65 | ifeq ($(CONFIG_FSP_M_XIP),y) |
Wim Vervoorn | 8fc523e | 2019-11-01 12:43:58 +0100 | [diff] [blame] | 66 | $(FSP_M_CBFS)-options := --xip $(TXTIBB) |
Rizwan Qureshi | 69966cc | 2016-09-09 12:16:11 +0530 | [diff] [blame] | 67 | endif |
Aaron Durbin | ecbfa99 | 2020-05-15 17:01:58 -0600 | [diff] [blame] | 68 | ifeq ($(CONFIG_FSP_COMPRESS_FSP_M_LZMA),y) |
| 69 | $(FSP_M_CBFS)-compression := LZMA |
| 70 | endif |
| 71 | ifeq ($(CONFIG_FSP_COMPRESS_FSP_M_LZ4),y) |
| 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 |
| 83 | endif |
| 84 | ifeq ($(CONFIG_FSP_COMPRESS_FSP_S_LZ4),y) |
| 85 | $(FSP_S_CBFS)-compression := LZ4 |
| 86 | endif |
Raul E Rangel | 82897c9 | 2021-11-05 10:29:24 -0600 | [diff] [blame] | 87 | ifneq ($(CONFIG_FSP_ALIGNMENT_FSP_S),) |
| 88 | $(FSP_S_CBFS)-align := $(CONFIG_FSP_ALIGNMENT_FSP_S) |
| 89 | endif |
Andrey Petrov | 9be1a11 | 2016-05-14 16:32:39 -0700 | [diff] [blame] | 90 | |
Michael Niewöhner | 59f06ad | 2020-11-25 13:55:42 +0100 | [diff] [blame] | 91 | ifeq ($(CONFIG_FSP_FULL_FD),y) |
Michael Niewöhner | 1aa8fc3 | 2020-12-10 02:55:47 +0100 | [diff] [blame] | 92 | $(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] | 93 | 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] | 94 | |
| 95 | $(obj)/Fsp_S.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH)) $(obj)/Fsp_M.fd |
| 96 | true |
| 97 | |
| 98 | $(obj)/Fsp_T.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH)) $(obj)/Fsp_M.fd |
| 99 | true |
| 100 | endif |
| 101 | |
Wim Vervoorn | cbc878d2 | 2019-11-28 14:45:12 +0100 | [diff] [blame] | 102 | # Add logo to the cbfs image |
Kyösti Mälkki | 4949a3d | 2021-01-09 20:38:43 +0200 | [diff] [blame] | 103 | cbfs-files-$(CONFIG_BMP_LOGO) += logo.bmp |
Wim Vervoorn | cbc878d2 | 2019-11-28 14:45:12 +0100 | [diff] [blame] | 104 | logo.bmp-file := $(call strip_quotes,$(CONFIG_FSP2_0_LOGO_FILE_NAME)) |
| 105 | logo.bmp-type := raw |
| 106 | logo.bmp-compression := LZMA |
| 107 | |
Patrick Georgi | 6539e10 | 2018-09-13 11:48:43 -0400 | [diff] [blame] | 108 | ifneq ($(call strip_quotes,$(CONFIG_FSP_HEADER_PATH)),) |
| 109 | CPPFLAGS_common+=-I$(CONFIG_FSP_HEADER_PATH) |
| 110 | endif |
| 111 | |
Felix Held | c958f84 | 2021-08-28 00:36:17 +0200 | [diff] [blame] | 112 | # check if the FSP files that are supposed to be added are specified |
| 113 | ifeq ($(CONFIG_ADD_FSP_BINARIES),y) |
| 114 | ifeq ($(CONFIG_FSP_CAR),y) |
| 115 | ifeq ($(call strip_quotes,$(CONFIG_FSP_T_FILE)),) |
| 116 | $(error No FSP-T binary file specified.) |
| 117 | endif # CONFIG_FSP_T_FILE |
| 118 | endif # CONFIG_FSP_CAR |
| 119 | ifeq ($(call strip_quotes,$(CONFIG_FSP_M_FILE)),) |
| 120 | $(error No FSP-M binary file specified.) |
| 121 | endif # CONFIG_FSP_M_FILE |
| 122 | ifeq ($(call strip_quotes,$(CONFIG_FSP_S_FILE)),) |
| 123 | $(error No FSP-S binary file specified.) |
| 124 | endif # CONFIG_FSP_S_FILE |
Felix Held | b33816e | 2021-09-03 16:18:28 +0200 | [diff] [blame] | 125 | else # CONFIG_ADD_FSP_BINARIES |
| 126 | build_complete:: warn_no_fsp_binaries |
Felix Held | c958f84 | 2021-08-28 00:36:17 +0200 | [diff] [blame] | 127 | endif # CONFIG_ADD_FSP_BINARIES |
| 128 | |
Felix Held | b33816e | 2021-09-03 16:18:28 +0200 | [diff] [blame] | 129 | PHONY+=warn_no_fsp_binaries |
| 130 | warn_no_fsp_binaries: |
| 131 | printf "\n\t** WARNING **\n" |
| 132 | printf "ADD_FSP_BINARIES isn't selected even though this SoC relies on the FSP.\n" |
| 133 | printf "The resulting image won't contain the FSP binaries and will not boot unless\n" |
| 134 | printf "they are added later.\n" |
| 135 | |
Furquan Shaikh | 1a5f25e | 2021-02-03 23:02:34 -0800 | [diff] [blame] | 136 | subdirs-y += ppi |
Subrata Banik | 52331ba | 2019-03-11 11:53:12 +0530 | [diff] [blame] | 137 | |
Stefan Reinauer | 86ddd73 | 2016-03-11 20:22:28 -0800 | [diff] [blame] | 138 | endif |