Add CONFIG_DEBUG_COREBOOT config option

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
diff --git a/src/Kconfig b/src/Kconfig
index 5882d11..5e2db8b 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -433,4 +433,14 @@
             information by outputing strings in a special port present in the
             IO space.
 
+    config DEBUG_COREBOOT
+        depends on COREBOOT && DEBUG_LEVEL != 0
+        bool "coreboot cbmem debug logging"
+        default y
+        help
+            Send debugging information to the coreboot cbmem console buffer.
+            Needs CONFIG_CONSOLE_CBMEM in coreboot.  You can read the log
+            after boot using 'cbmem -c'.  Only 32bit code (basically every-
+            thing before booting the OS) writes to the log buffer.
+
 endmenu
diff --git a/src/coreboot.c b/src/coreboot.c
index c66e6e3..7f7b322 100644
--- a/src/coreboot.c
+++ b/src/coreboot.c
@@ -206,7 +206,7 @@
 
 void debug_cbmem(char c)
 {
-    if (!CONFIG_COREBOOT)
+    if (!CONFIG_DEBUG_COREBOOT)
         return;
     if (!cbcon)
         return;