summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Kconfig9
-rw-r--r--src/lib/cbfs.c2
-rw-r--r--src/lib/selfboot.c1
3 files changed, 11 insertions, 1 deletions
diff --git a/src/Kconfig b/src/Kconfig
index 7206878b28..f6a83e8a85 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -47,6 +47,15 @@ config CBFS_PREFIX
Select the prefix to all files put into the image. It's "fallback"
by default, "normal" is a common alternative.
+config ALT_CBFS_LOAD_PAYLOAD
+ bool "Use alternative cbfs_load_payload() implementation."
+ default n
+ help
+ Either board or southbridge provide an alternative cbfs_load_payload()
+ implementation. This may be used, for example, if accessing the ROM
+ through memory-mapped I/O is slow and a faster alternative can be
+ provided.
+
choice
prompt "Compiler to use"
default COMPILER_GCC
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index bfdab6c2ec..abb95abc3f 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -165,11 +165,13 @@ int cbfs_execute_stage(struct cbfs_media *media, const char *name)
return run_address((void *)(uintptr_t)ntohll(stage->entry));
}
+#if !CONFIG_ALT_CBFS_LOAD_PAYLOAD
void *cbfs_load_payload(struct cbfs_media *media, const char *name)
{
return (struct cbfs_payload *)cbfs_get_file_content(
media, name, CBFS_TYPE_PAYLOAD);
}
+#endif
/* Simple buffer */
diff --git a/src/lib/selfboot.c b/src/lib/selfboot.c
index d64ba4cb92..f32bb814fb 100644
--- a/src/lib/selfboot.c
+++ b/src/lib/selfboot.c
@@ -536,4 +536,3 @@ int selfboot(struct lb_memory *mem, struct cbfs_payload *payload)
out:
return 0;
}
-