blob: 55fc83ea7c52dd126f14abae4c085217b06799ab [file] [log] [blame]
Martin Roth9231f0b2022-10-28 22:39:23 -06001## SPDX-License-Identifier: GPL-2.0-only
Subrata Banikb3ced6a2020-08-04 13:34:03 +05302ifeq ($(CONFIG_SOC_INTEL_ALDERLAKE),y)
Subrata Banik292afef2020-09-09 13:34:18 +05303subdirs-y += romstage
4subdirs-y += ../../../cpu/intel/microcode
5subdirs-y += ../../../cpu/intel/turbo
Subrata Banik292afef2020-09-09 13:34:18 +05306
Subrata Banik2871e0e2020-09-27 11:30:58 +05307# all (bootblock, verstage, romstage, postcar, ramstage)
8all-y += gspi.c
9all-y += i2c.c
10all-y += pmutil.c
11all-y += spi.c
12all-y += uart.c
13
Subrata Banikb3ced6a2020-08-04 13:34:03 +053014bootblock-y += bootblock/bootblock.c
Subrata Banikb3ced6a2020-08-04 13:34:03 +053015bootblock-y += bootblock/pch.c
16bootblock-y += bootblock/report_platform.c
Subrata Banik292afef2020-09-09 13:34:18 +053017bootblock-y += espi.c
18bootblock-y += p2sb.c
Reka Normane790f922022-04-06 20:33:54 +100019bootblock-$(CONFIG_ALDERLAKE_CONFIGURE_DESCRIPTOR) += bootblock/update_descriptor.c
Subrata Banik292afef2020-09-09 13:34:18 +053020
Bora Guvendik94050492023-03-12 12:24:58 -070021romstage-$(CONFIG_SOC_INTEL_CSE_PRE_CPU_RESET_TELEMETRY) += cse_telemetry.c
Subrata Banik292afef2020-09-09 13:34:18 +053022romstage-y += espi.c
23romstage-y += meminit.c
Eric Laif8248f32020-12-31 11:43:29 +080024romstage-y += pcie_rp.c
Subrata Banik292afef2020-09-09 13:34:18 +053025romstage-y += reset.c
Subrata Banikaab8bb22020-09-21 16:03:43 +053026
Subrata Banik2871e0e2020-09-27 11:30:58 +053027ramstage-y += acpi.c
28ramstage-y += chip.c
29ramstage-y += cpu.c
30ramstage-y += elog.c
31ramstage-y += espi.c
32ramstage-y += finalize.c
33ramstage-y += fsp_params.c
Tim Crawfordc6529c72022-11-01 11:42:28 -060034ramstage-y += graphics.c
Michał Żygowski9b0f1692022-05-05 13:21:01 +020035ramstage-y += hsphy.c
Subrata Banik2871e0e2020-09-27 11:30:58 +053036ramstage-y += lockdown.c
Subrata Banik2871e0e2020-09-27 11:30:58 +053037ramstage-y += p2sb.c
Eric Laif8248f32020-12-31 11:43:29 +080038ramstage-y += pcie_rp.c
Subrata Banik2871e0e2020-09-27 11:30:58 +053039ramstage-y += pmc.c
40ramstage-y += reset.c
Michał Żygowski9df95d92022-04-08 17:02:35 +020041ramstage-$(CONFIG_SOC_INTEL_ALDERLAKE_TCSS_USB4_SUPPORT) += retimer.c
Subrata Banik2871e0e2020-09-27 11:30:58 +053042ramstage-y += soundwire.c
43ramstage-y += systemagent.c
John848b4252022-03-09 17:51:56 -080044ramstage-y += tcss.c
V Sowmyac6d71662021-07-15 08:11:08 +053045ramstage-y += vr_config.c
Tim Wawrzynczak291b58f2020-11-10 10:25:04 -070046ramstage-y += xhci.c
Francois Toguocea4f922021-04-16 21:20:39 -070047ramstage-$(CONFIG_SOC_INTEL_CRASHLOG) += crashlog.c
Subrata Banikaab8bb22020-09-21 16:03:43 +053048
Sugnan Prabhu Sf040f752021-03-26 10:58:49 +053049smm-y += elog.c
Subrata Banik2871e0e2020-09-27 11:30:58 +053050smm-y += p2sb.c
51smm-y += pmutil.c
52smm-y += smihandler.c
53smm-y += uart.c
Sugnan Prabhu Sf040f752021-03-26 10:58:49 +053054smm-y += xhci.c
Subrata Banikaab8bb22020-09-21 16:03:43 +053055
Michał Kopećfebaf2f2022-04-07 14:14:31 +020056ifeq ($(CONFIG_SOC_INTEL_ALDERLAKE_PCH_S),y)
57bootblock-y += gpio_pch_s.c
58romstage-y += gpio_pch_s.c
59ramstage-y += gpio_pch_s.c
60smm-y += gpio_pch_s.c
61verstage-y += gpio_pch_s.c
62else
63bootblock-y += gpio.c
64romstage-y += gpio.c
65ramstage-y += gpio.c
66smm-y += gpio.c
67verstage-y += gpio.c
68endif
69
Subrata Banikb3ced6a2020-08-04 13:34:03 +053070CPPFLAGS_common += -I$(src)/soc/intel/alderlake
71CPPFLAGS_common += -I$(src)/soc/intel/alderlake/include
Furquan Shaikhf888c682021-10-05 21:37:33 -070072
Michał Żygowskic651a272023-06-16 14:05:22 +020073# Include the missing MemInfoHob.h from vendorcode
74ifeq ($(CONFIG_SOC_INTEL_RAPTORLAKE_PCH_S)$(CONFIG_FSP_TYPE_IOT),yy)
75CPPFLAGS_common += -I$(src)/vendorcode/intel/fsp/fsp2_0/iot/raptorlake_s
76endif
77
Michał Żygowski6297df82022-06-30 16:22:35 +020078ifeq ($(CONFIG_SOC_INTEL_ALDERLAKE_PCH_S),y)
79# 06-97-00, 06-97-01, 06-97-04 are ADL-S Engineering Samples
80# 06-97-02 are ADL-S/HX Quality Samples but also ADL-HX Engineering Samples
Michał Żygowski7357f2a2023-10-16 15:32:59 +020081# 06-b7-00 are RPL-S Engineering Samples
82# ADL-S/HX C0/H0 and RPL-S C0/H0
Michał Żygowski6297df82022-06-30 16:22:35 +020083cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-97-05
Tim Crawford0b101fc2023-02-08 08:49:16 -070084# RPL-S/HX B0
85cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-b7-01
Felix Singer52fb64b2023-06-03 06:12:57 +020086else ifeq ($(CONFIG_SOC_INTEL_ALDERLAKE_PCH_N),y)
87cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-be-00
Michał Żygowski6297df82022-06-30 16:22:35 +020088else
Michał Żygowski6297df82022-06-30 16:22:35 +020089# 06-9a-00, 06-9a-01 are ADL-P/ADL-M Engineering Samples
90# Missing 06-9a-02 ADL-P K0
Nico Huber1dadb8c2023-07-07 20:19:12 +020091# ADL-P L0, ADL-P R0 and ADL-M R0
Michał Żygowski6297df82022-06-30 16:22:35 +020092cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-9a-04
Tim Crawfordf1a4cff2023-03-03 11:58:18 -070093# RPL-P/H J0, RPL-U Q0
94cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-ba-02
Michał Żygowski6297df82022-06-30 16:22:35 +020095endif
Michał Żygowski6297df82022-06-30 16:22:35 +020096
Furquan Shaikhf888c682021-10-05 21:37:33 -070097ifeq ($(CONFIG_STITCH_ME_BIN),y)
98
Bernardo Perez Priegoaba1c132021-10-20 21:13:29 -070099$(eval $(call cse_add_dummy_to_bp1_bp2,DLMP))
100$(eval $(call cse_add_dummy_to_bp1_bp2,IFPP))
101$(eval $(call cse_add_dummy_to_bp1_bp2,SBDT))
102$(eval $(call cse_add_decomp_to_bp1_bp2,RBEP))
103$(eval $(call cse_add_dummy_to_bp1_bp2,UFSP))
104$(eval $(call cse_add_dummy_to_bp1_bp2,UFSG))
Ravindra N07092182021-12-06 10:11:51 +0530105$(eval $(call cse_add_input_to_bp1_bp2,OEMP))
Bernardo Perez Priegoaba1c132021-10-20 21:13:29 -0700106$(eval $(call cse_add_input_to_bp1_bp2,PMCP))
107$(eval $(call cse_add_decomp,bp1,MFTP))
108$(eval $(call cse_add_decomp,bp2,FTPR))
109$(eval $(call cse_add_input_to_bp1_bp2,IOMP))
110$(eval $(call cse_add_input_to_bp1_bp2,NPHY))
111$(eval $(call cse_add_input_to_bp1_bp2,TBTP))
112$(eval $(call cse_add_input_to_bp1_bp2,PCHC))
113$(eval $(call cse_add_decomp,bp2,NFTP))
114$(eval $(call cse_add_dummy,bp2,ISHP))
115$(eval $(call cse_add_input,bp2,IUNP))
Furquan Shaikhf888c682021-10-05 21:37:33 -0700116
117endif
118
Michał Żygowski95be0122022-10-29 21:32:54 +0200119ifeq ($(CONFIG_INCLUDE_HSPHY_IN_FMAP),y)
120ifneq ($(call strip_quotes,$(CONFIG_HSPHY_FW_FILE)),)
121
122# Create the target HSPHY file that will be put into flashmap region.
123# First goes the HSPHY size, then hash algorithm (3 - SHA384, default for now),
124# the hash digest, padding to max digest size (SHA512 - 64 bytes) and at last the
125# HSPHY firmware itself
126$(obj)/hsphy_fw.bin: $(call strip_quotes,$(top)/$(CONFIG_HSPHY_FW_FILE))
127 printf " HSPHY $(obj)/hsphy_fw.bin\n"
128 $(shell wc -c $< | awk '{print $$1}' | tr -d '\n' | xargs -0 printf '%08X' | \
129 tac -rs .. | xxd -r -p > $@)
130 $(shell printf '%02X' 3 | xxd -r -p >> $@)
131 $(shell sha384sum $< | awk '{print $$1}' | tac -rs .. | xxd -r -p >> $@)
132 $(shell dd if=/dev/zero bs=1 count=16 2> /dev/null >> $@)
133 $(shell cat $< >> $@)
134
135add_hsphy_firmware: $(obj)/hsphy_fw.bin $(obj)/fmap.fmap $(obj)/coreboot.pre $(CBFSTOOL)
136 $(CBFSTOOL) $(obj)/coreboot.pre write -u -r HSPHY_FW -f $(obj)/hsphy_fw.bin
137
138$(call add_intermediate, add_hsphy_firmware)
139
140endif
141endif
142
Subrata Banikb3ced6a2020-08-04 13:34:03 +0530143endif