diff options
author | Aaron Durbin <adurbin@chromium.org> | 2014-02-25 20:36:56 -0600 |
---|---|---|
committer | Aaron Durbin <adurbin@google.com> | 2014-03-07 15:30:27 +0100 |
commit | c34713d33e088095acb6dd61527a26117d9c368e (patch) | |
tree | 020c5387801605f753fca25cc6b2c09ff5763e30 /src/lib/loaders | |
parent | 7274800ea37edf41cb50e899d03baa02bdeecade (diff) |
x86: add MIRROR_PAYLOAD_TO_RAM_BEFORE_LOADING option
Boot speeds can be sped up by mirroring the payload into
main memory before doing the actual loading. Systems that
would benefit from this are typically Intel ones whose SPI
are memory mapped. Without the SPI being cached all accesses
to the payload in SPI while being loaded result in uncacheable
accesses. Instead take advantage of the on-board SPI controller
which has an internal cache and prefetcher by copying 64-byte
cachelines using 32-bit word copies.
Change-Id: I4aac856b1b5130fa2d68a6c45a96cfeead472a52
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/5305
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/lib/loaders')
-rw-r--r-- | src/lib/loaders/load_and_run_payload.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/loaders/load_and_run_payload.c b/src/lib/loaders/load_and_run_payload.c index 7e1383e89b..2204090843 100644 --- a/src/lib/loaders/load_and_run_payload.c +++ b/src/lib/loaders/load_and_run_payload.c @@ -39,6 +39,11 @@ static struct payload global_payload = { .name = CONFIG_CBFS_PREFIX "/payload", }; +void __attribute__((weak)) mirror_payload(struct payload *payload) +{ + return; +} + struct payload *payload_load(void) { int i; @@ -62,6 +67,8 @@ struct payload *payload_load(void) if (i == ARRAY_SIZE(payload_ops)) return NULL; + mirror_payload(payload); + entry = selfload(payload); if (entry == NULL) |