Debian Codegraph @

src/soc/intel/alderlake/Makefile.mk

raw symbols SCIP
1 ## SPDX-License-Identifier: GPL-2.0-only
2 ifeq ($(CONFIG_SOC_INTEL_ALDERLAKE),y)
3 subdirs-y += romstage
4 subdirs-y += ../../../cpu/intel/microcode
5 subdirs-y += ../../../cpu/intel/turbo
6
7 # all (bootblock, verstage, romstage, postcar, ramstage)
8 all-y += gspi.c
9 all-y += i2c.c
10 all-y += pmutil.c
11 all-y += spi.c
12 all-y += uart.c
13
14 bootblock-y += bootblock/bootblock.c
15 bootblock-y += bootblock/pch.c
16 bootblock-y += bootblock/report_platform.c
17 bootblock-y += espi.c
18 bootblock-y += p2sb.c
19 bootblock-$(CONFIG_ALDERLAKE_CONFIGURE_DESCRIPTOR) += bootblock/update_descriptor.c
20
21 romstage-$(CONFIG_SOC_INTEL_CSE_PRE_CPU_RESET_TELEMETRY) += cse_telemetry.c
22 romstage-y += espi.c
23 romstage-y += meminit.c
24 romstage-y += pcie_rp.c
25 romstage-y += reset.c
26
27 ramstage-y += acpi.c
28 ramstage-y += chip.c
29 ramstage-y += cpu.c
30 ramstage-y += elog.c
31 ramstage-y += espi.c
32 ramstage-y += finalize.c
33 ramstage-y += fsp_params.c
34 ramstage-y += graphics.c
35 ramstage-y += hsphy.c
36 ramstage-y += lockdown.c
37 ramstage-y += p2sb.c
38 ramstage-y += pcie_rp.c
39 ramstage-y += pmc.c
40 ramstage-y += reset.c
41 ramstage-$(CONFIG_SOC_INTEL_ALDERLAKE_TCSS_USB4_SUPPORT) += retimer.c
42 ramstage-y += soundwire.c
43 ramstage-y += systemagent.c
44 ramstage-y += tcss.c
45 ramstage-y += vr_config.c
46 ramstage-y += xhci.c
47 ramstage-$(CONFIG_SOC_INTEL_CRASHLOG) += crashlog.c
48
49 smm-y += elog.c
50 smm-y += p2sb.c
51 smm-y += pmutil.c
52 smm-y += smihandler.c
53 smm-y += uart.c
54 smm-y += xhci.c
55
56 ifeq ($(CONFIG_SOC_INTEL_ALDERLAKE_PCH_S),y)
57 bootblock-y += gpio_pch_s.c
58 romstage-y += gpio_pch_s.c
59 ramstage-y += gpio_pch_s.c
60 smm-y += gpio_pch_s.c
61 verstage-y += gpio_pch_s.c
62 else
63 bootblock-y += gpio.c
64 romstage-y += gpio.c
65 ramstage-y += gpio.c
66 smm-y += gpio.c
67 verstage-y += gpio.c
68 endif
69
70 CPPFLAGS_common += -I$(src)/soc/intel/alderlake
71 CPPFLAGS_common += -I$(src)/soc/intel/alderlake/include
72
73 ifeq ($(CONFIG_SOC_INTEL_ALDERLAKE_PCH_S),y)
74 # 06-97-00, 06-97-01, 06-97-04 are ADL-S Engineering Samples
75 # 06-97-02 are ADL-S/HX Quality Samples but also ADL-HX Engineering Samples
76 # 06-b7-00 are RPL-S Engineering Samples
77 # ADL-S/HX C0/H0 and RPL-S C0/H0
78 cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-97-05
79 # RPL-S/HX B0
80 cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-b7-01
81 else ifeq ($(CONFIG_SOC_INTEL_ALDERLAKE_PCH_N),y)
82 cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-be-00
83 else
84 # 06-9a-00, 06-9a-01 are ADL-P/ADL-M Engineering Samples
85 # Missing 06-9a-02 ADL-P K0
86 # ADL-P L0, ADL-P R0 and ADL-M R0
87 cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-9a-04
88 # RPL-P/H J0, RPL-U Q0
89 cpu_microcode_bins += 3rdparty/intel-microcode/intel-ucode/06-ba-02
90 endif
91
92 ifeq ($(CONFIG_STITCH_ME_BIN),y)
93
94 $(eval $(call cse_add_dummy_to_bp1_bp2,DLMP))
95 $(eval $(call cse_add_dummy_to_bp1_bp2,IFPP))
96 $(eval $(call cse_add_dummy_to_bp1_bp2,SBDT))
97 $(eval $(call cse_add_decomp_to_bp1_bp2,RBEP))
98 $(eval $(call cse_add_dummy_to_bp1_bp2,UFSP))
99 $(eval $(call cse_add_dummy_to_bp1_bp2,UFSG))
100 $(eval $(call cse_add_input_to_bp1_bp2,OEMP))
101 $(eval $(call cse_add_input_to_bp1_bp2,PMCP))
102 $(eval $(call cse_add_decomp,bp1,MFTP))
103 $(eval $(call cse_add_decomp,bp2,FTPR))
104 $(eval $(call cse_add_input_to_bp1_bp2,IOMP))
105 $(eval $(call cse_add_input_to_bp1_bp2,NPHY))
106 $(eval $(call cse_add_input_to_bp1_bp2,TBTP))
107 $(eval $(call cse_add_input_to_bp1_bp2,PCHC))
108 $(eval $(call cse_add_decomp,bp2,NFTP))
109 $(eval $(call cse_add_dummy,bp2,ISHP))
110 $(eval $(call cse_add_input,bp2,IUNP))
111
112 endif
113
114 ifeq ($(CONFIG_INCLUDE_HSPHY_IN_FMAP),y)
115 ifneq ($(call strip_quotes,$(CONFIG_HSPHY_FW_FILE)),)
116
117 # Create the target HSPHY file that will be put into flashmap region.
118 # First goes the HSPHY size, then hash algorithm (3 - SHA384, default for now),
119 # the hash digest, padding to max digest size (SHA512 - 64 bytes) and at last the
120 # HSPHY firmware itself
121 $(obj)/hsphy_fw.bin: $(call strip_quotes,$(top)/$(CONFIG_HSPHY_FW_FILE))
122 printf " HSPHY $(obj)/hsphy_fw.bin\n"
123 $(shell wc -c $< | awk '{print $$1}' | tr -d '\n' | xargs -0 printf '%08X' | \
124 tac -rs .. | xxd -r -p > $@)
125 $(shell printf '%02X' 3 | xxd -r -p >> $@)
126 $(shell sha384sum $< | awk '{print $$1}' | tac -rs .. | xxd -r -p >> $@)
127 $(shell dd if=/dev/zero bs=1 count=16 2> /dev/null >> $@)
128 $(shell cat $< >> $@)
129
130 add_hsphy_firmware: $(obj)/hsphy_fw.bin $(obj)/fmap.fmap $(obj)/coreboot.pre $(CBFSTOOL)
131 $(CBFSTOOL) $(obj)/coreboot.pre write -u -r HSPHY_FW -f $(obj)/hsphy_fw.bin
132
133 $(call add_intermediate, add_hsphy_firmware)
134
135 endif
136 endif
137
138 endif