Author: stuge Date: Wed Nov 10 03:00:32 2010 New Revision: 6055 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6055
Log: Ensure that config options hidden by r6054 have defaults, and fix MALLOCDBG()
Signed-off-by: Peter Stuge peter@stuge.se Acked-by: Peter Stuge peter@stuge.se
Modified: trunk/src/Kconfig trunk/src/lib/malloc.c
Modified: trunk/src/Kconfig ============================================================================== --- trunk/src/Kconfig Wed Nov 10 01:14:32 2010 (r6054) +++ trunk/src/Kconfig Wed Nov 10 03:00:32 2010 (r6055) @@ -502,15 +502,20 @@ config HAVE_DEBUG_CAR def_bool n
+config DEBUG_CAR + def_bool n + depends on HAVE_DEBUG_CAR + +if DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8 # Only visible if debug level is DEBUG (7) or SPEW (8) as it does additional # printk(BIOS_DEBUG, ...) calls. config DEBUG_CAR bool "Output verbose Cache-as-RAM debug messages" default n - depends on HAVE_DEBUG_CAR && \ - (DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8) + depends on HAVE_DEBUG_CAR help This option enables additional CAR related debug messages. +endif
config DEBUG_PIRQ bool "Check PIRQ table consistency" @@ -556,32 +561,41 @@
If unsure, say N.
+config DEBUG_MALLOC + def_bool n + # Only visible if debug level is DEBUG (7) or SPEW (8) as it does additional # printk(BIOS_DEBUG, ...) calls. +if DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8 config DEBUG_MALLOC bool "Output verbose malloc debug messages" default n - depends on DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8 help This option enables additional malloc related debug messages.
Note: This option will increase the size of the coreboot image.
If unsure, say N. +endif + +config REALMODE_DEBUG + def_bool n + depends on PCI_OPTION_ROM_RUN_REALMODE
+if DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8 # Only visible if debug level is DEBUG (7) or SPEW (8) as it does additional # printk(BIOS_DEBUG, ...) calls. config REALMODE_DEBUG bool "Enable debug messages for option ROM execution" default n - depends on PCI_OPTION_ROM_RUN_REALMODE && \ - (DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8) + depends on PCI_OPTION_ROM_RUN_REALMODE help This option enables additional x86emu related debug messages.
Note: This option will increase the time to emulate a ROM.
If unsure, say N. +endif
config X86EMU_DEBUG bool "Output verbose x86emu debug messages"
Modified: trunk/src/lib/malloc.c ============================================================================== --- trunk/src/lib/malloc.c Wed Nov 10 01:14:32 2010 (r6054) +++ trunk/src/lib/malloc.c Wed Nov 10 03:00:32 2010 (r6055) @@ -4,7 +4,7 @@ #if CONFIG_DEBUG_MALLOC #define MALLOCDBG(x...) printk(BIOS_SPEW, x) #else -#define MALLOCDBG(x) +#define MALLOCDBG(x...) #endif
extern unsigned char _heap, _eheap;
Modified: trunk/src/lib/malloc.c
==== --- trunk/src/lib/malloc.c Wed Nov 10 01:14:32 2010 (r6054) +++ trunk/src/lib/malloc.c Wed Nov 10 03:00:32 2010 (r6055) @@ -4,7 +4,7 @@ #if CONFIG_DEBUG_MALLOC #define MALLOCDBG(x...) printk(BIOS_SPEW, x)
This would be the easy place to make sure that you could see the messages. #define MALLOCDBG(x...) printk(CONFIG_DEFAULT_CONSOLE_LOGLEVEL, x)
Thanks, Myles
Myles Watson wrote:
This would be the easy place to make sure that you could see the messages. #define MALLOCDBG(x...) printk(CONFIG_DEFAULT_CONSOLE_LOGLEVEL, x)
Very nice. It would allow to select individual debugging regardless of loglevel otherwise. I quite like that!
//Peter
On 09.11.2010, at 18:08, "Myles Watson" mylesgw@gmail.com wrote:
Modified: trunk/src/lib/malloc.c
==== --- trunk/src/lib/malloc.c Wed Nov 10 01:14:32 2010 (r6054) +++ trunk/src/lib/malloc.c Wed Nov 10 03:00:32 2010 (r6055) @@ -4,7 +4,7 @@ #if CONFIG_DEBUG_MALLOC #define MALLOCDBG(x...) printk(BIOS_SPEW, x)
This would be the easy place to make sure that you could see the messages. #define MALLOCDBG(x...) printk(CONFIG_DEFAULT_CONSOLE_LOGLEVEL, x)
I think keeping them at SPEW is fine,... Otherwise we end up with images printing that information at ie error log level making it impossible to enable the option in production images at all.
Thanks, Myles
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Stefan Reinauer wrote:
This would be the easy place to make sure that you could see the messages. #define MALLOCDBG(x...) printk(CONFIG_DEFAULT_CONSOLE_LOGLEVEL, x)
I think keeping them at SPEW is fine,... Otherwise we end up with images printing that information at ie error log level making it impossible to enable the option in production images at all.
Hm? Please clarify?
The image would print the information only when the user selects RAM debug, but it would work better than now, because that option could always be selected, regardless of what maximum (or default) loglevel was selected.
Currently the option is only shown if loglevel >= DEBUG
//Peter
On 09.11.2010, at 19:11, Peter Stuge peter@stuge.se wrote:
Stefan Reinauer wrote:
This would be the easy place to make sure that you could see the messages. #define MALLOCDBG(x...) printk(CONFIG_DEFAULT_CONSOLE_LOGLEVEL, x)
I think keeping them at SPEW is fine,... Otherwise we end up with images printing that information at ie error log level making it impossible to enable the option in production images at all.
Hm? Please clarify?
The image would print the information only when the user selects RAM debug, but it would work better than now, because that option could always be selected, regardless of what maximum (or default) loglevel was selected.
What if one wants to build an image with ram debug capability that only prints errors unless spew is enabled via CMOS?
Currently the option is only shown if loglevel >= DEBUG
//Peter
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
On Tue, Nov 9, 2010 at 7:53 PM, Stefan Reinauer stefan.reinauer@coresystems.de wrote:
On 09.11.2010, at 18:08, "Myles Watson" mylesgw@gmail.com wrote:
Modified: trunk/src/lib/malloc.c
==========================================================================
====
--- trunk/src/lib/malloc.c Wed Nov 10 01:14:32 2010 (r6054)
+++ trunk/src/lib/malloc.c Wed Nov 10 03:00:32 2010 (r6055)
@@ -4,7 +4,7 @@
#if CONFIG_DEBUG_MALLOC
#define MALLOCDBG(x...) printk(BIOS_SPEW, x)
This would be the easy place to make sure that you could see the messages. #define MALLOCDBG(x...) printk(CONFIG_DEFAULT_CONSOLE_LOGLEVEL, x)
I think keeping them at SPEW is fine,... Otherwise we end up with images printing that information at ie error log level making it impossible to enable the option in production images at all.
How about CONFIG_MAXIMUM_CONSOLE_LOGLEVEL, then? I was responding to this:
+config DEBUG_MALLOC + def_bool n + # Only visible if debug level is DEBUG (7) or SPEW (8) as it does additional # printk(BIOS_DEBUG, ...) calls. +if DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8 config DEBUG_MALLOC bool "Output verbose malloc debug messages" default n - depends on DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8
I think the idea is that if someone enables malloc debugging they want to be able to see the messages. If you leave it SPEW and set MAX to DEBUG ...
Thanks, Myles
On 09.11.2010, at 19:22, Myles Watson mylesgw@gmail.com wrote:
On Tue, Nov 9, 2010 at 7:53 PM, Stefan Reinauer stefan.reinauer@coresystems.de wrote:
On 09.11.2010, at 18:08, "Myles Watson" mylesgw@gmail.com wrote:
Modified: trunk/src/lib/malloc.c
==========================================================================
====
--- trunk/src/lib/malloc.c Wed Nov 10 01:14:32 2010 (r6054)
+++ trunk/src/lib/malloc.c Wed Nov 10 03:00:32 2010 (r6055)
@@ -4,7 +4,7 @@
#if CONFIG_DEBUG_MALLOC
#define MALLOCDBG(x...) printk(BIOS_SPEW, x)
This would be the easy place to make sure that you could see the messages. #define MALLOCDBG(x...) printk(CONFIG_DEFAULT_CONSOLE_LOGLEVEL, x)
I think keeping them at SPEW is fine,... Otherwise we end up with images printing that information at ie error log level making it impossible to enable the option in production images at all.
How about CONFIG_MAXIMUM_CONSOLE_LOGLEVEL, then? I was responding to this:
Yes I think max is the way to go.
+config DEBUG_MALLOC
def_bool n
# Only visible if debug level is DEBUG (7) or SPEW (8) as it does additional # printk(BIOS_DEBUG, ...) calls. +if DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8 config DEBUG_MALLOC bool "Output verbose malloc debug messages" default n
depends on DEFAULT_CONSOLE_LOGLEVEL_7 || DEFAULT_CONSOLE_LOGLEVEL_8
I think the idea is that if someone enables malloc debugging they want to be able to see the messages. If you leave it SPEW and set MAX to DEBUG ...
Thanks, Myles
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot