Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68246 )
Change subject: [only for test] Use -Wformat also for some 'debugging code' ......................................................................
[only for test] Use -Wformat also for some 'debugging code'
Signed-off-by: Elyes Haouas ehaouas@noos.fr Change-Id: I76f861a573feaa72ff988ffc9d10b7536fa5eec5 --- M Makefile.inc M src/Kconfig M src/cpu/x86/Kconfig.debug_cpu 3 files changed, 46 insertions(+), 34 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/46/68246/1
diff --git a/Makefile.inc b/Makefile.inc index 0ed205f..fc29eb1 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -434,7 +434,7 @@ CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wimplicit-fallthrough CFLAGS_common += -Wshadow -Wdate-time -Wtype-limits -Wvla -CFLAGS_common += -Wdangling-else +CFLAGS_common += -Wdangling-else -Wformat CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer CFLAGS_common += -fstrict-aliasing -ffunction-sections -fdata-sections -fno-pie ifeq ($(CONFIG_COMPILER_GCC),y) diff --git a/src/Kconfig b/src/Kconfig index 0d3879e..76830e5 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -894,7 +894,7 @@ # TODO: Better help text and detailed instructions. config GDB_STUB bool "GDB debugging support" - default n + default y depends on DRIVERS_UART help If enabled, you will be able to set breakpoints for gdb debugging. @@ -902,7 +902,7 @@
config GDB_WAIT bool "Wait for a GDB connection in the ramstage" - default n + default y depends on GDB_STUB help If enabled, coreboot will wait for a GDB connection in the ramstage. @@ -910,7 +910,7 @@
config FATAL_ASSERTS bool "Halt when hitting a BUG() or assertion error" - default n + default y help If enabled, coreboot will call hlt() on a BUG() or failed ASSERT().
@@ -923,16 +923,16 @@
config DEBUG_CBFS bool "Output verbose CBFS debug messages" - default n + default y help This option enables additional CBFS related debug messages.
config HAVE_DEBUG_RAM_SETUP - def_bool n + def_bool y
config DEBUG_RAM_SETUP bool "Output verbose RAM init debug messages" - default n + default y depends on HAVE_DEBUG_RAM_SETUP help This option enables additional RAM init related debug messages. @@ -945,17 +945,17 @@
config DEBUG_PIRQ bool "Check PIRQ table consistency" - default n + default y depends on GENERATE_PIRQ_TABLE help If unsure, say N.
config HAVE_DEBUG_SMBUS - def_bool n + def_bool y
config DEBUG_SMBUS bool "Output verbose SMBus debug messages" - default n + default y depends on HAVE_DEBUG_SMBUS help This option enables additional SMBus (and SPD) debug messages. @@ -966,7 +966,7 @@
config DEBUG_SMI bool "Output verbose SMI debug messages" - default n + default y depends on HAVE_SMI_HANDLER select SPI_FLASH_SMM if EM100PRO_SPI_CONSOLE || CONSOLE_SPI_FLASH help @@ -978,6 +978,7 @@
config DEBUG_PERIODIC_SMI bool "Trigger SMI periodically" + default y depends on DEBUG_SMI
# Only visible if debug level is DEBUG (7) or SPEW (8) as it does additional @@ -985,7 +986,7 @@ config DEBUG_MALLOC prompt "Output verbose malloc debug messages" if DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8 || CONSOLE_OVERRIDE_LOGLEVEL bool - default n + default y help This option enables additional malloc related debug messages.
@@ -996,7 +997,7 @@ # Only visible if DEBUG_SPEW (8) is set. config DEBUG_RESOURCES bool "Output verbose PCI MEM and IO resource debug messages" if DEFAULT_CONSOLE_LOGLEVEL_8 || CONSOLE_OVERRIDE_LOGLEVEL - default n + default y help This option enables additional PCI memory and IO debug messages. Note: This option will increase the size of the coreboot image. @@ -1004,7 +1005,7 @@
config DEBUG_CONSOLE_INIT bool "Debug console initialisation code" - default n + default y help With this option printk()'s are attempted before console hardware initialisation has been completed. Your mileage may vary. @@ -1019,7 +1020,7 @@ config REALMODE_DEBUG prompt "Enable debug messages for option ROM execution" if DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8 || CONSOLE_OVERRIDE_LOGLEVEL bool - default n + default y depends on PCI_OPTION_ROM_RUN_REALMODE help This option enables additional x86emu related debug messages. @@ -1030,7 +1031,7 @@
config X86EMU_DEBUG bool "Output verbose x86emu debug messages" - default n + default y depends on PCI_OPTION_ROM_RUN_YABEL help This option enables additional x86emu related debug messages. @@ -1041,7 +1042,7 @@
config X86EMU_DEBUG_JMP bool "Trace JMP/RETF" - default n + default y depends on X86EMU_DEBUG help Print information about JMP and RETF opcodes from x86emu. @@ -1052,7 +1053,7 @@
config X86EMU_DEBUG_TRACE bool "Trace all opcodes" - default n + default y depends on X86EMU_DEBUG help Print _all_ opcodes that are executed by x86emu. @@ -1065,7 +1066,7 @@
config X86EMU_DEBUG_PNP bool "Log Plug&Play accesses" - default n + default y depends on X86EMU_DEBUG help Print Plug And Play accesses made by option ROMs. @@ -1076,7 +1077,7 @@
config X86EMU_DEBUG_DISK bool "Log Disk I/O" - default n + default y depends on X86EMU_DEBUG help Print Disk I/O related messages. @@ -1087,7 +1088,7 @@
config X86EMU_DEBUG_PMM bool "Log PMM" - default n + default y depends on X86EMU_DEBUG help Print messages related to POST Memory Manager (PMM). @@ -1099,7 +1100,7 @@
config X86EMU_DEBUG_VBE bool "Debug VESA BIOS Extensions" - default n + default y depends on X86EMU_DEBUG help Print messages related to VESA BIOS Extension (VBE) functions. @@ -1110,7 +1111,7 @@
config X86EMU_DEBUG_INT10 bool "Redirect INT10 output to console" - default n + default y depends on X86EMU_DEBUG help Let INT10 (i.e. character output) calls print messages to debug output. @@ -1121,7 +1122,7 @@
config X86EMU_DEBUG_INTERRUPTS bool "Log intXX calls" - default n + default y depends on X86EMU_DEBUG help Print messages related to interrupt handling. @@ -1132,7 +1133,7 @@
config X86EMU_DEBUG_CHECK_VMEM_ACCESS bool "Log special memory accesses" - default n + default y depends on X86EMU_DEBUG help Print messages related to accesses to certain areas of the virtual @@ -1144,7 +1145,7 @@
config X86EMU_DEBUG_MEM bool "Log all memory accesses" - default n + default y depends on X86EMU_DEBUG help Print memory accesses made by option ROM. @@ -1156,7 +1157,7 @@
config X86EMU_DEBUG_IO bool "Log IO accesses" - default n + default y depends on X86EMU_DEBUG help Print I/O accesses made by option ROM. @@ -1167,7 +1168,7 @@
config X86EMU_DEBUG_TIMINGS bool "Output timing information" - default n + default y depends on X86EMU_DEBUG && HAVE_MONOTONIC_TIMER help Print timing information needed by i915tool. @@ -1176,14 +1177,14 @@
config DEBUG_SPI_FLASH bool "Output verbose SPI flash debug messages" - default n + default y depends on SPI_FLASH help This option enables additional SPI flash related debug messages.
config DEBUG_IPMI bool "Output verbose IPMI debug messages" - default n + default y depends on IPMI_KCS help This option enables additional IPMI related debug messages. @@ -1200,7 +1201,7 @@
config DEBUG_FUNC bool "Enable function entry and exit reporting macros" if DEFAULT_CONSOLE_LOGLEVEL_8 || CONSOLE_OVERRIDE_LOGLEVEL - default n + default y help This option enables additional function entry and exit debug messages for select functions. @@ -1209,7 +1210,7 @@
config DEBUG_COVERAGE bool "Debug code coverage" - default n + default y depends on COVERAGE help If enabled, the code coverage hooks in coreboot will output some @@ -1217,14 +1218,14 @@
config DEBUG_BOOT_STATE bool "Debug boot state machine" - default n + default y help Control debugging of the boot state machine. When selected displays the state boundaries in ramstage.
config DEBUG_ADA_CODE bool "Compile debug code in Ada sources" - default n + default y help Add the compiler switch `-gnata` to compile code guarded by `pragma Debug`. diff --git a/src/cpu/x86/Kconfig.debug_cpu b/src/cpu/x86/Kconfig.debug_cpu index 7edb60f..7beccb1 100644 --- a/src/cpu/x86/Kconfig.debug_cpu +++ b/src/cpu/x86/Kconfig.debug_cpu @@ -9,6 +9,7 @@
config DISPLAY_MTRRS bool "Display intermediate MTRR settings" + default y
config DEBUG_SMM_RELOCATION bool "Debug SMM relocation code"