Patrick Georgi | c49d7a3 | 2020-05-08 22:50:46 +0200 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
| 2 | |
Nico Huber | be5492a | 2015-09-29 16:41:19 +0200 | [diff] [blame] | 3 | subdirs-y += gnat |
Stefan Reinauer | 24ef134 | 2011-04-14 22:28:00 +0000 | [diff] [blame] | 4 | |
Ryan Salsamendi | ab37e9a | 2017-06-11 21:07:31 -0700 | [diff] [blame] | 5 | ifeq ($(CONFIG_UBSAN),y) |
| 6 | ramstage-y += ubsan.c |
| 7 | CFLAGS_ramstage += -fsanitize=undefined |
| 8 | endif |
Julius Werner | 86fc11d | 2015-10-09 13:37:58 -0700 | [diff] [blame] | 9 | |
Harshit Sharma | 3b9cc85 | 2020-07-06 23:38:31 -0700 | [diff] [blame] | 10 | # Ensure that asan_shadow_offset_callback patch is applied to GCC before ASan is used. |
| 11 | CFLAGS_asan += -fsanitize=kernel-address --param asan-use-shadow-offset-callback=1 \ |
Harshit Sharma | a6ebe08 | 2020-07-20 00:21:05 -0700 | [diff] [blame] | 12 | --param asan-stack=1 -fsanitize-address-use-after-scope \ |
Harshit Sharma | 2bcaba0 | 2020-06-09 20:25:16 -0700 | [diff] [blame] | 13 | --param asan-instrumentation-with-call-threshold=0 \ |
Harshit Sharma | 2bcaba0 | 2020-06-09 20:25:16 -0700 | [diff] [blame] | 14 | --param use-after-scope-direct-emission-threshold=0 |
Harshit Sharma | a6ebe08 | 2020-07-20 00:21:05 -0700 | [diff] [blame] | 15 | |
| 16 | ifeq ($(CONFIG_ASAN_IN_ROMSTAGE),y) |
| 17 | romstage-y += asan.c |
| 18 | CFLAGS_asan += --param asan-globals=0 |
| 19 | CFLAGS_romstage += $(CFLAGS_asan) |
Harshit Sharma | 2bcaba0 | 2020-06-09 20:25:16 -0700 | [diff] [blame] | 20 | # Allow memory access without __asan_load and __asan_store checks. |
Harshit Sharma | a6ebe08 | 2020-07-20 00:21:05 -0700 | [diff] [blame] | 21 | $(obj)/romstage/lib/asan.o: CFLAGS_asan = |
| 22 | endif |
| 23 | |
| 24 | ifeq ($(CONFIG_ASAN_IN_RAMSTAGE),y) |
| 25 | ramstage-y += asan.c |
| 26 | CFLAGS_asan += --param asan-globals=1 |
| 27 | CFLAGS_ramstage += $(CFLAGS_asan) |
Harshit Sharma | 2bcaba0 | 2020-06-09 20:25:16 -0700 | [diff] [blame] | 28 | $(obj)/ramstage/lib/asan.o: CFLAGS_asan = |
| 29 | endif |
| 30 | |
Raul E Rangel | ba6eca3 | 2021-11-01 13:40:14 -0600 | [diff] [blame] | 31 | all-y += list.c |
| 32 | |
Julius Werner | 99f4683 | 2018-05-16 14:14:04 -0700 | [diff] [blame] | 33 | decompressor-y += decompressor.c |
| 34 | $(call src-to-obj,decompressor,$(dir)/decompressor.c): $(objcbfs)/bootblock.lz4 |
| 35 | $(call src-to-obj,decompressor,$(dir)/decompressor.c): CCACHE_EXTRAFILES=$(objcbfs)/bootblock.lz4 |
| 36 | # Must reset CCACHE_EXTRAFILES or make applies it transitively to dependencies. |
| 37 | $(objcbfs)/bootblock.lz4: CCACHE_EXTRAFILES= |
| 38 | |
| 39 | decompressor-y += delay.c |
| 40 | decompressor-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c |
| 41 | decompressor-y += memchr.c |
| 42 | decompressor-y += memcmp.c |
Julius Werner | 6296ca8 | 2021-04-02 16:31:21 -0700 | [diff] [blame] | 43 | decompressor-$(CONFIG_CBFS_VERIFICATION) += metadata_hash.c |
Julius Werner | 99f4683 | 2018-05-16 14:14:04 -0700 | [diff] [blame] | 44 | decompressor-y += prog_ops.c |
| 45 | decompressor-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
| 46 | |
Julius Werner | 86fc11d | 2015-10-09 13:37:58 -0700 | [diff] [blame] | 47 | bootblock-y += bootblock.c |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 48 | bootblock-y += prog_loaders.c |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 49 | bootblock-y += prog_ops.c |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 50 | bootblock-y += cbfs.c |
David Hendricks | 6fab365 | 2014-11-06 15:22:10 -0800 | [diff] [blame] | 51 | bootblock-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c |
Julius Werner | 7a8a4ab | 2015-05-22 16:26:40 -0700 | [diff] [blame] | 52 | bootblock-y += libgcc.c |
Karthikeyan Ramasubramanian | f19e461 | 2022-09-20 18:59:43 -0600 | [diff] [blame] | 53 | ifneq ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),y) |
Julius Werner | fdabf3f | 2020-05-06 17:06:35 -0700 | [diff] [blame] | 54 | bootblock-$(CONFIG_CBFS_VERIFICATION) += metadata_hash.c |
Karthikeyan Ramasubramanian | f19e461 | 2022-09-20 18:59:43 -0600 | [diff] [blame] | 55 | else # ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),y) |
| 56 | verstage-$(CONFIG_CBFS_VERIFICATION) += metadata_hash.c |
| 57 | endif # ($(CONFIG_VBOOT_STARTS_BEFORE_BOOTBLOCK),y) |
Aaron Durbin | e5e3630 | 2014-09-25 10:05:15 -0500 | [diff] [blame] | 58 | bootblock-$(CONFIG_GENERIC_UDELAY) += timer.c |
| 59 | |
Patrick Georgi | 8b17404 | 2015-04-27 18:03:50 +0200 | [diff] [blame] | 60 | bootblock-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
Paul Menzel | 2ea2555 | 2015-10-13 17:30:57 +0200 | [diff] [blame] | 61 | |
Kyösti Mälkki | 8659e40 | 2014-12-21 08:55:47 +0200 | [diff] [blame] | 62 | bootblock-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c |
Patrick Georgi | b0a2d3c2 | 2016-01-19 18:10:55 +0100 | [diff] [blame] | 63 | bootblock-y += delay.c |
Hung-Te Lin | fe18792 | 2013-02-01 01:09:24 +0800 | [diff] [blame] | 64 | bootblock-y += memchr.c |
Hung-Te Lin | fe18792 | 2013-02-01 01:09:24 +0800 | [diff] [blame] | 65 | bootblock-y += memcmp.c |
Aaron Durbin | c6588c5 | 2015-05-15 13:15:34 -0500 | [diff] [blame] | 66 | bootblock-y += boot_device.c |
Aaron Durbin | 0424c95 | 2015-03-28 23:56:22 -0500 | [diff] [blame] | 67 | bootblock-y += fmap.c |
Hung-Te Lin | fe18792 | 2013-02-01 01:09:24 +0800 | [diff] [blame] | 68 | |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 69 | verstage-y += prog_loaders.c |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 70 | verstage-y += prog_ops.c |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 71 | verstage-y += delay.c |
| 72 | verstage-y += cbfs.c |
Aaron Durbin | 17200ad | 2015-05-01 16:48:54 -0500 | [diff] [blame] | 73 | verstage-y += halt.c |
Aaron Durbin | 0424c95 | 2015-03-28 23:56:22 -0500 | [diff] [blame] | 74 | verstage-y += fmap.c |
Julius Werner | 7a8a4ab | 2015-05-22 16:26:40 -0700 | [diff] [blame] | 75 | verstage-y += libgcc.c |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 76 | verstage-y += memcmp.c |
Patrick Georgi | 19d0438 | 2019-06-18 23:28:57 +0200 | [diff] [blame] | 77 | verstage-y += string.c |
Martin Roth | d09b974 | 2020-06-10 14:57:35 -0600 | [diff] [blame] | 78 | |
Patrick Georgi | 8b17404 | 2015-04-27 18:03:50 +0200 | [diff] [blame] | 79 | verstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
Aaron Durbin | c6588c5 | 2015-05-15 13:15:34 -0500 | [diff] [blame] | 80 | verstage-y += boot_device.c |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 81 | verstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c |
Yen Lin | 5bdbd00 | 2015-04-08 16:55:17 -0700 | [diff] [blame] | 82 | |
Vadim Bendebury | 3486d1f | 2014-10-16 11:24:12 -0700 | [diff] [blame] | 83 | verstage-$(CONFIG_GENERIC_UDELAY) += timer.c |
David Hendricks | 6fab365 | 2014-11-06 15:22:10 -0800 | [diff] [blame] | 84 | verstage-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c |
Daisuke Nojiri | bcc1d42 | 2014-06-19 19:16:24 -0700 | [diff] [blame] | 85 | |
Patrick Rudolph | bd4bcab | 2019-06-30 22:12:15 +0200 | [diff] [blame] | 86 | romstage-$(CONFIG_VENDOR_EMULATION) += ramdetect.c |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 87 | romstage-y += prog_loaders.c |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 88 | romstage-y += prog_ops.c |
Gabe Black | 1025f3a | 2011-09-16 02:18:56 -0700 | [diff] [blame] | 89 | romstage-y += memchr.c |
Stefan Reinauer | 24ef134 | 2011-04-14 22:28:00 +0000 | [diff] [blame] | 90 | romstage-y += memcmp.c |
Furquan Shaikh | 133096b | 2014-07-31 09:28:55 -0700 | [diff] [blame] | 91 | $(foreach arch,$(ARCH_SUPPORTED),\ |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 92 | $(eval rmodules_$(arch)-y += memcmp.c) \ |
| 93 | $(eval rmodules_$(arch)-y += rmodule.ld)) |
Furquan Shaikh | 133096b | 2014-07-31 09:28:55 -0700 | [diff] [blame] | 94 | |
Aaron Durbin | 0424c95 | 2015-03-28 23:56:22 -0500 | [diff] [blame] | 95 | romstage-y += fmap.c |
Patrick Georgi | 82d9a31 | 2016-01-21 12:46:10 +0100 | [diff] [blame] | 96 | romstage-y += delay.c |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 97 | romstage-y += cbfs.c |
Edward O'Callaghan | cd31afd | 2014-11-11 12:27:06 +1100 | [diff] [blame] | 98 | romstage-$(CONFIG_COMPRESS_RAMSTAGE) += lzma.c lzmadecode.c |
Julius Werner | 7a8a4ab | 2015-05-22 16:26:40 -0700 | [diff] [blame] | 99 | romstage-y += libgcc.c |
Aaron Durbin | 5fbe12d | 2016-07-17 22:59:47 -0500 | [diff] [blame] | 100 | romstage-y += memrange.c |
David Hendricks | 560c643 | 2014-02-13 13:07:50 -0800 | [diff] [blame] | 101 | romstage-$(CONFIG_PRIMITIVE_MEMTEST) += primitive_memtest.c |
| 102 | ramstage-$(CONFIG_PRIMITIVE_MEMTEST) += primitive_memtest.c |
Kyösti Mälkki | 321bce4 | 2019-03-20 19:53:44 +0200 | [diff] [blame] | 103 | romstage-y += ramtest.c |
David Hendricks | 6fab365 | 2014-11-06 15:22:10 -0800 | [diff] [blame] | 104 | romstage-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c |
Aaron Durbin | cd0bc98 | 2016-11-19 12:36:09 -0600 | [diff] [blame] | 105 | ramstage-y += region_file.c |
| 106 | romstage-y += region_file.c |
Aaron Durbin | afe8aee | 2016-11-29 21:37:42 -0600 | [diff] [blame] | 107 | ramstage-y += romstage_handoff.c |
| 108 | romstage-y += romstage_handoff.c |
Ronald G. Minnich | 3d8e53f | 2018-10-29 09:58:06 -0700 | [diff] [blame] | 109 | romstage-y += selfboot.c |
Julius Werner | 7dcf9d5 | 2015-10-16 13:10:02 -0700 | [diff] [blame] | 110 | romstage-y += stack.c |
Shelley Chen | afaa3d0 | 2020-10-06 15:50:21 -0700 | [diff] [blame] | 111 | romstage-y += rtc.c |
Simon Glass | 2cf99e1 | 2016-06-10 20:58:24 -0600 | [diff] [blame] | 112 | ramstage-y += rtc.c |
Vladimir Serbinenko | 45988da | 2013-03-30 02:02:13 +0100 | [diff] [blame] | 113 | |
Aaron Durbin | c15551a | 2013-03-23 00:00:54 -0500 | [diff] [blame] | 114 | romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
Kyösti Mälkki | a2f6af3 | 2013-09-10 13:50:32 +0300 | [diff] [blame] | 115 | romstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c |
Denis 'GNUtoo' Carikli | 8a0a848 | 2013-06-20 16:24:14 +0200 | [diff] [blame] | 116 | |
Stefan Reinauer | fb89dd0 | 2012-03-30 16:28:20 -0700 | [diff] [blame] | 117 | romstage-y += compute_ip_checksum.c |
Subrata Banik | 3afa467 | 2021-10-27 20:53:49 +0530 | [diff] [blame] | 118 | romstage-y += dimm_info_util.c |
Patrick Georgi | 6d0cba7 | 2014-11-29 11:32:12 +0100 | [diff] [blame] | 119 | ifeq ($(CONFIG_COMPILER_GCC),y) |
Alexandru Gagniuc | 66bbb31 | 2015-10-06 16:35:07 -0700 | [diff] [blame] | 120 | bootblock-$(CONFIG_ARCH_BOOTBLOCK_X86_32) += gcc.c |
Aaron Durbin | 75c51d9 | 2015-09-29 16:31:20 -0500 | [diff] [blame] | 121 | verstage-$(CONFIG_ARCH_VERSTAGE_X86_32) += gcc.c |
Furquan Shaikh | 99ac98f | 2014-04-23 10:18:48 -0700 | [diff] [blame] | 122 | romstage-$(CONFIG_ARCH_ROMSTAGE_X86_32) += gcc.c |
Edward O'Callaghan | 4ba8ba4 | 2014-05-23 01:29:00 +1000 | [diff] [blame] | 123 | ramstage-$(CONFIG_ARCH_RAMSTAGE_X86_32) += gcc.c |
Subrata Banik | 2761847 | 2019-05-30 18:28:59 +0530 | [diff] [blame] | 124 | smm-y += gcc.c |
Edward O'Callaghan | 4ba8ba4 | 2014-05-23 01:29:00 +1000 | [diff] [blame] | 125 | endif |
Stefan Reinauer | 24ef134 | 2011-04-14 22:28:00 +0000 | [diff] [blame] | 126 | |
Aaron Durbin | e5e3630 | 2014-09-25 10:05:15 -0500 | [diff] [blame] | 127 | romstage-$(CONFIG_GENERIC_UDELAY) += timer.c |
| 128 | |
Patrick Rudolph | bd4bcab | 2019-06-30 22:12:15 +0200 | [diff] [blame] | 129 | ramstage-$(CONFIG_VENDOR_EMULATION) += ramdetect.c |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 130 | ramstage-y += prog_loaders.c |
Aaron Durbin | b3847e6 | 2015-03-20 15:55:08 -0500 | [diff] [blame] | 131 | ramstage-y += prog_ops.c |
Stefan Reinauer | 1e75329 | 2012-11-30 12:23:45 -0800 | [diff] [blame] | 132 | ramstage-y += hardwaremain.c |
| 133 | ramstage-y += selfboot.c |
Stefan Reinauer | 3e4e303 | 2013-03-20 14:08:04 -0700 | [diff] [blame] | 134 | ramstage-y += coreboot_table.c |
Aaron Durbin | 4904802 | 2014-02-18 21:55:02 -0600 | [diff] [blame] | 135 | ramstage-y += bootmem.c |
Aaron Durbin | 0424c95 | 2015-03-28 23:56:22 -0500 | [diff] [blame] | 136 | ramstage-y += fmap.c |
Gabe Black | 1025f3a | 2011-09-16 02:18:56 -0700 | [diff] [blame] | 137 | ramstage-y += memchr.c |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 138 | ramstage-y += memcmp.c |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 139 | ramstage-y += malloc.c |
Raul E Rangel | 21db6cc | 2018-03-29 10:18:14 -0600 | [diff] [blame] | 140 | ramstage-y += dimm_info_util.c |
Patrick Georgi | 8463dd9 | 2010-09-30 16:55:02 +0000 | [diff] [blame] | 141 | ramstage-y += delay.c |
| 142 | ramstage-y += fallback_boot.c |
| 143 | ramstage-y += compute_ip_checksum.c |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 144 | ramstage-y += cbfs.c |
Edward O'Callaghan | cd31afd | 2014-11-11 12:27:06 +1100 | [diff] [blame] | 145 | ramstage-y += lzma.c lzmadecode.c |
Ronald G. Minnich | 9764d4c | 2012-06-12 16:29:32 -0700 | [diff] [blame] | 146 | ramstage-y += stack.c |
Duncan Laurie | b955284 | 2016-05-09 10:58:03 -0700 | [diff] [blame] | 147 | ramstage-y += hexstrtobin.c |
Felix Durairaj | 7f76165 | 2015-11-20 15:51:35 -0800 | [diff] [blame] | 148 | ramstage-y += wrdd.c |
Vadim Bendebury | 3e31600 | 2011-09-30 12:02:18 -0700 | [diff] [blame] | 149 | ramstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c |
Kyösti Mälkki | 4949a3d | 2021-01-09 20:38:43 +0200 | [diff] [blame] | 150 | ramstage-$(CONFIG_BMP_LOGO) += bmp_logo.c |
Johanna Schander | db7a3ae | 2019-07-24 10:14:26 +0200 | [diff] [blame] | 151 | ramstage-$(CONFIG_BOOTSPLASH) += bootsplash.c |
Stefan Reinauer | 24ef134 | 2011-04-14 22:28:00 +0000 | [diff] [blame] | 152 | ramstage-$(CONFIG_BOOTSPLASH) += jpeg.c |
Vadim Bendebury | 6f72d69 | 2011-09-21 16:12:39 -0700 | [diff] [blame] | 153 | ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
Stefan Reinauer | d37ab45 | 2012-12-18 16:23:28 -0800 | [diff] [blame] | 154 | ramstage-$(CONFIG_COVERAGE) += libgcov.c |
xuxinxiong | cb3745c | 2021-10-26 20:16:21 +0800 | [diff] [blame] | 155 | ramstage-y += dp_aux.c |
Arthur Heymans | a459a8a | 2017-04-30 08:26:27 +0200 | [diff] [blame] | 156 | ramstage-y += edid.c |
Nico Huber | 3db7653 | 2017-05-18 18:07:34 +0200 | [diff] [blame] | 157 | ramstage-y += edid_fill_fb.c |
Aaron Durbin | a05a852 | 2013-03-22 20:44:46 -0500 | [diff] [blame] | 158 | ramstage-y += memrange.c |
David Hendricks | 3b11de8 | 2014-11-05 14:05:56 -0800 | [diff] [blame] | 159 | ramstage-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c |
Aaron Durbin | e5e3630 | 2014-09-25 10:05:15 -0500 | [diff] [blame] | 160 | ramstage-$(CONFIG_GENERIC_UDELAY) += timer.c |
Vadim Bendebury | 243c614 | 2015-03-27 16:08:04 -0700 | [diff] [blame] | 161 | ramstage-y += b64_decode.c |
Aaron Durbin | 9420a52 | 2015-11-17 16:31:00 -0600 | [diff] [blame] | 162 | ramstage-$(CONFIG_ACPI_NHLT) += nhlt.c |
Patrick Rudolph | 666c172 | 2018-04-03 09:57:33 +0200 | [diff] [blame] | 163 | ramstage-$(CONFIG_FLATTENED_DEVICE_TREE) += device_tree.c |
Patrick Rudolph | a892cde | 2018-04-19 14:39:07 +0200 | [diff] [blame] | 164 | ramstage-$(CONFIG_PAYLOAD_FIT_SUPPORT) += fit.c |
| 165 | ramstage-$(CONFIG_PAYLOAD_FIT_SUPPORT) += fit_payload.c |
Stefan Reinauer | 16ce01b | 2011-01-28 08:05:54 +0000 | [diff] [blame] | 166 | |
Raul E Rangel | ca0606e | 2021-07-21 14:34:00 -0600 | [diff] [blame] | 167 | romstage-$(CONFIG_TIMER_QUEUE) += timer_queue.c |
| 168 | ramstage-$(CONFIG_TIMER_QUEUE) += timer_queue.c |
| 169 | |
| 170 | romstage-$(CONFIG_COOP_MULTITASKING) += thread.c |
| 171 | ramstage-$(CONFIG_COOP_MULTITASKING) += thread.c |
| 172 | |
Aaron Durbin | 0dff57d | 2015-03-05 21:18:33 -0600 | [diff] [blame] | 173 | romstage-y += cbmem_common.c |
| 174 | romstage-y += imd_cbmem.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 175 | romstage-y += imd.c |
Aaron Durbin | 0dff57d | 2015-03-05 21:18:33 -0600 | [diff] [blame] | 176 | |
| 177 | ramstage-y += cbmem_common.c |
| 178 | ramstage-y += imd_cbmem.c |
Aaron Durbin | 20686d8 | 2015-03-05 14:11:27 -0600 | [diff] [blame] | 179 | ramstage-y += imd.c |
| 180 | |
Patrick Rudolph | bd4bcab | 2019-06-30 22:12:15 +0200 | [diff] [blame] | 181 | postcar-$(CONFIG_VENDOR_EMULATION) += ramdetect.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 182 | postcar-y += cbmem_common.c |
Aaron Durbin | 1e9a914 | 2016-09-16 16:23:21 -0500 | [diff] [blame] | 183 | postcar-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 184 | postcar-y += imd_cbmem.c |
| 185 | postcar-y += imd.c |
Aaron Durbin | afe8aee | 2016-11-29 21:37:42 -0600 | [diff] [blame] | 186 | postcar-y += romstage_handoff.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 187 | |
Alexandru Gagniuc | e223e89 | 2015-10-14 09:58:36 -0700 | [diff] [blame] | 188 | bootblock-y += hexdump.c |
Frans Hendriks | d622507 | 2019-05-21 11:04:50 +0200 | [diff] [blame] | 189 | postcar-y += hexdump.c |
Stefan Reinauer | 2f38b07 | 2013-07-18 16:24:08 -0700 | [diff] [blame] | 190 | ramstage-y += hexdump.c |
| 191 | romstage-y += hexdump.c |
Duncan Laurie | 7fbdad8 | 2016-09-07 10:56:25 -0700 | [diff] [blame] | 192 | verstage-y += hexdump.c |
John E. Kabat Jr | d45011c | 2017-09-29 11:23:35 -0600 | [diff] [blame] | 193 | smm-y += hexdump.c |
Stefan Reinauer | 2f38b07 | 2013-07-18 16:24:08 -0700 | [diff] [blame] | 194 | |
Duncan Laurie | 36e6c6f | 2020-05-09 19:20:10 -0700 | [diff] [blame] | 195 | bootblock-$(CONFIG_FW_CONFIG) += fw_config.c |
| 196 | verstage-$(CONFIG_FW_CONFIG) += fw_config.c |
| 197 | romstage-$(CONFIG_FW_CONFIG) += fw_config.c |
| 198 | ramstage-$(CONFIG_FW_CONFIG) += fw_config.c |
| 199 | |
Furquan Shaikh | 5cc41f2 | 2020-05-11 12:11:27 -0700 | [diff] [blame] | 200 | bootblock-$(CONFIG_ESPI_DEBUG) += espi_debug.c |
| 201 | verstage-$(CONFIG_ESPI_DEBUG) += espi_debug.c |
| 202 | romstage-$(CONFIG_ESPI_DEBUG) += espi_debug.c |
| 203 | ramstage-$(CONFIG_ESPI_DEBUG) += espi_debug.c |
| 204 | |
Lee Leahy | 7a29cdc | 2016-06-05 18:49:55 -0700 | [diff] [blame] | 205 | bootblock-$(CONFIG_REG_SCRIPT) += reg_script.c |
Aaron Durbin | 75c51d9 | 2015-09-29 16:31:20 -0500 | [diff] [blame] | 206 | verstage-$(CONFIG_REG_SCRIPT) += reg_script.c |
Isaac Christensen | 0b4e8df | 2014-10-01 11:50:20 -0600 | [diff] [blame] | 207 | romstage-$(CONFIG_REG_SCRIPT) += reg_script.c |
Duncan Laurie | 7274800 | 2013-10-31 08:26:23 -0700 | [diff] [blame] | 208 | ramstage-$(CONFIG_REG_SCRIPT) += reg_script.c |
| 209 | |
Kyösti Mälkki | 0a4457f | 2019-08-01 20:29:14 +0300 | [diff] [blame] | 210 | ramstage-$(CONFIG_TSEG_STAGE_CACHE) += ext_stage_cache.c |
| 211 | romstage-$(CONFIG_TSEG_STAGE_CACHE) += ext_stage_cache.c |
| 212 | postcar-$(CONFIG_TSEG_STAGE_CACHE) += ext_stage_cache.c |
Aaron Durbin | bd74a4b | 2015-03-06 23:17:33 -0600 | [diff] [blame] | 213 | |
Kyösti Mälkki | 0a4457f | 2019-08-01 20:29:14 +0300 | [diff] [blame] | 214 | ramstage-$(CONFIG_CBMEM_STAGE_CACHE) += cbmem_stage_cache.c |
| 215 | romstage-$(CONFIG_CBMEM_STAGE_CACHE) += cbmem_stage_cache.c |
| 216 | postcar-$(CONFIG_CBMEM_STAGE_CACHE) += cbmem_stage_cache.c |
Aaron Durbin | 127525c | 2015-03-26 12:29:12 -0500 | [diff] [blame] | 217 | |
Aaron Durbin | c6588c5 | 2015-05-15 13:15:34 -0500 | [diff] [blame] | 218 | romstage-y += boot_device.c |
| 219 | ramstage-y += boot_device.c |
Aaron Durbin | 75e2974 | 2013-10-10 20:37:04 -0500 | [diff] [blame] | 220 | |
Aaron Durbin | c6588c5 | 2015-05-15 13:15:34 -0500 | [diff] [blame] | 221 | smm-y += boot_device.c |
Furquan Shaikh | 591be2d | 2018-03-01 15:20:20 -0800 | [diff] [blame] | 222 | smm-y += delay.c |
Aaron Durbin | 0424c95 | 2015-03-28 23:56:22 -0500 | [diff] [blame] | 223 | smm-y += fmap.c |
Aaron Durbin | 899d13d | 2015-05-15 23:39:23 -0500 | [diff] [blame] | 224 | smm-y += cbfs.c memcmp.c |
Aaron Durbin | 0660d1f | 2018-01-24 17:16:30 -0700 | [diff] [blame] | 225 | smm-$(CONFIG_GENERIC_UDELAY) += timer.c |
Raul E Rangel | c516098 | 2022-02-24 16:02:49 -0700 | [diff] [blame] | 226 | ifeq ($(CONFIG_DEBUG_SMI),y) |
| 227 | smm-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c |
| 228 | endif |
Stefan Reinauer | e9f3258 | 2010-03-29 13:04:13 +0000 | [diff] [blame] | 229 | |
Kyösti Mälkki | c36af7b | 2014-11-18 12:41:16 +0200 | [diff] [blame] | 230 | bootblock-y += version.c |
| 231 | romstage-y += version.c |
| 232 | ramstage-y += version.c |
| 233 | smm-y += version.c |
Aaron Durbin | fd6fb26 | 2015-05-13 13:37:43 -0500 | [diff] [blame] | 234 | verstage-y += version.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 235 | postcar-y += version.c |
Kyösti Mälkki | c36af7b | 2014-11-18 12:41:16 +0200 | [diff] [blame] | 236 | |
Nico Huber | 81b09f4 | 2016-01-23 00:50:00 +0100 | [diff] [blame] | 237 | $(call src-to-obj,bootblock,$(dir)/version.c) : $(obj)/build.h |
| 238 | $(call src-to-obj,romstage,$(dir)/version.c) : $(obj)/build.h |
| 239 | $(call src-to-obj,ramstage,$(dir)/version.c) : $(obj)/build.h |
| 240 | $(call src-to-obj,smm,$(dir)/version.c) : $(obj)/build.h |
| 241 | $(call src-to-obj,verstage,$(dir)/version.c) : $(obj)/build.h |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 242 | $(call src-to-obj,postcar,$(dir)/version.c) : $(obj)/build.h |
Stefan Reinauer | ba9dae2 | 2011-07-29 15:34:14 -0700 | [diff] [blame] | 243 | |
Aaron Durbin | bf1e481 | 2016-05-10 15:12:08 -0500 | [diff] [blame] | 244 | $(call src-to-obj,bootblock,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 245 | $(call src-to-obj,romstage,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 246 | $(call src-to-obj,ramstage,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 247 | $(call src-to-obj,smm,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 248 | $(call src-to-obj,verstage,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 249 | $(call src-to-obj,postcar,$(dir)/fmap.c) : $(obj)/fmap_config.h |
| 250 | |
Subrata Banik | 50b9258 | 2016-07-21 23:47:38 +0530 | [diff] [blame] | 251 | bootblock-y += bootmode.c |
Kyösti Mälkki | 5687fc9 | 2013-11-28 18:11:49 +0200 | [diff] [blame] | 252 | romstage-y += bootmode.c |
| 253 | ramstage-y += bootmode.c |
Aaron Durbin | 7bc39a0 | 2016-01-25 16:58:43 -0600 | [diff] [blame] | 254 | verstage-y += bootmode.c |
Kyösti Mälkki | 5687fc9 | 2013-11-28 18:11:49 +0200 | [diff] [blame] | 255 | |
Julius Werner | 99f4683 | 2018-05-16 14:14:04 -0700 | [diff] [blame] | 256 | decompressor-y += halt.c |
Patrick Georgi | 1b2f2a0 | 2014-11-28 22:00:22 +0100 | [diff] [blame] | 257 | bootblock-y += halt.c |
| 258 | romstage-y += halt.c |
| 259 | ramstage-y += halt.c |
| 260 | smm-y += halt.c |
| 261 | |
Julius Werner | 99f4683 | 2018-05-16 14:14:04 -0700 | [diff] [blame] | 262 | decompressor-y += reset.c |
Julius Werner | 01f9aa5 | 2017-05-18 16:03:26 -0700 | [diff] [blame] | 263 | bootblock-y += reset.c |
| 264 | verstage-y += reset.c |
| 265 | romstage-y += reset.c |
| 266 | postcar-y += reset.c |
| 267 | ramstage-y += reset.c |
| 268 | smm-y += reset.c |
| 269 | |
Julius Werner | a66c9b8 | 2019-05-20 14:53:47 -0700 | [diff] [blame] | 270 | decompressor-y += string.c |
| 271 | bootblock-y += string.c |
| 272 | verstage-y += string.c |
| 273 | romstage-y += string.c |
| 274 | postcar-y += string.c |
| 275 | ramstage-y += string.c |
| 276 | smm-y += string.c |
| 277 | |
Xiang Wang | 4e39c82 | 2019-11-05 12:00:39 +0800 | [diff] [blame] | 278 | decompressor-y += crc_byte.c |
| 279 | bootblock-y += crc_byte.c |
| 280 | verstage-y += crc_byte.c |
| 281 | romstage-y += crc_byte.c |
| 282 | postcar-y += crc_byte.c |
| 283 | ramstage-y += crc_byte.c |
| 284 | smm-y += crc_byte.c |
| 285 | |
Fred Reitberger | 2a099f1 | 2022-09-01 14:58:44 -0400 | [diff] [blame] | 286 | romstage-y += xxhash.c |
| 287 | ramstage-y += xxhash.c |
| 288 | |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 289 | postcar-y += bootmode.c |
| 290 | postcar-y += boot_device.c |
| 291 | postcar-y += cbfs.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 292 | postcar-y += delay.c |
| 293 | postcar-y += fmap.c |
| 294 | postcar-y += gcc.c |
| 295 | postcar-y += halt.c |
| 296 | postcar-y += libgcc.c |
| 297 | postcar-$(CONFIG_COMPRESS_RAMSTAGE) += lzma.c lzmadecode.c |
| 298 | postcar-y += memchr.c |
| 299 | postcar-y += memcmp.c |
| 300 | postcar-y += prog_loaders.c |
| 301 | postcar-y += prog_ops.c |
| 302 | postcar-y += rmodule.c |
| 303 | postcar-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c |
Aaron Durbin | 0660d1f | 2018-01-24 17:16:30 -0700 | [diff] [blame] | 304 | postcar-$(CONFIG_GENERIC_UDELAY) += timer.c |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 305 | |
Aaron Durbin | eb907b3 | 2016-01-21 00:08:17 -0600 | [diff] [blame] | 306 | # Use program.ld for all the platforms which use C fo the bootblock. |
Arthur Heymans | c05b1a6 | 2019-11-22 21:01:30 +0100 | [diff] [blame] | 307 | bootblock-y += program.ld |
Aaron Durbin | 4de29d4 | 2015-09-03 22:49:36 -0500 | [diff] [blame] | 308 | |
Julius Werner | 99f4683 | 2018-05-16 14:14:04 -0700 | [diff] [blame] | 309 | decompressor-y += program.ld |
Aaron Durbin | 7f8afe0 | 2016-03-18 12:21:23 -0500 | [diff] [blame] | 310 | postcar-y += program.ld |
Aaron Durbin | 14714e1 | 2015-09-04 12:06:05 -0500 | [diff] [blame] | 311 | romstage-y += program.ld |
Aaron Durbin | 4de29d4 | 2015-09-03 22:49:36 -0500 | [diff] [blame] | 312 | ramstage-y += program.ld |
Aaron Durbin | e5bad5c | 2015-09-05 10:27:12 -0500 | [diff] [blame] | 313 | verstage-y += program.ld |
Julius Werner | ec5e5e0 | 2014-08-20 15:29:56 -0700 | [diff] [blame] | 314 | |
Aaron Durbin | ad93552 | 2012-12-24 14:28:37 -0600 | [diff] [blame] | 315 | ifeq ($(CONFIG_RELOCATABLE_MODULES),y) |
| 316 | ramstage-y += rmodule.c |
Subrata Banik | 2761847 | 2019-05-30 18:28:59 +0530 | [diff] [blame] | 317 | romstage-y += rmodule.c |
Aaron Durbin | ad93552 | 2012-12-24 14:28:37 -0600 | [diff] [blame] | 318 | |
Aaron Durbin | d4dd44c | 2015-09-06 10:15:17 -0500 | [diff] [blame] | 319 | RMODULE_LDFLAGS := -z defs -Bsymbolic |
Aaron Durbin | ad93552 | 2012-12-24 14:28:37 -0600 | [diff] [blame] | 320 | |
| 321 | # rmodule_link_rules is a function that should be called with: |
| 322 | # (1) the object name to link |
| 323 | # (2) the dependencies |
| 324 | # (3) heap size of the relocatable module |
Furquan Shaikh | 133096b | 2014-07-31 09:28:55 -0700 | [diff] [blame] | 325 | # (4) arch for which the rmodules are to be linked |
Aaron Durbin | 3eb8eb7 | 2014-03-10 16:13:58 -0500 | [diff] [blame] | 326 | # It will create the necessary Make rules to create a rmodule. The resulting |
| 327 | # rmdoule is named $(1).rmod |
Aaron Durbin | ad93552 | 2012-12-24 14:28:37 -0600 | [diff] [blame] | 328 | define rmodule_link |
Nico Huber | 81b09f4 | 2016-01-23 00:50:00 +0100 | [diff] [blame] | 329 | $(strip $(1)): $(strip $(2)) $$(COMPILER_RT_rmodules_$(4)) $(call src-to-obj,rmodules_$(4),src/lib/rmodule.ld) | $$(RMODTOOL) |
Raul E Rangel | 56dbb4a | 2022-02-25 17:06:27 -0700 | [diff] [blame] | 330 | $$(LD_rmodules_$(4)) $$(LDFLAGS_rmodules_$(4)) $(RMODULE_LDFLAGS) $($(1)-ldflags) -T $(call src-to-obj,rmodules_$(4),src/lib/rmodule.ld) --defsym=__heap_size=$(strip $(3)) -o $$@ --whole-archive --start-group $(filter-out %.ld,$(2)) --end-group |
Furquan Shaikh | 133096b | 2014-07-31 09:28:55 -0700 | [diff] [blame] | 331 | $$(NM_rmodules_$(4)) -n $$@ > $$(basename $$@).map |
Aaron Durbin | ad93552 | 2012-12-24 14:28:37 -0600 | [diff] [blame] | 332 | endef |
| 333 | |
| 334 | endif |
Aaron Durbin | 83bc0db | 2015-09-06 10:45:18 -0500 | [diff] [blame] | 335 | |
| 336 | $(objcbfs)/%.debug.rmod: $(objcbfs)/%.debug | $(RMODTOOL) |
| 337 | $(RMODTOOL) -i $< -o $@ |
| 338 | |
| 339 | $(obj)/%.elf.rmod: $(obj)/%.elf | $(RMODTOOL) |
| 340 | $(RMODTOOL) -i $< -o $@ |
Nico Huber | c83239e | 2016-10-05 17:46:49 +0200 | [diff] [blame] | 341 | |
Nico Huber | b567977 | 2019-01-01 22:06:01 +0100 | [diff] [blame] | 342 | ramstage-$(CONFIG_RAMSTAGE_ADA) += cb.ads |
| 343 | |
Nico Huber | c83239e | 2016-10-05 17:46:49 +0200 | [diff] [blame] | 344 | ifeq ($(CONFIG_RAMSTAGE_LIBHWBASE),y) |
| 345 | |
Nico Huber | 625160f | 2017-07-17 23:42:33 +0200 | [diff] [blame] | 346 | to-ada-hex = $(eval $(1) := 16\\\#$(patsubst 0x%,%,$($(1)))\\\#) |
| 347 | |
| 348 | $(call to-ada-hex,CONFIG_HWBASE_DEFAULT_MMCONF) |
| 349 | |
Nico Huber | c83239e | 2016-10-05 17:46:49 +0200 | [diff] [blame] | 350 | $(call add-special-class,hw) |
| 351 | hw-handler = $(eval ramstage-srcs += $$(addprefix $(1),$(2))) |
Nico Huber | 625160f | 2017-07-17 23:42:33 +0200 | [diff] [blame] | 352 | |
| 353 | $(call add-special-class,hw-gen) |
| 354 | hw-gen-handler = \ |
| 355 | $(eval additional-dirs += $(dir $(2))) \ |
| 356 | $(eval ramstage-srcs += $(2)) \ |
| 357 | $(eval ramstage-ads-deps += $(2)) \ |
| 358 | $(eval ramstage-adb-deps += $(2)) \ |
| 359 | $(eval $(2): $(obj)/config.h) |
| 360 | |
Nico Huber | c83239e | 2016-10-05 17:46:49 +0200 | [diff] [blame] | 361 | subdirs-y += ../../3rdparty/libhwbase |
| 362 | |
| 363 | ramstage-$(CONFIG_HAVE_MONOTONIC_TIMER) += hw-time-timer.adb |
| 364 | |
| 365 | endif # CONFIG_RAMSTAGE_LIBHWBASE |
Naresh G Solanki | 335781a | 2016-10-26 19:43:14 +0530 | [diff] [blame] | 366 | |
Patrick Georgi | 0e3c59e | 2017-01-28 15:59:25 +0100 | [diff] [blame] | 367 | romstage-y += spd_bin.c |
Naresh G Solanki | 335781a | 2016-10-26 19:43:14 +0530 | [diff] [blame] | 368 | |
Michael Niewöhner | 87cc889 | 2020-09-07 14:26:09 +0200 | [diff] [blame] | 369 | ifeq ($(CONFIG_HAVE_SPD_IN_CBFS),y) |
Naresh G Solanki | 335781a | 2016-10-26 19:43:14 +0530 | [diff] [blame] | 370 | LIB_SPD_BIN = $(obj)/spd.bin |
| 371 | |
| 372 | LIB_SPD_DEPS = $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex) |
| 373 | |
| 374 | # Include spd ROM data |
| 375 | $(LIB_SPD_BIN): $(LIB_SPD_DEPS) |
Michael Niewöhner | eb66233 | 2020-09-06 17:06:40 +0200 | [diff] [blame] | 376 | test -n "$(SPD_SOURCES)" || \ |
Paul Fagerburg | 96fd529 | 2020-09-25 08:39:15 -0600 | [diff] [blame] | 377 | (echo "HAVE_SPD_IN_CBFS is set but SPD_SOURCES is empty" && exit 1) |
Michael Niewöhner | eb66233 | 2020-09-06 17:06:40 +0200 | [diff] [blame] | 378 | test -n "$(LIB_SPD_DEPS)" || \ |
| 379 | (echo "SPD_SOURCES is set but no SPD file was found" && exit 1) |
Reka Norman | bdc49b2 | 2021-09-21 14:29:24 +1000 | [diff] [blame] | 380 | if [ "$(SPD_SOURCES)" = "placeholder" ]; then \ |
| 381 | printf '\0'; \ |
| 382 | else \ |
| 383 | for f in $(LIB_SPD_DEPS); do \ |
| 384 | if [ ! -f $$f ]; then \ |
| 385 | echo "File not found: $$f" >&2; \ |
| 386 | exit 1; \ |
| 387 | fi; \ |
| 388 | for c in $$(cat $$f | grep --binary-files=text -v ^#); \ |
| 389 | do printf $$(printf '\\%o' 0x$$c); \ |
| 390 | done; \ |
Reka Norman | 16612c4 | 2021-09-16 14:11:34 +1000 | [diff] [blame] | 391 | done; \ |
Reka Norman | bdc49b2 | 2021-09-21 14:29:24 +1000 | [diff] [blame] | 392 | fi > $@ |
Naresh G Solanki | 335781a | 2016-10-26 19:43:14 +0530 | [diff] [blame] | 393 | |
Michael Niewöhner | c521d15 | 2020-09-07 21:39:43 +0200 | [diff] [blame] | 394 | cbfs-files-y += spd.bin |
Naresh G Solanki | 335781a | 2016-10-26 19:43:14 +0530 | [diff] [blame] | 395 | spd.bin-file := $(LIB_SPD_BIN) |
| 396 | spd.bin-type := spd |
Martin Roth | 8e4bb31 | 2017-01-29 18:11:36 -0700 | [diff] [blame] | 397 | endif |
Nico Huber | 2e6a0f8 | 2019-10-24 15:01:33 +0200 | [diff] [blame] | 398 | |
| 399 | ramstage-y += uuid.c |
Jamie Chen | 92ba06f | 2020-04-27 15:49:09 +0800 | [diff] [blame] | 400 | |
Matt DeVillier | 8ead1dc | 2020-11-30 14:30:15 -0600 | [diff] [blame] | 401 | romstage-$(CONFIG_SPD_CACHE_IN_FMAP) += spd_cache.c |
Arthur Heymans | 75226bb | 2022-03-30 20:16:36 +0200 | [diff] [blame] | 402 | |
| 403 | cbfs-files-y += cbfs_master_header |
| 404 | cbfs_master_header-file := cbfs_master_header.c:struct |
| 405 | cbfs_master_header-type := "cbfs header" |
| 406 | cbfs_master_header-position := 0 |
| 407 | |
| 408 | ifeq ($(CONFIG_ARCH_X86),y) |
Reka Norman | 46af7f7 | 2022-05-18 03:09:40 +1000 | [diff] [blame] | 409 | $(call src-to-obj,bootblock,$(dir)/master_header_pointer.c): $(obj)/fmap_config.h |
Arthur Heymans | 75226bb | 2022-03-30 20:16:36 +0200 | [diff] [blame] | 410 | bootblock-y += master_header_pointer.c |
Arthur Heymans | 2efd831 | 2022-05-18 21:37:58 +0200 | [diff] [blame] | 411 | endif |
| 412 | |
| 413 | NEED_CBFS_POINTER= |
| 414 | |
| 415 | ifneq ($(CONFIG_ARCH_X86),y) |
| 416 | NEED_CBFS_POINTER=y |
| 417 | endif |
| 418 | ifneq ($(CONFIG_BOOTBLOCK_IN_CBFS),y) |
| 419 | NEED_CBFS_POINTER=y |
| 420 | endif |
| 421 | |
| 422 | cbfs-files-$(NEED_CBFS_POINTER) += header_pointer |
Arthur Heymans | 75226bb | 2022-03-30 20:16:36 +0200 | [diff] [blame] | 423 | header_pointer-file := master_header_pointer.c:struct |
| 424 | header_pointer-position := -4 |
| 425 | header_pointer-type := "cbfs header" |