summaryrefslogtreecommitdiff
path: root/src/lib/rmodule.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-04-06 17:18:18 -0500
committerAaron Durbin <adurbin@google.com>2015-04-07 23:03:45 +0200
commit7ca6522412fe75bab69f18107d7efa2e05381d38 (patch)
treec5400ec591941dc3c7b5f6dcc8537ca11d45bf50 /src/lib/rmodule.c
parentb0d8f5e9cdab5c53cb8438175517ad171e9e5ddb (diff)
downloadcoreboot-7ca6522412fe75bab69f18107d7efa2e05381d38.tar.xz
rmodule: remove cbmem_entry usage
As cbmem_entry has been removed from ramstage loading there's no 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> Reviewed-on: http://review.coreboot.org/9328 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/lib/rmodule.c')
-rw-r--r--src/lib/rmodule.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/rmodule.c b/src/lib/rmodule.c
index d7dc969805..799d8f00ed 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, &region_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;