blob: 281175c9a8daa12963541f168b2b55695fa8a029 [file] [log] [blame]
Martin Roth9231f0b2022-10-28 22:39:23 -06001## SPDX-License-Identifier: GPL-2.0-only
Stefan Reinaueraae53ab2015-04-27 14:03:57 -07002ifeq ($(CONFIG_SOC_INTEL_BAYTRAIL),y)
3
Aaron Durbin9a7d7bc2013-09-07 00:41:48 -05004subdirs-y += romstage
Aaron Durbin452d31a2013-09-24 16:47:49 -05005subdirs-y += ../../../cpu/intel/microcode
Duncan Laurie05a33932013-11-05 12:59:50 -08006subdirs-y += ../../../cpu/intel/turbo
Matt DeVilliere5a1a4c2017-01-19 21:13:02 -06007subdirs-y += ../../../cpu/intel/common
Aaron Durbin9a7d7bc2013-09-07 00:41:48 -05008
Arthur Heymans179da7f2019-11-15 12:51:51 +01009all-y += tsc_freq.c
10
11bootblock-y += ../../../cpu/intel/car/non-evict/cache_as_ram.S
12bootblock-y += ../../../cpu/intel/car/bootblock.c
13bootblock-y += ../../../cpu/x86/early_reset.S
14bootblock-y += bootblock/bootblock.c
15
Aaron Durbin9a7d7bc2013-09-07 00:41:48 -050016romstage-y += iosf.c
Angel Ponsef3caf02019-07-21 02:50:51 +020017romstage-y += memmap.c
Aaron Durbin64b4bdd2017-09-15 14:24:03 -060018romstage-y += pmutil.c
Angel Ponsef3caf02019-07-21 02:50:51 +020019
20postcar-y += iosf.c
21postcar-y += memmap.c
Angel Ponsef3caf02019-07-21 02:50:51 +020022
23ramstage-y += acpi.c
24ramstage-y += chip.c
25ramstage-y += cpu.c
26ramstage-y += dptf.c
27ramstage-y += ehci.c
28ramstage-y += emmc.c
Angel Pons91ca2dd2020-07-12 14:24:48 +020029ramstage-y += fadt.c
Angel Ponsef3caf02019-07-21 02:50:51 +020030ramstage-y += gfx.c
31ramstage-y += gpio.c
32ramstage-y += hda.c
33ramstage-y += iosf.c
34ramstage-y += lpe.c
35ramstage-y += lpss.c
36ramstage-y += memmap.c
37ramstage-y += northcluster.c
38ramstage-y += pcie.c
39ramstage-y += perf_power.c
Aaron Durbin7837be62013-10-21 22:32:00 -050040ramstage-y += pmutil.c
Angel Ponsef3caf02019-07-21 02:50:51 +020041ramstage-y += ramstage.c
42ramstage-y += sata.c
43ramstage-y += scc.c
44ramstage-y += sd.c
45ramstage-y += smm.c
46ramstage-y += southcluster.c
Angel Ponsef3caf02019-07-21 02:50:51 +020047ramstage-y += xhci.c
48ramstage-$(CONFIG_ELOG) += elog.c
Angel Pons4cedb8c2021-05-17 18:46:41 +020049ramstage-$(CONFIG_VGA_ROM_RUN) += int15.c
Mate Kukrie2319492020-07-04 11:20:07 +020050
51ifeq ($(CONFIG_HAVE_REFCODE_BLOB),y)
52ramstage-y += refcode.c
53else
54ramstage-y += modphy_table.c refcode_native.c
55endif
Angel Ponsef3caf02019-07-21 02:50:51 +020056
57smm-y += iosf.c
Aaron Durbin7837be62013-10-21 22:32:00 -050058smm-y += pmutil.c
59smm-y += smihandler.c
Angel Ponsef3caf02019-07-21 02:50:51 +020060smm-y += tsc_freq.c
Aaron Durbin9a7d7bc2013-09-07 00:41:48 -050061
62# Remove as ramstage gets fleshed out
63ramstage-y += placeholders.c
64
Arthur Heymansd5d20d02018-11-29 14:16:49 +010065postcar-y += ../../../cpu/intel/car/non-evict/exit_car.S
66
Mate Kukrif2c13bd2020-07-07 17:23:18 +020067cpu_microcode_bins += 3rdparty/blobs/soc/intel/baytrail/microcode.bin \
68 3rdparty/intel-microcode/intel-ucode/06-37-09
Alexandru Gagniuc1d857002015-09-09 22:38:06 -070069
Julius Werner18ea2d32014-10-07 16:42:17 -070070CPPFLAGS_common += -Isrc/soc/intel/baytrail/include
Aaron Durbin9a7d7bc2013-09-07 00:41:48 -050071
Angel Pons3606b932021-09-27 13:17:49 +020072ifeq ($(CONFIG_HAVE_MRC),y)
73
74# Bay Trail MRC is an ELF file. Determine the entry address and first loadable
Aaron Durbin11318892014-04-02 20:46:13 -050075# section offset in the file. Subtract the offset from the entry address to
76# determine the final location.
Patrick Georgi0a1699e2014-11-12 19:15:34 +010077mrcelfoffset = $(shell $(READELF_x86_32) -S -W $(CONFIG_MRC_FILE) | sed -e 's/\[ /[0/' | awk '$$3 ~ /PROGBITS/ { print "0x"$$5; exit }' )
78mrcelfentry = $(shell $(READELF_x86_32) -h -W $(CONFIG_MRC_FILE) | grep 'Entry point address' | awk '{print $$NF }')
Aaron Durbin11318892014-04-02 20:46:13 -050079
Aaron Durbin9a7d7bc2013-09-07 00:41:48 -050080# Add memory reference code blob.
Angel Pons3606b932021-09-27 13:17:49 +020081cbfs-files-y += mrc.bin
Aaron Durbin9a7d7bc2013-09-07 00:41:48 -050082mrc.bin-file := $(call strip_quotes,$(CONFIG_MRC_FILE))
Angel Pons3606b932021-09-27 13:17:49 +020083mrc.bin-position := $(shell printf "0x%x" $$(( $(mrcelfentry) - $(mrcelfoffset) )) )
Martin Roth72a8e5e2015-03-24 16:02:27 -060084mrc.bin-type := mrc
Aaron Durbin9a7d7bc2013-09-07 00:41:48 -050085
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070086endif
Angel Pons3606b932021-09-27 13:17:49 +020087endif