From 106053537ccfd990b678e072d5f941fb0f134e7a Mon Sep 17 00:00:00 2001 From: Lee Leahy Date: Sun, 14 Feb 2016 17:01:40 -0800 Subject: lib: Add Kconfig to toggle boot state debugging Add the DEBUG_BOOT_STATE Kconfig value to enable boot state debugging. Update include/bootstate.h and lib/hardwaremain.c to honor this value. Add a dashed line which displays between the states. Testing on Galileo: * select DEBUG_BOOT_STATE in mainboard/intel/galileo/Kconfig * Build and run on Galileo Change-Id: I6e8a0085aa33c8a1394f31c030e67ab3d5bf7299 Signed-off-by: Lee Leahy Reviewed-on: https://review.coreboot.org/13716 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/include/bootstate.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/include') diff --git a/src/include/bootstate.h b/src/include/bootstate.h index 0889018e18..09178a56f0 100644 --- a/src/include/bootstate.h +++ b/src/include/bootstate.h @@ -25,9 +25,6 @@ #include #endif -/* Control debugging of the boot state machine. */ -#define BOOT_STATE_DEBUG 0 - /* * The boot state machine provides a mechanism for calls to be made through- * out the main boot process. The boot process is separated into discrete @@ -119,12 +116,12 @@ struct boot_state_callback { void (*callback)(void *arg); /* For use internal to the boot state machine. */ struct boot_state_callback *next; -#if BOOT_STATE_DEBUG +#if IS_ENABLED(CONFIG_DEBUG_BOOT_STATE) const char *location; #endif }; -#if BOOT_STATE_DEBUG +#if IS_ENABLED(CONFIG_DEBUG_BOOT_STATE) #define BOOT_STATE_CALLBACK_LOC __FILE__ ":" STRINGIFY(__LINE__) #define BOOT_STATE_CALLBACK_INIT_DEBUG .location = BOOT_STATE_CALLBACK_LOC, #define INIT_BOOT_STATE_CALLBACK_DEBUG(bscb_) \ -- cgit v1.2.3