diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2010-03-05 10:03:50 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2010-03-05 10:03:50 +0000 |
commit | 01ce601bdb4e664b502e8816a3e13e7b1d275e50 (patch) | |
tree | a79fb9dd4ab50ce103fb6d20177460c96445bdc9 /util/x86emu/include | |
parent | 5fa76e2864fada5a87d210a0b994a55f8a235024 (diff) |
This patch is from 2009-10-20
Convert all DEBUG_SMBUS, DEBUG_SMI, and DEBUG_RAM_SETUP custom and
local #defines into globally configurable kconfig options (and Options.lb
options for as long as newconfig still exists) which can be enabled
by the user in the "Debugging" menu.
The respective menu items only appear if a board is selected where the
chipset code actually provides such additional DEBUG output.
All three variables default to 0 / off for now.
Also, drop a small chunk of dead/useless code in the
src/northbridge/via/cn700/raminit.c file, which would otherwise break
compilation.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Reworked to still apply to trunk, added X86EMU_DEBUG (and make the x86emu/yabel
code only work printf instead of a redefined version of printk and
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5185 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/x86emu/include')
-rw-r--r-- | util/x86emu/include/x86emu/fpu_regs.h | 2 | ||||
-rw-r--r-- | util/x86emu/include/x86emu/regs.h | 9 | ||||
-rw-r--r-- | util/x86emu/include/x86emu/x86emu.h | 18 |
3 files changed, 5 insertions, 24 deletions
diff --git a/util/x86emu/include/x86emu/fpu_regs.h b/util/x86emu/include/x86emu/fpu_regs.h index 56e9a04d75..7c7df8562b 100644 --- a/util/x86emu/include/x86emu/fpu_regs.h +++ b/util/x86emu/include/x86emu/fpu_regs.h @@ -102,7 +102,7 @@ struct x86_fpu_registers { #endif /* X86_FPU_SUPPORT */ -#ifdef DEBUG +#if CONFIG_X86EMU_DEBUG # define DECODE_PRINTINSTR32(t,mod,rh,rl) \ DECODE_PRINTF(t[(mod<<3)+(rh)]); # define DECODE_PRINTINSTR256(t,mod,rh,rl) \ diff --git a/util/x86emu/include/x86emu/regs.h b/util/x86emu/include/x86emu/regs.h index df5c6b2d90..516b2ea836 100644 --- a/util/x86emu/include/x86emu/regs.h +++ b/util/x86emu/include/x86emu/regs.h @@ -279,7 +279,7 @@ typedef struct { u32 mode; volatile int intr; /* mask of pending interrupts */ volatile int debug; -#ifdef DEBUG +#if CONFIG_X86EMU_DEBUG int check; u16 saved_ip; u16 saved_cs; @@ -365,13 +365,6 @@ extern X86EMU_sysEnv _X86EMU_env; #define X86_CH M.x86.R_CH #define X86_DH M.x86.R_DH - -/*-------------------------- Function Prototypes --------------------------*/ - -/* Function to log information at runtime */ - -//void printk(const char *fmt, ...); - #ifdef __cplusplus } /* End of "C" linkage for C++ */ #endif diff --git a/util/x86emu/include/x86emu/x86emu.h b/util/x86emu/include/x86emu/x86emu.h index 22e08a9542..493e494927 100644 --- a/util/x86emu/include/x86emu/x86emu.h +++ b/util/x86emu/include/x86emu/x86emu.h @@ -42,27 +42,15 @@ #ifndef __X86EMU_X86EMU_H #define __X86EMU_X86EMU_H -/* FIXME: redefine printk for the moment */ #include <stddef.h> #include <console/console.h> -#undef printk -#define printk(x...) do_printk(BIOS_DEBUG, x) -#if defined(CONFIG_YABEL_DEBUG_FLAGS) && (CONFIG_YABEL_DEBUG_FLAGS != 0) +#if CONFIG_X86EMU_DEBUG #define DEBUG -#else -#undef DEBUG #endif -#ifdef SCITECH -#include "scitech.h" -#define X86API _ASMAPI -#define X86APIP _ASMAPIP -typedef int X86EMU_pioAddr; -#else #include "types.h" #define X86API #define X86APIP * -#endif #include "regs.h" /*---------------------- Macros and type definitions ----------------------*/ @@ -166,9 +154,9 @@ void X86EMU_setMemBase(void *base, size_t size); void X86EMU_exec(void); void X86EMU_halt_sys(void); -#ifdef DEBUG +#if CONFIG_X86EMU_DEBUG #define HALT_SYS() \ - printk("halt_sys: in %s\n", __func__); \ + printf("halt_sys: in %s\n", __func__); \ X86EMU_halt_sys(); #else #define HALT_SYS() X86EMU_halt_sys() |