Aaron Durbin (adurbin@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9328
-gerrit
commit 0c09241e47ab5f855e5afc75011a220c4aacd635 Author: Aaron Durbin adurbin@chromium.org Date: Mon Apr 6 17:18:18 2015 -0500
rmodule: remove cbmem_entry usage
As cbmem_entry has been removed from ramstage loading there's not need to keep the intermediate cbmem_entry around. The region containing the rmodule program can just be used directly.
Change-Id: I06fe07f07130b1c7f9e374a00c6793d241364ba8 Signed-off-by: Aaron Durbin adurbin@chromium.org --- src/lib/rmodule.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/lib/rmodule.c b/src/lib/rmodule.c index d7dc969..799d8f0 100644 --- a/src/lib/rmodule.c +++ b/src/lib/rmodule.c @@ -259,7 +259,6 @@ int rmodule_stage_load(struct rmod_stage_load *rsl, struct cbfs_stage *stage) char *stage_region; int rmodule_offset; int load_offset; - const struct cbmem_entry *cbmem_entry;
if (stage == NULL || rsl->prog == NULL || rsl->prog->name == NULL) return -1; @@ -268,13 +267,11 @@ int rmodule_stage_load(struct rmod_stage_load *rsl, struct cbfs_stage *stage) rmodule_calc_region(DYN_CBMEM_ALIGN_SIZE, stage->memlen, ®ion_size, &load_offset);
- cbmem_entry = cbmem_entry_add(rsl->cbmem_id, region_size); + stage_region = cbmem_add(rsl->cbmem_id, region_size);
- if (cbmem_entry == NULL) + if (stage_region == NULL) return -1;
- stage_region = cbmem_entry_start(cbmem_entry); - printk(BIOS_INFO, "Decompressing stage %s @ 0x%p (%d bytes)\n", rsl->prog->name, &stage_region[rmodule_offset], stage->memlen);
@@ -288,7 +285,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;
- prog_set_area(rsl->prog, stage_region, cbmem_entry_size(cbmem_entry)); + prog_set_area(rsl->prog, rmod_stage.location, + rmodule_memory_size(&rmod_stage)); prog_set_entry(rsl->prog, rmodule_entry(&rmod_stage), NULL);
return 0;