summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2013-01-22 13:22:02 -0600
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-03-19 18:47:57 +0100
commit81108b90593e1c8a459c499307404955771c54f3 (patch)
tree77b23a07ede8eaba3510dd87ead29db07d09e977 /src/lib
parent4063ede3fb571110c3e65c321049cc2687cc54fa (diff)
downloadcoreboot-81108b90593e1c8a459c499307404955771c54f3.tar.xz
cbfs: alternative support for cbfs_load_payload()
In certain situations boot speed can be increased by providing an alternative implementation to cbfs_load_payload(). The ALT_CBFS_LOAD_PAYLOAD option allows for the mainboard or chipset to provide its own implementation. Booted baskingridge board with alternative and regular cbfs_load_payload(). Change-Id: I547ac9881a82bacbdb3bbdf38088dfcc22fd0c2c Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/2782 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cbfs.c2
-rw-r--r--src/lib/selfboot.c1
2 files changed, 2 insertions, 1 deletions
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;
}
-