diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/loaders/cbfs_ramstage_loader.c | 6 | ||||
-rw-r--r-- | src/lib/rmodule.c | 10 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/lib/loaders/cbfs_ramstage_loader.c b/src/lib/loaders/cbfs_ramstage_loader.c index e565329616..c4606536ad 100644 --- a/src/lib/loaders/cbfs_ramstage_loader.c +++ b/src/lib/loaders/cbfs_ramstage_loader.c @@ -29,7 +29,7 @@ static int cbfs_load_ramstage(struct prog *ramstage) { struct rmod_stage_load rmod_ram = { .cbmem_id = CBMEM_ID_RAMSTAGE, - .name = ramstage->name, + .prog = ramstage, }; if (rmodule_stage_load_from_cbfs(&rmod_ram)) { @@ -37,10 +37,6 @@ static int cbfs_load_ramstage(struct prog *ramstage) return -1; } - prog_set_area(ramstage, cbmem_entry_start(rmod_ram.cbmem_entry), - cbmem_entry_size(rmod_ram.cbmem_entry)); - prog_set_entry(ramstage, rmod_ram.entry, NULL); - return 0; } diff --git a/src/lib/rmodule.c b/src/lib/rmodule.c index d06409f490..d7dc969805 100644 --- a/src/lib/rmodule.c +++ b/src/lib/rmodule.c @@ -261,7 +261,7 @@ int rmodule_stage_load(struct rmod_stage_load *rsl, struct cbfs_stage *stage) int load_offset; const struct cbmem_entry *cbmem_entry; - if (stage == NULL || rsl->name == NULL) + if (stage == NULL || rsl->prog == NULL || rsl->prog->name == NULL) return -1; rmodule_offset = @@ -276,7 +276,7 @@ int rmodule_stage_load(struct rmod_stage_load *rsl, struct cbfs_stage *stage) stage_region = cbmem_entry_start(cbmem_entry); printk(BIOS_INFO, "Decompressing stage %s @ 0x%p (%d bytes)\n", - rsl->name, &stage_region[rmodule_offset], stage->memlen); + rsl->prog->name, &stage_region[rmodule_offset], stage->memlen); if (!cbfs_decompress(stage->compression, &stage[1], &stage_region[rmodule_offset], stage->len)) @@ -288,8 +288,8 @@ int rmodule_stage_load(struct rmod_stage_load *rsl, struct cbfs_stage *stage) if (rmodule_load(&stage_region[load_offset], &rmod_stage)) return -1; - rsl->cbmem_entry = cbmem_entry; - rsl->entry = rmodule_entry(&rmod_stage); + prog_set_area(rsl->prog, stage_region, cbmem_entry_size(cbmem_entry)); + prog_set_entry(rsl->prog, rmodule_entry(&rmod_stage), NULL); return 0; } @@ -299,7 +299,7 @@ int rmodule_stage_load_from_cbfs(struct rmod_stage_load *rsl) struct cbfs_stage *stage; stage = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, - rsl->name, CBFS_TYPE_STAGE, NULL); + rsl->prog->name, CBFS_TYPE_STAGE, NULL); if (stage == NULL) return -1; |