summaryrefslogtreecommitdiff
path: root/src/lib/rmodule.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-05-20 12:08:55 -0500
committerPatrick Georgi <pgeorgi@google.com>2015-06-02 14:10:08 +0200
commitac12c66cf91343153ea90a6f33977a13e10b21d0 (patch)
tree2864de25bb12ed2d5c7ec8d691ec753f146c5e57 /src/lib/rmodule.c
parent6a452eff90411176f9f2cad0ca0c665a31c032ee (diff)
downloadcoreboot-ac12c66cf91343153ea90a6f33977a13e10b21d0.tar.xz
assets: abstract away the firmware assets used for booting
As there can be more than one source of firmware assets this patch generalizes the notion of locating a particular asset. struct asset is added along with some helper functions for working on assets as a first class citizen. Change-Id: I2ce575d1e5259aed4c34c3dcfd438abe9db1d7b9 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/10264 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/lib/rmodule.c')
-rw-r--r--src/lib/rmodule.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/rmodule.c b/src/lib/rmodule.c
index 35893d9d96..c17c7a5a2c 100644
--- a/src/lib/rmodule.c
+++ b/src/lib/rmodule.c
@@ -264,10 +264,10 @@ int rmodule_stage_load(struct rmod_stage_load *rsl)
void *rmod_loc;
struct region_device *fh;
- if (rsl->prog == NULL || rsl->prog->name == NULL)
+ if (rsl->prog == NULL || prog_name(rsl->prog) == NULL)
return -1;
- fh = &rsl->prog->rdev;
+ fh = prog_rdev(rsl->prog);
if (rdev_readat(fh, &stage, 0, sizeof(stage)) != sizeof(stage))
return -1;
@@ -284,7 +284,7 @@ int rmodule_stage_load(struct rmod_stage_load *rsl)
rmod_loc = &stage_region[rmodule_offset];
printk(BIOS_INFO, "Decompressing stage %s @ 0x%p (%d bytes)\n",
- rsl->prog->name, rmod_loc, stage.memlen);
+ prog_name(rsl->prog), rmod_loc, stage.memlen);
if (stage.compression == CBFS_COMPRESS_NONE) {
if (rdev_readat(fh, rmod_loc, sizeof(stage), stage.len) !=