coreboot/src
Julius Werner c8127e4ac9 Add and consistently use wrapper macro for romstage static variables
x86 systems run their romstage as execute-in-place from flash, which
prevents them from having writable data segments. In several code pieces
that get linked into both romstage and ramstage, this has been worked
around by using a local variable and having the 'static' storage class
guarded by #ifndef __PRE_RAM__.

However, x86 is the only architecture using execute-in-place (for now),
so it does not make sense to impose the restriction globally. Rather
than fixing the #ifdef at every occurrence, this should really be
wrapped in a way that makes it easier to modify in a single place. The
chromeos/cros_vpd.c file already had a nice approach for a wrapper
macro, but unfortunately restricted it to one file... this patch moves
it to stddef.h and employs it consistently throughout coreboot.

BRANCH=nyan
BUG=None
TEST=Measured boot time on Nyan_Big before and after, confirmed that it
gained 6ms from caching the FMAP in vboot_loader.c.

Change-Id: Ia53b94ab9c6a303b979db7ff20b79e14bc51f9f8
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/203033
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2014-06-09 22:21:10 +00:00
..
arch coreboot arm64: Add support for arm64 into coreboot framework 2014-05-15 23:52:58 +00:00
console Add stage information to coreboot banner 2014-05-14 20:49:21 +00:00
cpu coreboot: Introduce stage-specific architecture for coreboot 2014-05-09 04:41:47 +00:00
device i2c: Add software_i2c driver for I2C debugging and emulation 2014-05-19 20:34:31 +00:00
drivers SPI: Add Eon EN25S64 support. 2014-05-09 22:00:56 +00:00
ec chromeos: Unconditionally clear the EC recovery request 2014-05-07 03:33:49 +00:00
include Add and consistently use wrapper macro for romstage static variables 2014-06-09 22:21:10 +00:00
lib Add and consistently use wrapper macro for romstage static variables 2014-06-09 22:21:10 +00:00
mainboard samus: Enable DDI2 hotplug 2014-06-03 04:25:35 +00:00
northbridge coreboot: Rename coreboot_ram stage to ramstage 2014-05-07 23:30:23 +00:00
soc storm: Put the page table at a correct address 2014-06-05 23:14:42 +00:00
southbridge coreboot: Rename coreboot_ram stage to ramstage 2014-05-07 23:30:23 +00:00
superio pnp: Allow setting of misc register 0xf4 in device tree 2013-12-20 00:37:38 +00:00
vendorcode Add and consistently use wrapper macro for romstage static variables 2014-06-09 22:21:10 +00:00
Kconfig coreboot arm64: Add support for arm64 into coreboot framework 2014-05-15 23:52:58 +00:00