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>
This commit is contained in:
Aaron Durbin
2014-02-25 20:36:56 -06:00
committed by Aaron Durbin
parent 7274800ea3
commit c34713d33e
5 changed files with 91 additions and 0 deletions

View File

@@ -44,6 +44,9 @@ struct payload *payload_load(void);
/* Run the loaded payload. */
void payload_run(const struct payload *payload);
/* Mirror the payload to be loaded. */
void mirror_payload(struct payload *payload);
/* architecture specific function to run payload. */
void arch_payload_run(const struct payload *payload);