coreboot/src
Julius Werner fffee873c8 Makefile: Add build-time overlap check for programs loaded after coreboot
On non-x86 platforms, coreboot uses the memlayout.ld mechanism to
statically allocate the different memory regions it needs and guarantees
at build time that there are no dangerous overlaps between them. At the
end of its (ramstage) execution, however, it usually loads a payload
(and possibly other platform-specific components) that is not integrated
into the coreboot build system and therefore cannot provide the same
overlap guarantees through memlayout.ld. This creates a dangerous memory
hazard where a new component could be loaded over memory areas that are
still in use by the code-loading ramstage and lead to arbitrary memory
corruption bugs.

This patch fills this gap in our build-time correctness guarantees by
adding the necessary checks as a new intermediate Makefile target on
route to assembling the final image. It will parse the memory footprint
information of the payload (and other platform-specific post-ramstage
components) from CBFS and compare it to a list of memory areas known to
be still in use during late ramstage, generating a build failure in case
of a possible hazard.

BUG=chrome-os-partner:48008
TEST=Built Oak while moving critical regions in the way of BL31 or the
payload, observing the desired build-time errors. Built Nyan, Jerry and
Falco without issues for good measure.

Change-Id: I3ebd2c1caa4df959421265e26f9cab2c54909b68
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/13949
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2016-03-09 17:07:14 +01:00
..
acpi acpi/: add missing license header 2016-01-14 22:52:11 +01:00
arch Makefile: Add build-time overlap check for programs loaded after coreboot 2016-03-09 17:07:14 +01:00
commonlib lz4_wrapper: Use __asm__ rather than asm. 2016-03-05 00:56:53 +01:00
console Kconfig: hide useless options on ARM. 2016-03-05 00:56:36 +01:00
cpu x86 chipsets: utilize x86_setup_mtrrs_with_detect() 2016-03-08 23:58:01 +01:00
device Kconfig: hide useless options on ARM. 2016-03-05 00:56:36 +01:00
drivers drivers/intel/fsp2_0: remove struct resource usage 2016-03-09 16:47:40 +01:00
ec Hide EC_GOOGLE_CHROMEEC_SPI_BUS. 2016-03-05 00:57:22 +01:00
include lib/memrange: add function to initialize range_entry 2016-03-09 16:46:16 +01:00
lib lib: Implement framework for retrieving WiFi regulatory domain 2016-03-08 18:41:33 +01:00
mainboard nyan: Fix timestamps and CBFS SPI integration 2016-03-08 22:04:22 +01:00
northbridge northbridge/intel/gm45: Use TSC for ramstage timer per default 2016-03-09 17:04:21 +01:00
soc drivers/intel/fsp2_0: remove struct resource usage 2016-03-09 16:47:40 +01:00
southbridge southbridge/intel/ibexpeak: Use common gpio.c 2016-02-23 00:28:26 +01:00
superio roda/rk9: Remove #include early_serial.c from romstage 2016-03-08 13:41:03 +01:00
vendorcode Chromeos: Modify wifi_regulatory_domain to use "region" key in VPD 2016-03-08 18:41:57 +01:00
Kconfig cbfs: Add LZ4 in-place decompression support for pre-RAM stages 2016-02-22 21:38:37 +01:00