diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-03-20 16:37:12 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@google.com> | 2015-04-03 14:53:11 +0200 |
commit | ce9efe061a23bc3e3d2a4c17cf29692ce6f9eb53 (patch) | |
tree | 4c7715b3d7869bb3282751f536450e653dc83dbe /src/lib/loaders/load_and_run_ramstage.c | |
parent | b3847e64242228166976f425cd42331db7857551 (diff) |
program loading: unify on struct prog
Instead of having different structures for loading
ramstage and payload align to using struct prog.
This also removes arch_payload_run() in favor of
the prog_run() interface.
Change-Id: I31483096094eacc713a7433811cd69cc5621c43e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/8849
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/lib/loaders/load_and_run_ramstage.c')
-rw-r--r-- | src/lib/loaders/load_and_run_ramstage.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/loaders/load_and_run_ramstage.c b/src/lib/loaders/load_and_run_ramstage.c index 9067a28dc6..b3728a17cf 100644 --- a/src/lib/loaders/load_and_run_ramstage.c +++ b/src/lib/loaders/load_and_run_ramstage.c @@ -25,10 +25,10 @@ #include <romstage_handoff.h> #include <timestamp.h> -extern const struct ramstage_loader_ops cbfs_ramstage_loader; -extern const struct ramstage_loader_ops vboot_ramstage_loader; +extern const struct prog_loader_ops cbfs_ramstage_loader; +extern const struct prog_loader_ops vboot_ramstage_loader; -static const struct ramstage_loader_ops *loaders[] = { +static const struct prog_loader_ops *loaders[] = { #if CONFIG_VBOOT_VERIFY_FIRMWARE &vboot_ramstage_loader, #endif @@ -36,12 +36,12 @@ static const struct ramstage_loader_ops *loaders[] = { }; static void -load_ramstage(const struct ramstage_loader_ops *ops, +load_ramstage(const struct prog_loader_ops *ops, struct romstage_handoff *handoff, struct prog *ramstage) { timestamp_add_now(TS_START_COPYRAM); - if (ops->load(ramstage)) + if (ops->prepare(ramstage)) return; cache_loaded_ramstage(handoff, ramstage); @@ -68,7 +68,7 @@ static void run_ramstage_from_resume(struct romstage_handoff *handoff, void run_ramstage(void) { struct romstage_handoff *handoff; - const struct ramstage_loader_ops *ops; + const struct prog_loader_ops *ops; int i; struct prog ramstage = { .name = CONFIG_CBFS_PREFIX "/ramstage", |