diff options
author | Furquan Shaikh <furquan@google.com> | 2016-06-01 01:53:18 -0700 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2016-06-02 17:21:39 +0200 |
commit | d5583a5e61c4dbb870ceddc13fbee49b0d46d52f (patch) | |
tree | 2d1ee65b0f7ac0ea422831faf51e8a2430b30fcc /src/lib | |
parent | ab90f96ba58eefb8526270e66b45b26fbf10b09a (diff) |
cbfs: Use NO_XIP_EARLY_STAGES to decide if stage is XIP
Modern platforms like Apollolake do not use XIP for early stages. In
such cases, cbfs_prog_stage_load should check for NO_XIP_EARLY_STAGES
instead of relying on ARCH_X86 to decide if a stage is XIP.
Change-Id: I1729ce82b5f678ce8c37256090fcf353cc22b1ec
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/15045
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/cbfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 764a6f70d8..aa652c2ee4 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -192,7 +192,7 @@ int cbfs_prog_stage_load(struct prog *pstage) /* Hacky way to not load programs over read only media. The stages * that would hit this path initialize themselves. */ - if (ENV_VERSTAGE && IS_ENABLED(CONFIG_ARCH_X86) && + if (ENV_VERSTAGE && !IS_ENABLED(CONFIG_NO_XIP_EARLY_STAGES) && IS_ENABLED(CONFIG_SPI_FLASH_MEMORY_MAPPED)) { void *mapping = rdev_mmap(fh, foffset, fsize); rdev_munmap(fh, mapping); |