blob: 3565cd180bd6365afefb3d1c75922edb0683c743 [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_BROADWELL),y)
3
Angel Ponsc200e8c72020-10-23 21:37:21 +02004subdirs-y += pch
5
Angel Pons1500dd02020-10-26 00:32:42 +01006bootblock-y += bootblock.c
7
8romstage-y += early_init.c
9romstage-y += raminit.c
10romstage-y += report_platform.c
11romstage-y += romstage.c
Angel Pons2a90e392021-06-23 15:16:15 +020012romstage-$(CONFIG_HAVE_SPD_IN_CBFS) += spd.c
Arthur Heymans5bb15f12018-12-22 16:02:25 +010013
Duncan Lauriec88c54c2014-04-30 16:36:13 -070014ramstage-y += acpi.c
Duncan Lauriec88c54c2014-04-30 16:36:13 -070015ramstage-y += finalize.c
Angel Pons9bf45b42020-10-13 01:12:06 +020016ramstage-y += gma.c
Duncan Lauriec88c54c2014-04-30 16:36:13 -070017ramstage-y += memmap.c
18romstage-y += memmap.c
Arthur Heymans90cca542018-11-29 13:36:54 +010019postcar-y += memmap.c
Duncan Lauriec88c54c2014-04-30 16:36:13 -070020ramstage-y += minihd.c
Angel Ponsc8e86de2020-10-26 00:44:38 +010021ramstage-y += northbridge.c
Duncan Lauriec88c54c2014-04-30 16:36:13 -070022ramstage-y += pei_data.c
23romstage-y += pei_data.c
Duncan Lauriec88c54c2014-04-30 16:36:13 -070024ramstage-$(CONFIG_HAVE_REFCODE_BLOB) += refcode.c
Alexandru Gagniuc1d857002015-09-09 22:38:06 -070025
Julius Werner4ee4bd52014-10-20 13:46:39 -070026CPPFLAGS_common += -Isrc/soc/intel/broadwell/include
Duncan Lauriec88c54c2014-04-30 16:36:13 -070027
Duncan Lauriec88c54c2014-04-30 16:36:13 -070028# If an MRC file is an ELF file determine the entry address and first loadable
29# section offset in the file. Subtract the offset from the entry address to
30# determine the final location.
Patrick Georgi0a1699e2014-11-12 19:15:34 +010031mrcelfoffset = $(shell $(READELF_x86_32) -S -W $(CONFIG_MRC_FILE) | sed -e 's/\[ /[0/' | awk '$$3 ~ /PROGBITS/ { print "0x"$$5; exit }' )
32mrcelfentry = $(shell $(READELF_x86_32) -h -W $(CONFIG_MRC_FILE) | grep 'Entry point address' | awk '{print $$NF }')
Duncan Lauriec88c54c2014-04-30 16:36:13 -070033
34# Add memory reference code blob.
35cbfs-files-$(CONFIG_HAVE_MRC) += mrc.bin
36mrc.bin-file := $(call strip_quotes,$(CONFIG_MRC_FILE))
37mrc.bin-position := $(if $(findstring elf,$(CONFIG_MRC_FILE)),$(shell printf "0x%x" $$(( $(mrcelfentry) - $(mrcelfoffset) )) ),$(CONFIG_MRC_BIN_ADDRESS))
Martin Roth72a8e5e2015-03-24 16:02:27 -060038mrc.bin-type := mrc
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070039
40endif