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/cbfs_payload_loader.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/cbfs_payload_loader.c')
-rw-r--r-- | src/lib/loaders/cbfs_payload_loader.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/loaders/cbfs_payload_loader.c b/src/lib/loaders/cbfs_payload_loader.c index 609d1232e1..3928613e73 100644 --- a/src/lib/loaders/cbfs_payload_loader.c +++ b/src/lib/loaders/cbfs_payload_loader.c @@ -20,24 +20,24 @@ #include <cbfs.h> #include <program_loading.h> -static int cbfs_locate_payload(struct payload *payload) +static int cbfs_locate_payload(struct prog *payload) { void *buffer; size_t size; const int type = CBFS_TYPE_PAYLOAD; - buffer = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, payload->prog.name, + buffer = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, payload->name, type, &size); if (buffer == NULL) return -1; - prog_set_area(&payload->prog, buffer, size); + prog_set_area(payload, buffer, size); return 0; } -const struct payload_loader_ops cbfs_payload_loader = { +const struct prog_loader_ops cbfs_payload_loader = { .name = "CBFS", - .locate = cbfs_locate_payload, + .prepare = cbfs_locate_payload, }; |