blob: 207f17d5791925a4b2cbea6a7d2de3b564bf0dfa [file] [log] [blame]
Lee Leahy77ff0b12015-05-05 15:07:29 -07001ifeq ($(CONFIG_SOC_INTEL_BRASWELL),y)
2
3subdirs-y += bootblock
4subdirs-y += microcode
5subdirs-y += romstage
Lee Leahy32471722015-04-20 15:20:28 -07006subdirs-y += ../common
Lee Leahy77ff0b12015-05-05 15:07:29 -07007subdirs-y += ../../../cpu/x86/lapic
8subdirs-y += ../../../cpu/x86/mtrr
9subdirs-y += ../../../cpu/x86/smm
10subdirs-y += ../../../cpu/x86/tsc
11subdirs-y += ../../../cpu/intel/microcode
12subdirs-y += ../../../cpu/intel/turbo
13
Lee Leahy32471722015-04-20 15:20:28 -070014romstage-y += gpio_support.c
Lee Leahy77ff0b12015-05-05 15:07:29 -070015romstage-y += iosf.c
Lee Leahyacb9c0b2015-07-02 11:55:18 -070016romstage-y += lpc_init.c
Lee Leahy32471722015-04-20 15:20:28 -070017romstage-y += memmap.c
18romstage-y += tsc_freq.c
19
Lee Leahy77ff0b12015-05-05 15:07:29 -070020ramstage-y += acpi.c
Lee Leahy32471722015-04-20 15:20:28 -070021ramstage-y += chip.c
22ramstage-y += cpu.c
Lee Leahy77ff0b12015-05-05 15:07:29 -070023ramstage-$(CONFIG_ELOG) += elog.c
Lee Leahy32471722015-04-20 15:20:28 -070024ramstage-y += emmc.c
25ramstage-y += gpio.c
26ifeq ($(CONFIG_GOP_SUPPORT),n)
27ramstage-y += gfx.c
28endif
Lee Leahy77ff0b12015-05-05 15:07:29 -070029ramstage-y += hda.c
Lee Leahy32471722015-04-20 15:20:28 -070030ramstage-y += iosf.c
31ramstage-y += lpe.c
32ramstage-y += lpss.c
33ramstage-y += memmap.c
34ramstage-y += northcluster.c
35ramstage-y += pcie.c
36ramstage-y += pmutil.c
37ramstage-y += ramstage.c
38ramstage-y += sata.c
39ramstage-y += scc.c
40ramstage-y += sd.c
41ramstage-y += smm.c
42ramstage-y += southcluster.c
43ramstage-y += spi.c
44ramstage-$(CONFIG_ALT_CBFS_LOAD_PAYLOAD) += spi_loading.c
45ramstage-y += tsc_freq.c
Lee Leahy77ff0b12015-05-05 15:07:29 -070046
47# Remove as ramstage gets fleshed out
48ramstage-y += placeholders.c
49
Lee Leahyacb9c0b2015-07-02 11:55:18 -070050smm-y += lpc_init.c
Lee Leahy32471722015-04-20 15:20:28 -070051smm-y += pmutil.c
52smm-y += smihandler.c
53smm-y += spi.c
54smm-y += tsc_freq.c
55
56CPPFLAGS_common += -I$(src)/arch/x86/include/
57CPPFLAGS_common += -I$(src)/soc/intel/braswell/
58CPPFLAGS_common += -I$(src)/soc/intel/braswell/include
59
60CPPFLAGS_common += -I3rdparty/blobs/mainboard/$(CONFIG_MAINBOARD_DIR)
61
62CPPFLAGS_common += -I$(src)/drivers/intel/fsp1_1
63CPPFLAGS_common += -I$(src)/vendorcode/intel/fsp/fsp1_1
64CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4
65CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include
66CPPFLAGS_common += -I$(src)/vendorcode/intel/edk2/uefi_2.4/MdePkg/Include/Ia32
67CPPFLAGS_common += -I$(CONFIG_FSP_INCLUDE_PATH)
Lee Leahy77ff0b12015-05-05 15:07:29 -070068
69# Run an intermediate step when producing coreboot.rom
70# that adds additional components to the final firmware
71# image outside of CBFS
Lee Leahy32471722015-04-20 15:20:28 -070072INTERMEDIATE := pch_add_me
Lee Leahy77ff0b12015-05-05 15:07:29 -070073
74ifeq ($(CONFIG_BUILD_WITH_FAKE_IFD),y)
75IFD_BIN_PATH := $(objgenerated)/ifdfake.bin
76IFD_SECTIONS := $(addprefix -b ,$(CONFIG_IFD_BIOS_SECTION:"%"=%)) \
77 $(addprefix -m ,$(CONFIG_IFD_ME_SECTION:"%"=%)) \
78 $(addprefix -p ,$(CONFIG_IFD_PLATFORM_SECTION:"%"=%))
79else
80IFD_BIN_PATH := $(CONFIG_IFD_BIN_PATH)
81endif
82
Lee Leahy32471722015-04-20 15:20:28 -070083pch_add_me: $(obj)/coreboot.pre $(IFDTOOL) $(IFDFAKE)
Lee Leahy77ff0b12015-05-05 15:07:29 -070084ifeq ($(CONFIG_BUILD_WITH_FAKE_IFD),y)
85 printf "\n** WARNING **\n"
86 printf "Coreboot will be built with a fake Intel Firmware Descriptor (IFD).\n"
87 printf "Never write a complete coreboot.rom with a fake IFD to your board's\n"
88 printf "flash ROM! Make sure that you only write valid flash regions.\n\n"
89 printf " IFDFAKE Building a fake Intel Firmware Descriptor\n"
90 $(IFDFAKE) $(IFD_SECTIONS) $(IFD_BIN_PATH)
91endif
92 printf " DD Adding Intel Firmware Descriptor\n"
Lee Leahy32471722015-04-20 15:20:28 -070093 printf "CONFIG_IFD_BIN_PATH: $(CONFIG_IFD_BIN_PATH)\n"
94 printf "IFD_BIN_PATH: $(IFD_BIN_PATH)\n"
Lee Leahy77ff0b12015-05-05 15:07:29 -070095 dd if=$(IFD_BIN_PATH) \
96 of=$(obj)/coreboot.pre conv=notrunc >/dev/null 2>&1
Lee Leahy32471722015-04-20 15:20:28 -070097 printf "CONFIG_HAVE_ME_BIN: $(CONFIG_HAVE_ME_BIN)\n"
Lee Leahy77ff0b12015-05-05 15:07:29 -070098ifeq ($(CONFIG_HAVE_ME_BIN),y)
99 printf " IFDTOOL me.bin -> coreboot.pre\n"
Lee Leahy32471722015-04-20 15:20:28 -0700100 printf "CONFIG_ME_BIN_PATH: $(CONFIG_ME_BIN_PATH)\n"
Lee Leahy77ff0b12015-05-05 15:07:29 -0700101 $(objutil)/ifdtool/ifdtool \
102 -i ME:$(CONFIG_ME_BIN_PATH) \
103 $(obj)/coreboot.pre
104 mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
105endif
106
Lee Leahy32471722015-04-20 15:20:28 -0700107ifeq ($(CONFIG_LOCK_MANAGEMENT_ENGINE),y)
108 printf " IFDTOOL Locking Management Engine\n"
109 $(objutil)/ifdtool/ifdtool -l $(obj)/coreboot.pre
110 mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
111else
112 printf " IFDTOOL Unlocking Management Engine\n"
113 $(objutil)/ifdtool/ifdtool -u $(obj)/coreboot.pre
114 mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
115endif
Lee Leahy77ff0b12015-05-05 15:07:29 -0700116
Lee Leahy32471722015-04-20 15:20:28 -0700117PHONY += pch_add_me
Lee Leahy77ff0b12015-05-05 15:07:29 -0700118
119endif