[coreboot-gerrit] New patch to review for coreboot: 64f7858 cbfs: remove unused code and prototype

Ronald G. Minnich (rminnich@gmail.com) gerrit at coreboot.org
Sun Nov 17 20:08:48 CET 2013


Ronald G. Minnich (rminnich at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4090

-gerrit

commit 64f78585f2e0921a689e585d189d157735491143
Author: Ronald G. Minnich <rminnich at google.com>
Date:   Sun Nov 17 11:07:25 2013 -0800

    cbfs: remove unused code and prototype
    
    The code is wrong (it's calling ntohl on an entry point that is actually
    already le due to an old cbfs bug) and nothing calls it any more anyway.
    
    Change-Id: Ief2c33faf99e3d2fc410524a5aae7bde378f088b
    Signed-off-by: Ronald G. Minnich <rminnich at google.com>
---
 src/include/cbfs.h |  1 -
 src/lib/cbfs.c     | 19 -------------------
 2 files changed, 20 deletions(-)

diff --git a/src/include/cbfs.h b/src/include/cbfs.h
index c0098ea..c05566d 100644
--- a/src/include/cbfs.h
+++ b/src/include/cbfs.h
@@ -52,7 +52,6 @@
 
 #include <cbfs_core.h>
 
-int cbfs_execute_stage(struct cbfs_media *media, const char *name);
 void *cbfs_load_optionrom(struct cbfs_media *media, uint16_t vendor,
 			  uint16_t device, void * dest);
 void *cbfs_load_payload(struct cbfs_media *media, const char *name);
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index 4ccc9e6..23e1600 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -292,25 +292,6 @@ void * cbfs_load_stage(struct cbfs_media *media, const char *name)
 }
 #endif /* CONFIG_RELOCATABLE_RAMSTAGE */
 
-int cbfs_execute_stage(struct cbfs_media *media, const char *name)
-{
-	struct cbfs_stage *stage = (struct cbfs_stage *)
-		cbfs_get_file_content(media, name, CBFS_TYPE_STAGE);
-
-	if (stage == NULL)
-		return 1;
-
-	if (ntohl(stage->compression) != CBFS_COMPRESS_NONE) {
-		LOG("Unable to run %s:  Compressed file"
-		       "Not supported for in-place execution\n", name);
-		return 1;
-	}
-
-	/* FIXME: This isn't right */
-	LOG("run @ %p\n", (void *) ntohl((uint32_t) stage->entry));
-	return run_address((void *)(uintptr_t)ntohll(stage->entry));
-}
-
 #if !CONFIG_ALT_CBFS_LOAD_PAYLOAD
 void *cbfs_load_payload(struct cbfs_media *media, const char *name)
 {



More information about the coreboot-gerrit mailing list