blob: 82937bc9a6e9ac2b717b3493677e7375e8cbae80 [file] [log] [blame]
Martin Roth9231f0b2022-10-28 22:39:23 -06001## SPDX-License-Identifier: GPL-2.0-only
Alexandru Gagniuc7e86cd42015-10-06 10:33:49 -07002ifeq ($(CONFIG_SOC_INTEL_APOLLOLAKE),y)
3
Michael Niewöhner7736bfc2019-10-22 23:05:06 +02004subdirs-y += ../../../cpu/intel/common
Alexandru Gagniuc7e86cd42015-10-06 10:33:49 -07005subdirs-y += ../../../cpu/intel/microcode
6subdirs-y += ../../../cpu/intel/turbo
Alexandru Gagniuc7e86cd42015-10-06 10:33:49 -07007
Werner Zeh5c808e02022-05-19 09:16:28 +02008bootblock-$(CONFIG_TPM_MEASURED_BOOT) += bootblock/bootblock_measure.c
Alexandru Gagniucdfc2b312015-10-06 17:16:41 -07009bootblock-y += bootblock/bootblock.c
Michael Niewöhner310c7632020-10-01 22:28:03 +020010bootblock-y += ../common/block/cpu/pm_timer_emulation.c
Aaron Durbin595688a2016-03-31 11:38:13 -050011bootblock-y += car.c
Furquan Shaikhb13bd1e2020-09-21 22:44:27 +000012bootblock-y += heci.c
Ravi Sarawadi3669a062018-02-27 13:23:42 -080013bootblock-y += gspi.c
Rizwan Qureshiae6a4b62017-04-26 21:06:35 +053014bootblock-y += i2c.c
Ravi Sarawadiefa606b2017-08-04 16:26:09 -070015bootblock-y += lpc.c
Andrey Petrov5672dcd2016-02-12 15:12:43 -080016bootblock-y += mmap_boot.c
Andrey Petrov3dbea292016-06-14 22:20:28 -070017bootblock-y += pmutil.c
Furquan Shaikh6ac226d2016-06-15 17:13:20 -070018bootblock-y += spi.c
Nico Hubera96e66a2018-11-11 02:51:14 +010019bootblock-y += uart.c
Brenton Dongc9b39812016-10-18 13:57:54 -070020
Aaron Durbin595688a2016-03-31 11:38:13 -050021romstage-y += car.c
Subrata Banik17990112019-08-27 11:01:33 +053022romstage-y += ../../../cpu/intel/car/romstage.c
Michael Niewöhnerb17f3d32019-10-24 00:19:45 +020023romstage-y += romstage.c
Usha Paaf28d22020-02-17 15:14:18 +053024romstage-y += report_platform.c
Ravi Sarawadi3669a062018-02-27 13:23:42 -080025romstage-y += gspi.c
Furquan Shaikhb13bd1e2020-09-21 22:44:27 +000026romstage-y += heci.c
Rizwan Qureshiae6a4b62017-04-26 21:06:35 +053027romstage-y += i2c.c
Nico Hubera96e66a2018-11-11 02:51:14 +010028romstage-y += uart.c
Aaron Durbinfc2e7412016-05-12 12:43:37 -050029romstage-y += meminit.c
Angel Ponsb36100f2020-09-07 13:18:10 +020030ifeq ($(CONFIG_SOC_INTEL_GEMINILAKE),y)
Ravi Sarawadi09195ac2017-07-20 15:11:19 -070031romstage-y += meminit_util_glk.c
32else
33romstage-y += meminit_util_apl.c
34endif
Andrey Petrov5672dcd2016-02-12 15:12:43 -080035romstage-y += mmap_boot.c
Hannah Williams01bc8972016-02-04 20:13:34 -080036romstage-y += pmutil.c
Andrey Petrov0f593c22016-06-17 15:30:13 -070037romstage-y += reset.c
Furquan Shaikhbae63832016-06-17 15:50:24 -070038romstage-y += spi.c
Andrey Petrov87fb1a62016-02-10 17:47:03 -080039
Aaron Durbinb3f54182016-05-26 14:22:34 -050040smm-y += mmap_boot.c
Hannah Williams01bc8972016-02-04 20:13:34 -080041smm-y += pmutil.c
Hannah Williamsd9c84ca2016-05-13 00:47:14 -070042smm-y += smihandler.c
Aaron Durbinb3f54182016-05-26 14:22:34 -050043smm-y += spi.c
Nico Hubera96e66a2018-11-11 02:51:14 +010044smm-y += uart.c
Furquan Shaikhc83e70e2018-06-25 14:29:48 -070045smm-y += elog.c
Karthikeyan Ramasubramanian0f718312019-07-03 13:02:37 -060046smm-y += xhci.c
Lance Zhaof51b1272015-11-09 17:06:34 -080047
48ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
Mario Scheithauer54fda512023-06-14 15:16:56 +020049ramstage-y += ahci.c
Ravi Sarawadi9d903a12016-03-04 21:33:04 -080050ramstage-y += cpu.c
Andrey Petrov70efecd2016-03-04 21:41:13 -080051ramstage-y += chip.c
Aaron Durbin7d14af82017-02-07 11:33:56 -060052ramstage-y += cse.c
Brandon Breitenstein3b0e7612016-07-18 15:14:12 -070053ramstage-y += elog.c
Nico Huber2a163312020-01-06 17:42:45 +010054ramstage-y += graphics.c
Ravi Sarawadi3669a062018-02-27 13:23:42 -080055ramstage-y += gspi.c
Furquan Shaikhb13bd1e2020-09-21 22:44:27 +000056ramstage-y += heci.c
Duncan Laurieff8bce02016-06-27 10:57:13 -070057ramstage-y += i2c.c
Sean Rhodes026f00472022-06-20 08:09:29 +010058ramstage-y += lockdown.c
Lance Zhaoa7ff9c52015-11-12 18:19:41 -080059ramstage-y += lpc.c
Andrey Petrov5672dcd2016-02-12 15:12:43 -080060ramstage-y += mmap_boot.c
Nico Hubera96e66a2018-11-11 02:51:14 +010061ramstage-y += uart.c
Saurabh Satija734aa872016-06-21 14:22:16 -070062ramstage-y += nhlt.c
Alexandru Gagniuc0581a672016-02-24 15:08:23 -080063ramstage-y += spi.c
Subrata Banik15129b42017-11-07 17:50:48 +053064ramstage-y += systemagent.c
Hannah Williams01bc8972016-02-04 20:13:34 -080065ramstage-y += pmutil.c
Divya Chellap0b15b702017-11-29 18:53:03 +053066ramstage-y += pnpconfig.c
Hannah Williams733b39a2016-02-11 13:46:28 -080067ramstage-y += pmc.c
Andrey Petrov0f593c22016-06-17 15:30:13 -070068ramstage-y += reset.c
Andrey Petrov79fc33a2017-01-24 21:56:36 -080069ramstage-y += xdci.c
Venkateswarlu Vinjamuri6dd7b402017-02-24 15:37:30 -080070ramstage-y += sd.c
Karthikeyan Ramasubramanian0f718312019-07-03 13:02:37 -060071ramstage-y += xhci.c
Alexandru Gagniuc7e86cd42015-10-06 10:33:49 -070072
Aaron Durbineebe0e02016-03-18 11:19:38 -050073postcar-y += mmap_boot.c
Furquan Shaikh0be3da52016-06-19 23:20:43 -070074postcar-y += spi.c
Philipp Deppenwiese545ed7a2018-02-14 16:47:12 +010075postcar-y += i2c.c
Furquan Shaikhb13bd1e2020-09-21 22:44:27 +000076postcar-y += heci.c
Kyösti Mälkki4f14cd82019-12-18 19:40:48 +020077postcar-y += reset.c
Nico Hubera96e66a2018-11-11 02:51:14 +010078postcar-y += uart.c
Angel Ponscb06cfe2020-02-28 22:35:56 +010079postcar-y += gspi.c
Aaron Durbineebe0e02016-03-18 11:19:38 -050080
Furquan Shaikhb54a2d12016-06-01 01:55:43 -070081verstage-y += car.c
Rizwan Qureshiae6a4b62017-04-26 21:06:35 +053082verstage-y += i2c.c
Ravi Sarawadi3669a062018-02-27 13:23:42 -080083verstage-y += gspi.c
Furquan Shaikhb13bd1e2020-09-21 22:44:27 +000084verstage-y += heci.c
Aaron Durbinbef75e72016-05-26 11:00:44 -050085verstage-y += mmap_boot.c
Nico Hubera96e66a2018-11-11 02:51:14 +010086verstage-y += uart.c
Aaron Durbinbef75e72016-05-26 11:00:44 -050087verstage-y += pmutil.c
Andrey Petrov0f593c22016-06-17 15:30:13 -070088verstage-y += reset.c
Furquan Shaikh0be3da52016-06-19 23:20:43 -070089verstage-y += spi.c
Aaron Durbinbef75e72016-05-26 11:00:44 -050090
Angel Ponsb36100f2020-09-07 13:18:10 +020091ifeq ($(CONFIG_SOC_INTEL_GEMINILAKE),y)
Hannah Williams3ff14a02017-05-05 16:30:22 -070092bootblock-y += gpio_glk.c
93romstage-y += gpio_glk.c
94smm-y += gpio_glk.c
95ramstage-y += gpio_glk.c
Hsuan-ting Chen642508a2021-10-27 10:59:41 +000096verstage-y += gpio_glk.c
Hannah Williams3ff14a02017-05-05 16:30:22 -070097else
98bootblock-y += gpio_apl.c
99romstage-y += gpio_apl.c
100smm-y += gpio_apl.c
101ramstage-y += gpio_apl.c
Hsuan-ting Chen642508a2021-10-27 10:59:41 +0000102verstage-y += gpio_apl.c
Hannah Williams3ff14a02017-05-05 16:30:22 -0700103endif
104
Alexandru Gagniucdfc2b312015-10-06 17:16:41 -0700105CPPFLAGS_common += -I$(src)/soc/intel/apollolake/include
106
Andrey Petrov79091db72016-05-17 00:03:27 -0700107# Since FSP-M runs in CAR we need to relocate it to a specific address
Mario Scheithauer4e074032019-11-06 11:01:00 +0100108$(call strip_quotes,$(CONFIG_FSP_M_CBFS))-options := -b $(CONFIG_FSP_M_ADDR)
Andrey Petrov79091db72016-05-17 00:03:27 -0700109
Aaron Durbin5c9df702018-04-18 01:05:25 -0600110# Handle GLK paging requirements
111ifeq ($(CONFIG_PAGING_IN_CACHE_AS_RAM),y)
112cbfs-files-y += pt
113pt-file := pt.c:struct
114pt-type := raw
115cbfs-files-y += pdpt
116pdpt-file := pdpt.c:struct
117pdpt-type := raw
118endif
119
Aaron Durbin9f444c32016-05-20 10:48:44 -0500120ifeq ($(CONFIG_NEED_LBP2),y)
Jeremy Compostella0f9858f2019-12-12 14:39:11 -0700121$(objcbfs)/lbp2.bin: $(IFWITOOL)
122ifeq ($(CONFIG_LBP2_FROM_IFWI),y)
123 $(IFWITOOL) $(CONFIG_IFWI_FILE_NAME) create -f $@ -s
124 $(IFWITOOL) $@ delete -n OBBP
125else
126 cp $(CONFIG_LBP2_FILE_NAME) $@
127endif
128
Arthur Heymans34e159c2022-03-30 22:57:14 +0200129$(call add_intermediate, write_lbp2, $(objcbfs)/lbp2.bin)
130 @printf " FMAP writing lbp2 to %s\n" $(CONFIG_LBP2_FMAP_NAME)
131 $(CBFSTOOL) $< write -r $(CONFIG_LBP2_FMAP_NAME) -f $< --fill-upward
Aaron Durbin9f444c32016-05-20 10:48:44 -0500132endif
133
Furquan Shaikh7043bf32016-05-28 12:57:05 -0700134# Bootblock on Apollolake platform lies in the IFWI region. In order to place
135# the bootblock at the right location in IFWI image -
136# a. Using ifwitool:
137# 1. Create IFWI image (ifwi.bin.tmp) from input image
138# (CONFIG_IFWI_FILE_NAME).
139# 2. Delete OBBP sub-partition, if present.
140# 3. Replace IBBL directory entry in IBBP sub-partition with currently
141# generated bootblock.bin.
142# b. Using cbfstool:
143# 1. Write ifwi.bin.tmp to coreboot.rom using CONFIG_IFWI_FMAP_NAME.
144ifeq ($(CONFIG_NEED_IFWI),y)
Arthur Heymans34e159c2022-03-30 22:57:14 +0200145$(call add_intermediate, write_ifwi, $(objcbfs)/bootblock.bin $(IFWITOOL))
146 @printf " IFWI Embedding %s in %s\n" $(objcbfs)/bootblock.bin $(CONFIG_IFWI_FMAP_NAME)
Furquan Shaikh7043bf32016-05-28 12:57:05 -0700147 $(IFWITOOL) $(CONFIG_IFWI_FILE_NAME) create -f $(objcbfs)/ifwi.bin.tmp
148 $(IFWITOOL) $(objcbfs)/ifwi.bin.tmp delete -n OBBP
149 $(IFWITOOL) $(objcbfs)/ifwi.bin.tmp replace -n IBBP -f $(objcbfs)/bootblock.bin -d -e IBBL
Arthur Heymans34e159c2022-03-30 22:57:14 +0200150 $(CBFSTOOL) $< write -r $(CONFIG_IFWI_FMAP_NAME) -f $(objcbfs)/ifwi.bin.tmp --fill-upward
Furquan Shaikh7043bf32016-05-28 12:57:05 -0700151endif
152
Arthur Heymans7e0af332022-03-30 23:04:35 +0200153# When booting APL the IBBL loader places the microcode updates embedded
154# in the IFWI image and a matching FIT table in SRAM. After copying the
155# bootblock to SRAM, it updates the FIT pointer at 0xffffffc0 to point
156# to that table. Before releasing the x86 cores from reset, the regular FIT
157# mechanism does the updates. So coreboot does not need to generate a FIT
158# table + pointer, but reserving the pointer is still needed. Otherwise the
159# IBBL loader thrashes code there. So include fit.c so that the linker
160# reserves that pointer.
Werner Zeh458cfae2022-05-20 07:02:50 +0200161bootblock-y += bootblock/fit.c
Arthur Heymans7e0af332022-03-30 23:04:35 +0200162
Saurabh Satija734aa872016-06-21 14:22:16 -0700163# DSP firmware settings files.
Angel Ponsb36100f2020-09-07 13:18:10 +0200164ifeq ($(CONFIG_SOC_INTEL_GEMINILAKE),y)
Hannah Williams96939ae2017-11-01 11:01:20 -0700165NHLT_BLOB_PATH = 3rdparty/blobs/soc/intel/glk/nhlt-blobs
166else
Saurabh Satija734aa872016-06-21 14:22:16 -0700167NHLT_BLOB_PATH = 3rdparty/blobs/soc/intel/apollolake/nhlt-blobs
Hannah Williams96939ae2017-11-01 11:01:20 -0700168endif
Sathyanarayana Nujella3e0a3fb2016-10-26 17:31:36 -0700169DMIC_1CH_48KHZ_16B = dmic-1ch-48khz-16b.bin
Saurabh Satija734aa872016-06-21 14:22:16 -0700170DMIC_2CH_48KHZ_16B = dmic-2ch-48khz-16b.bin
Sathyanarayana Nujella3e0a3fb2016-10-26 17:31:36 -0700171DMIC_4CH_48KHZ_16B = dmic-4ch-48khz-16b.bin
Saurabh Satija734aa872016-06-21 14:22:16 -0700172MAX98357_RENDER = max98357-render-2ch-48khz-24b.bin
173DA7219_RENDER_CAPTURE = dialog-2ch-48khz-24b.bin
Naveen Manohar532b8d52018-04-27 15:24:45 +0530174RT5682_RENDER_CAPTURE = rt5682-2ch-48khz-24b.bin
Saurabh Satija734aa872016-06-21 14:22:16 -0700175
Sathyanarayana Nujella3e0a3fb2016-10-26 17:31:36 -0700176cbfs-files-$(CONFIG_NHLT_DMIC_1CH_16B) += $(DMIC_1CH_48KHZ_16B)
177$(DMIC_1CH_48KHZ_16B)-file := $(NHLT_BLOB_PATH)/$(DMIC_1CH_48KHZ_16B)
178$(DMIC_1CH_48KHZ_16B)-type := raw
179
Saurabh Satija6f233742016-08-18 14:08:37 -0700180cbfs-files-$(CONFIG_NHLT_DMIC_2CH_16B) += $(DMIC_2CH_48KHZ_16B)
Saurabh Satija734aa872016-06-21 14:22:16 -0700181$(DMIC_2CH_48KHZ_16B)-file := $(NHLT_BLOB_PATH)/$(DMIC_2CH_48KHZ_16B)
182$(DMIC_2CH_48KHZ_16B)-type := raw
183
Sathyanarayana Nujella3e0a3fb2016-10-26 17:31:36 -0700184cbfs-files-$(CONFIG_NHLT_DMIC_4CH_16B) += $(DMIC_4CH_48KHZ_16B)
185$(DMIC_4CH_48KHZ_16B)-file := $(NHLT_BLOB_PATH)/$(DMIC_4CH_48KHZ_16B)
186$(DMIC_4CH_48KHZ_16B)-type := raw
187
Saurabh Satija734aa872016-06-21 14:22:16 -0700188cbfs-files-$(CONFIG_NHLT_MAX98357) += $(MAX98357_RENDER)
189$(MAX98357_RENDER)-file := $(NHLT_BLOB_PATH)/$(MAX98357_RENDER)
190$(MAX98357_RENDER)-type := raw
191
192cbfs-files-$(CONFIG_NHLT_DA7219) += $(DA7219_RENDER_CAPTURE)
193$(DA7219_RENDER_CAPTURE)-file := $(NHLT_BLOB_PATH)/$(DA7219_RENDER_CAPTURE)
194$(DA7219_RENDER_CAPTURE)-type := raw
195
Naveen Manohar532b8d52018-04-27 15:24:45 +0530196cbfs-files-$(CONFIG_NHLT_RT5682) += $(RT5682_RENDER_CAPTURE)
197$(RT5682_RENDER_CAPTURE)-file := $(NHLT_BLOB_PATH)/$(RT5682_RENDER_CAPTURE)
198$(RT5682_RENDER_CAPTURE)-type := raw
199
Angel Ponsb36100f2020-09-07 13:18:10 +0200200ifeq ($(CONFIG_SOC_INTEL_GEMINILAKE),y)
Nico Huberbae03a52018-11-14 17:46:14 +0100201# Gemini Lake B0 (706a1) only atm.
Arthur Heymansa4492902019-06-17 10:50:47 +0200202cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-7a-*)
Nico Huberbae03a52018-11-14 17:46:14 +0100203else
204# Apollo Lake 506c2, B0 (506c9) and E0 (506ca) only atm.
Arthur Heymansa4492902019-06-17 10:50:47 +0200205cpu_microcode_bins += $(wildcard 3rdparty/intel-microcode/intel-ucode/06-5c-*)
Alexandru Gagniuc7e86cd42015-10-06 10:33:49 -0700206endif
Nico Huberbae03a52018-11-14 17:46:14 +0100207
208endif # if CONFIG_SOC_INTEL_APOLLOLAKE