[coreboot-gerrit] New patch to review for coreboot: drivers/elog: remove elog Kconfig variables

Aaron Durbin (adurbin@chromium.org) gerrit at coreboot.org
Fri Jul 22 21:39:21 CEST 2016


Aaron Durbin (adurbin at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15814

-gerrit

commit a28f856265c7cfb0f5d98c520e8724fc8d0a45b6
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Fri Jul 22 14:30:55 2016 -0500

    drivers/elog: remove elog Kconfig variables
    
    Now that FMAP is a first class citizen in coreboot
    there's no reason to have alternate locations for ELOG.
    If one wants eventlog support they need to specify the
    ELOG entry in the FMAP. The one side effect is that
    the code was previously limiting the size to 4KiB
    because the default ELOG_AREA_SIZE was 4KiB. However,
    that's no longer the case as the FMAP region size is
    honored.
    
    Change-Id: I4ce5f15032387155d2f56f0de61f2d85271ba606
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
---
 src/drivers/elog/Kconfig | 15 ---------------
 src/drivers/elog/elog.c  | 28 ++++++++++------------------
 2 files changed, 10 insertions(+), 33 deletions(-)

diff --git a/src/drivers/elog/Kconfig b/src/drivers/elog/Kconfig
index 9df9e12..cb5d3d4 100644
--- a/src/drivers/elog/Kconfig
+++ b/src/drivers/elog/Kconfig
@@ -26,21 +26,6 @@ config ELOG_DEBUG
 	bool "Enable debug output for event logging"
 	default n
 
-config ELOG_FLASH_BASE
-	hex "Event log offset into flash"
-	default 0
-	help
-	  Offset into the flash chip for the ELOG block.
-	  This should be allocated in the FMAP.
-
-config ELOG_AREA_SIZE
-	hex "Size of Event Log area in flash"
-	default 0x1000
-	help
-	  This should be a multiple of flash block size.
-
-	  Default is 4K.
-
 config ELOG_CBMEM
 	bool "Store a copy of ELOG in CBMEM"
 	default n
diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c
index d05ce48..47d4e01 100644
--- a/src/drivers/elog/elog.c
+++ b/src/drivers/elog/elog.c
@@ -35,10 +35,6 @@
 #include "elog_internal.h"
 
 
-#if !IS_ENABLED(CONFIG_CHROMEOS) && CONFIG_ELOG_FLASH_BASE == 0
-#error "CONFIG_ELOG_FLASH_BASE is invalid"
-#endif
-
 #if CONFIG_ELOG_DEBUG
 #define elog_debug(STR...) printk(BIOS_DEBUG, STR)
 #else
@@ -493,24 +489,20 @@ int elog_clear(void)
 
 static void elog_find_flash(void)
 {
+	struct region r;
+
 	elog_debug("elog_find_flash()\n");
 
-	if (IS_ENABLED(CONFIG_CHROMEOS)) {
-		/* Find the ELOG base and size in FMAP */
-		struct region r;
-
-		if (fmap_locate_area("RW_ELOG", &r) < 0) {
-			printk(BIOS_WARNING,
-				"ELOG: Unable to find RW_ELOG in FMAP\n");
-			flash_base = total_size = 0;
-		} else {
-			flash_base = region_offset(&r);
-			total_size = MIN(region_sz(&r), CONFIG_ELOG_AREA_SIZE);
-		}
+	/* Find the ELOG base and size in FMAP */
+	if (fmap_locate_area("RW_ELOG", &r) < 0) {
+		printk(BIOS_WARNING,
+			"ELOG: Unable to find RW_ELOG in FMAP\n");
+		flash_base = total_size = 0;
 	} else {
-		flash_base = CONFIG_ELOG_FLASH_BASE;
-		total_size = CONFIG_ELOG_AREA_SIZE;
+		flash_base = region_offset(&r);
+		total_size = region_sz(&r);
 	}
+
 	log_size = total_size - sizeof(struct elog_header);
 	full_threshold = log_size - ELOG_MIN_AVAILABLE_ENTRIES * MAX_EVENT_SIZE;
 	shrink_size = MIN(total_size * ELOG_SHRINK_PERCENTAGE / 100,



More information about the coreboot-gerrit mailing list