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