Debugging facility improvements.
- Hook up malloc() debug code via CONFIG_DEBUG_MALLOC. Only show it in menuconfig if at least DEBUG or SPEW are selected as loglevel, as this code does additional printk(BIOS_DEBUG, ...) calls which would otherwise not be visible anyway. - Similarly, make DEBUG_CAR and REALMODE_DEBUG only visible if thr DEBUG or SPEW loglevel is selected. - Get rid of a custom "debug" macro, use printk() as usual. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6054 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <console/console.h>
|
||||
|
||||
#if 0
|
||||
#define MALLOCDBG(x)
|
||||
#else
|
||||
#if CONFIG_DEBUG_MALLOC
|
||||
#define MALLOCDBG(x...) printk(BIOS_SPEW, x)
|
||||
#else
|
||||
#define MALLOCDBG(x)
|
||||
#endif
|
||||
|
||||
extern unsigned char _heap, _eheap;
|
||||
static void *free_mem_ptr = &_heap; /* Start of heap */
|
||||
static void *free_mem_end_ptr = &_eheap; /* End of heap */
|
||||
|
Reference in New Issue
Block a user