[coreboot-gerrit] Patch set updated for coreboot: lib: Support UNCOMPRESSED_RAMSTAGE
Leroy P Leahy (leroy.p.leahy@intel.com)
gerrit at coreboot.org
Wed Feb 3 20:38:57 CET 2016
Leroy P Leahy (leroy.p.leahy at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13591
-gerrit
commit c818b5f5990846800a9010717f00c2ea91ee68aa
Author: Lee Leahy <leroy.p.leahy at intel.com>
Date: Wed Feb 3 10:13:57 2016 -0800
lib: Support UNCOMPRESSED_RAMSTAGE
Selecting UNCOMPRESSED_RAMSTAGE prevents lzma.c from being compiled for
romstage. Adjust the logic in rmodule.c to prevent calls to the ulzma
routine when UNCOMPRESSED_RAMSTAGE is selected.
TEST=Build and run on Galileo
Change-Id: I7409e082baab3c2a086c57ad5aa9844ba788c7cd
Signed-off-by: Lee Leahy <leroy.p.leahy at intel.com>
---
src/lib/rmodule.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/lib/rmodule.c b/src/lib/rmodule.c
index 84b8734..7afebe5 100644
--- a/src/lib/rmodule.c
+++ b/src/lib/rmodule.c
@@ -259,6 +259,7 @@ int rmodule_stage_load(struct rmod_stage_load *rsl)
struct cbfs_stage stage;
void *rmod_loc;
struct region_device *fh;
+ int use_lzma;
if (rsl->prog == NULL || prog_name(rsl->prog) == NULL)
return -1;
@@ -282,11 +283,13 @@ int rmodule_stage_load(struct rmod_stage_load *rsl)
printk(BIOS_INFO, "Decompressing stage %s @ 0x%p (%d bytes)\n",
prog_name(rsl->prog), rmod_loc, stage.memlen);
+ use_lzma = (ENV_ROMSTAGE && IS_ENABLED(CONFIG_COMPRESS_RAMSTAGE))
+ || ENV_RAMSTAGE;
if (stage.compression == CBFS_COMPRESS_NONE) {
if (rdev_readat(fh, rmod_loc, sizeof(stage), stage.len) !=
stage.len)
return -1;
- } else if (stage.compression == CBFS_COMPRESS_LZMA) {
+ } else if (use_lzma && (stage.compression == CBFS_COMPRESS_LZMA)) {
size_t fsize;
void *map = rdev_mmap(fh, sizeof(stage), stage.len);
More information about the coreboot-gerrit
mailing list