summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2009-06-30 15:24:03 +0000
committerStefan Reinauer <stefan.reinauer@coreboot.org>2009-06-30 15:24:03 +0000
commit6ba36908119757d61f57dfc29a3b90274f2ac34f (patch)
tree7b2e1fd8f7c6b1c0d0aa87334b9e66382350b93c
parentce314b3f027f1aaee6d1aba9488268c35095bbc4 (diff)
downloadcoreboot-6ba36908119757d61f57dfc29a3b90274f2ac34f.tar.gz
coreboot-6ba36908119757d61f57dfc29a3b90274f2ac34f.tar.bz2
coreboot-6ba36908119757d61f57dfc29a3b90274f2ac34f.zip
commit svn:externals for previous commit (2/2)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://coreboot.org/repository/coreboot-v3@1173 f3766cd6-281f-0410-b1cd-43a5c92072e9
-rw-r--r--util/x86emu/biosemu.c14
-rw-r--r--util/x86emu/include/x86emu/fpu_regs.h2
-rw-r--r--util/x86emu/include/x86emu/regs.h2
-rw-r--r--util/x86emu/include/x86emu/x86emu.h2
-rw-r--r--util/x86emu/x86_asm.S2
-rw-r--r--util/x86emu/x86emu/debug.c6
-rw-r--r--util/x86emu/x86emu/debug.h20
-rw-r--r--util/x86emu/x86emu/decode.c26
-rw-r--r--util/x86emu/x86emu/fpu.c34
-rw-r--r--util/x86emu/x86emu/ops.c28
-rw-r--r--util/x86emu/yabel/biosemu.c6
-rw-r--r--util/x86emu/yabel/debug.h8
-rw-r--r--util/x86emu/yabel/device.c6
-rw-r--r--util/x86emu/yabel/mem.c2
14 files changed, 79 insertions, 79 deletions
diff --git a/util/x86emu/biosemu.c b/util/x86emu/biosemu.c
index 9b6dcb472ec1..360af645047f 100644
--- a/util/x86emu/biosemu.c
+++ b/util/x86emu/biosemu.c
@@ -102,7 +102,7 @@ u8 x_inb(u16 port)
u8 val;
val = inb(port);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (port != 0x40)
printk("inb(0x%04x) = 0x%02x\n", port, val);
#endif
@@ -116,7 +116,7 @@ u16 x_inw(u16 port)
val = inw(port);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
printk("inw(0x%04x) = 0x%04x\n", port, val);
#endif
return val;
@@ -128,7 +128,7 @@ u32 x_inl(u16 port)
val = inl(port);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
printk("inl(0x%04x) = 0x%08x\n", port, val);
#endif
return val;
@@ -136,7 +136,7 @@ u32 x_inl(u16 port)
void x_outb(u16 port, u8 val)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (port != 0x43)
printk("outb(0x%02x, 0x%04x)\n", val, port);
#endif
@@ -145,7 +145,7 @@ void x_outb(u16 port, u8 val)
void x_outw(u16 port, u16 val)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
printk("outw(0x%04x, 0x%04x)\n", val, port);
#endif
outw(val, port);
@@ -153,7 +153,7 @@ void x_outw(u16 port, u16 val)
void x_outl(u16 port, u32 val)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
printk("outl(0x%08x, 0x%04x)\n", val, port);
#endif
outl(val, port);
@@ -387,7 +387,7 @@ void run_bios(struct device * dev, unsigned long addr)
pushw(X86_SS);
pushw(X86_SP + 2);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
//X86EMU_trace_on();
#endif
diff --git a/util/x86emu/include/x86emu/fpu_regs.h b/util/x86emu/include/x86emu/fpu_regs.h
index 56e9a04d75c1..efc13ef2befa 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
+#ifdef CONFIG_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 df5c6b2d902e..4b368e462284 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
+#ifdef CONFIG_DEBUG
int check;
u16 saved_ip;
u16 saved_cs;
diff --git a/util/x86emu/include/x86emu/x86emu.h b/util/x86emu/include/x86emu/x86emu.h
index 8eb4efb39780..6101e57d13f9 100644
--- a/util/x86emu/include/x86emu/x86emu.h
+++ b/util/x86emu/include/x86emu/x86emu.h
@@ -163,7 +163,7 @@ void X86EMU_prepareForInt(int num);
void X86EMU_exec(void);
void X86EMU_halt_sys(void);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
#define HALT_SYS() \
printk("halt_sys: file %s, line %d\n", __FILE__, __LINE__); \
X86EMU_halt_sys();
diff --git a/util/x86emu/x86_asm.S b/util/x86emu/x86_asm.S
index 10f5f2f62829..988b596878c3 100644
--- a/util/x86emu/x86_asm.S
+++ b/util/x86emu/x86_asm.S
@@ -168,7 +168,7 @@ __run_interrupt = RELOCATED(.)
1:
.code16 /* 16 bit code from here on... */
- // DEBUG
+ // CONFIG_DEBUG
movb $0xec, %al
outb %al, $0x80
diff --git a/util/x86emu/x86emu/debug.c b/util/x86emu/x86emu/debug.c
index 026c03fddd0f..c884462567a9 100644
--- a/util/x86emu/x86emu/debug.c
+++ b/util/x86emu/x86emu/debug.c
@@ -42,7 +42,7 @@
/*----------------------------- Implementation ----------------------------*/
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
static void print_encoded_bytes (u16 s, u16 o);
static void print_decoded_instruction (void);
@@ -94,7 +94,7 @@ void disassemble_forward (u16 seg, u16 off, int n)
* flag associated with the "execution", and we are using a copy
* of the register struct. All the major opcodes, once fully
* decoded, have the following two steps: TRACE_REGS(r,m);
- * SINGLE_STEP(r,m); which disappear if DEBUG is not defined to
+ * SINGLE_STEP(r,m); which disappear if CONFIG_DEBUG is not defined to
* the preprocessor. The TRACE_REGS macro expands to:
*
* if (debug&DEBUG_DISASSEMBLE)
@@ -364,7 +364,7 @@ int parse_line (char *s, int *ps, int *n)
#endif
}
-#endif /* DEBUG */
+#endif /* CONFIG_DEBUG */
void x86emu_dump_regs (void)
{
diff --git a/util/x86emu/x86emu/debug.h b/util/x86emu/x86emu/debug.h
index f6bab3cf786d..4e95e34c3873 100644
--- a/util/x86emu/x86emu/debug.h
+++ b/util/x86emu/x86emu/debug.h
@@ -40,8 +40,8 @@
#ifndef __X86EMU_DEBUG_H
#define __X86EMU_DEBUG_H
-//#define DEBUG 0
-//#undef DEBUG
+//#define CONFIG_DEBUG 0
+//#undef CONFIG_DEBUG
/*---------------------- Macros and type definitions ----------------------*/
/* checks to be enabled for "runtime" */
@@ -51,7 +51,7 @@
#define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */
#define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset*/
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
# define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F)
# define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F)
# define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F)
@@ -63,7 +63,7 @@
# define CHECK_DATA_ACCESS()
#endif
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
# define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F)
# define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F)
# define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F)
@@ -106,7 +106,7 @@
# define DEBUG_DECODE_NOPRINT() 0
#endif
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
# define DECODE_PRINTF(x) if (DEBUG_DECODE()) \
x86emu_decode_printf(x)
@@ -136,7 +136,7 @@
# define SAVE_IP_CS(x,y)
#endif
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
#define TRACE_REGS() \
if (DEBUG_DISASSEMBLE()) { \
x86emu_just_disassemble(); \
@@ -147,7 +147,7 @@
# define TRACE_REGS()
#endif
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
# define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step()
#else
# define SINGLE_STEP()
@@ -157,7 +157,7 @@
TRACE_REGS(); \
SINGLE_STEP()
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
# define START_OF_INSTR()
# define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr();
# define END_OF_INSTR_NO_TRACE() x86emu_end_instr();
@@ -167,7 +167,7 @@
# define END_OF_INSTR_NO_TRACE()
#endif
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
# define CALL_TRACE(u,v,w,x,s) \
if (DEBUG_TRACECALLREGS()) \
x86emu_dump_regs(); \
@@ -189,7 +189,7 @@
# define JMP_TRACE(u,v,w,x,s)
#endif
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
#define DB(x) x
#else
#define DB(x)
diff --git a/util/x86emu/x86emu/decode.c b/util/x86emu/x86emu/decode.c
index e7010fe579f1..8e42e5d68366 100644
--- a/util/x86emu/x86emu/decode.c
+++ b/util/x86emu/x86emu/decode.c
@@ -285,7 +285,7 @@ _INLINE u32 get_data_segment(void)
case SYSMODE_SEGOVR_SS | SYSMODE_SEG_DS_SS:
return M.x86.R_SS;
default:
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
printk("error: should not happen: multiple overrides.\n");
#endif
HALT_SYS();
@@ -305,7 +305,7 @@ NOTE: Do not inline this function as (*sys_rdX) is already inline!
u8 fetch_data_byte(
uint offset)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access((u16)get_data_segment(), offset);
#endif
@@ -324,7 +324,7 @@ NOTE: Do not inline this function as (*sys_rdX) is already inline!
u16 fetch_data_word(
uint offset)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access((u16)get_data_segment(), offset);
#endif
@@ -343,7 +343,7 @@ NOTE: Do not inline this function as (*sys_rdX) is already inline!
u32 fetch_data_long(
uint offset)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access((u16)get_data_segment(), offset);
#endif
@@ -364,7 +364,7 @@ u8 fetch_data_byte_abs(
uint segment,
uint offset)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access(segment, offset);
#endif
@@ -385,7 +385,7 @@ u16 fetch_data_word_abs(
uint segment,
uint offset)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access(segment, offset);
#endif
@@ -406,7 +406,7 @@ u32 fetch_data_long_abs(
uint segment,
uint offset)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access(segment, offset);
#endif
@@ -428,7 +428,7 @@ void store_data_byte(
uint offset,
u8 val)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access((u16)get_data_segment(), offset);
#endif
@@ -450,7 +450,7 @@ void store_data_word(
uint offset,
u16 val)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access((u16)get_data_segment(), offset);
#endif
@@ -472,7 +472,7 @@ void store_data_long(
uint offset,
u32 val)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access((u16)get_data_segment(), offset);
#endif
@@ -495,7 +495,7 @@ void store_data_byte_abs(
uint offset,
u8 val)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access(segment, offset);
#endif
@@ -518,7 +518,7 @@ void store_data_word_abs(
uint offset,
u16 val)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access(segment, offset);
#endif
@@ -541,7 +541,7 @@ void store_data_long_abs(
uint offset,
u32 val)
{
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (CHECK_DATA_ACCESS())
x86emu_check_data_access(segment, offset);
#endif
diff --git a/util/x86emu/x86emu/fpu.c b/util/x86emu/x86emu/fpu.c
index 85f55c8854a3..86be6e96114f 100644
--- a/util/x86emu/x86emu/fpu.c
+++ b/util/x86emu/x86emu/fpu.c
@@ -50,7 +50,7 @@ void x86emuOp_esc_coprocess_d8(u8 X86EMU_UNUSED(op1))
END_OF_INSTR_NO_TRACE();
}
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
static char *x86emu_fpu_op_d9_tab[] = {
"FLD\tDWORD PTR ", "ESC_D9\t", "FST\tDWORD PTR ", "FSTP\tDWORD PTR ",
@@ -89,7 +89,7 @@ static char *x86emu_fpu_op_d9_tab1[] = {
"FRNDINT", "FSCALE", "ESC_D9", "ESC_D9",
};
-#endif /* DEBUG */
+#endif /* CONFIG_DEBUG */
/* opcode=0xd9 */
void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1))
@@ -100,7 +100,7 @@ void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1))
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (mod != 3) {
DECODE_PRINTINSTR32(x86emu_fpu_op_d9_tab, mod, rh, rl);
} else {
@@ -294,7 +294,7 @@ void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1))
END_OF_INSTR_NO_TRACE();
}
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
char *x86emu_fpu_op_da_tab[] = {
"FIADD\tDWORD PTR ", "FIMUL\tDWORD PTR ", "FICOM\tDWORD PTR ",
@@ -316,7 +316,7 @@ char *x86emu_fpu_op_da_tab[] = {
"ESC_DA ", "ESC_DA ", "ESC_DA ", "ESC_DA ",
};
-#endif /* DEBUG */
+#endif /* CONFIG_DEBUG */
/* opcode=0xda */
void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1))
@@ -384,7 +384,7 @@ void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1))
END_OF_INSTR_NO_TRACE();
}
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
char *x86emu_fpu_op_db_tab[] = {
"FILD\tDWORD PTR ", "ESC_DB\t19", "FIST\tDWORD PTR ", "FISTP\tDWORD PTR ",
@@ -397,7 +397,7 @@ char *x86emu_fpu_op_db_tab[] = {
"ESC_DB\t1C", "FLD\tTBYTE PTR ", "ESC_DB\t1E", "FSTP\tTBYTE PTR ",
};
-#endif /* DEBUG */
+#endif /* CONFIG_DEBUG */
/* opcode=0xdb */
void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
@@ -407,7 +407,7 @@ void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (mod != 3) {
DECODE_PRINTINSTR32(x86emu_fpu_op_db_tab, mod, rh, rl);
} else if (rh == 4) { /* === 11 10 0 nnn */
@@ -428,7 +428,7 @@ void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
} else {
DECODE_PRINTF2("ESC_DB %0x\n", (mod << 6) + (rh << 3) + (rl));
}
-#endif /* DEBUG */
+#endif /* CONFIG_DEBUG */
switch (mod) {
case 0:
destoffset = decode_rm00_address(rl);
@@ -504,7 +504,7 @@ void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
END_OF_INSTR_NO_TRACE();
}
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
char *x86emu_fpu_op_dc_tab[] = {
"FADD\tQWORD PTR ", "FMUL\tQWORD PTR ", "FCOM\tQWORD PTR ",
"FCOMP\tQWORD PTR ",
@@ -524,7 +524,7 @@ char *x86emu_fpu_op_dc_tab[] = {
"FADD\t", "FMUL\t", "FCOM\t", "FCOMP\t",
"FSUBR\t", "FSUB\t", "FDIVR\t", "FDIV\t",
};
-#endif /* DEBUG */
+#endif /* CONFIG_DEBUG */
/* opcode=0xdc */
void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1))
@@ -618,7 +618,7 @@ void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1))
END_OF_INSTR_NO_TRACE();
}
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
static char *x86emu_fpu_op_dd_tab[] = {
"FLD\tQWORD PTR ", "ESC_DD\t29,", "FST\tQWORD PTR ", "FSTP\tQWORD PTR ",
@@ -634,7 +634,7 @@ static char *x86emu_fpu_op_dd_tab[] = {
"ESC_DD\t2C,", "ESC_DD\t2D,", "ESC_DD\t2E,", "ESC_DD\t2F,",
};
-#endif /* DEBUG */
+#endif /* CONFIG_DEBUG */
/* opcode=0xdd */
void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1))
@@ -718,7 +718,7 @@ void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1))
END_OF_INSTR_NO_TRACE();
}
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
static char *x86emu_fpu_op_de_tab[] =
{
@@ -741,7 +741,7 @@ static char *x86emu_fpu_op_de_tab[] =
"FSUBRP\t", "FSUBP\t", "FDIVRP\t", "FDIVP\t",
};
-#endif /* DEBUG */
+#endif /* CONFIG_DEBUG */
/* opcode=0xde */
void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1))
@@ -837,7 +837,7 @@ void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1))
END_OF_INSTR_NO_TRACE();
}
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
static char *x86emu_fpu_op_df_tab[] = {
/* mod == 00 */
@@ -860,7 +860,7 @@ static char *x86emu_fpu_op_df_tab[] = {
"ESC_DF\t3C,", "ESC_DF\t3D,", "ESC_DF\t3E,", "ESC_DF\t3F,"
};
-#endif /* DEBUG */
+#endif /* CONFIG_DEBUG */
/* opcode=0xdf */
void x86emuOp_esc_coprocess_df(u8 X86EMU_UNUSED(op1))
diff --git a/util/x86emu/x86emu/ops.c b/util/x86emu/x86emu/ops.c
index 84a25082184b..a22faf9fd370 100644
--- a/util/x86emu/x86emu/ops.c
+++ b/util/x86emu/x86emu/ops.c
@@ -76,7 +76,7 @@
/* constant arrays to do several instructions in just one function */
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
static char *x86emu_GenOpName[8] = {
"ADD", "OR", "ADC", "SBB", "AND", "SUB", "XOR", "CMP"};
#endif
@@ -157,7 +157,7 @@ static u32 (*opcD1_long_operation[])(u32 s, u8 d) =
sar_long,
};
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
static char *opF6_names[8] =
{ "TEST\t", "", "NOT\t", "NEG\t", "MUL\t", "IMUL\t", "DIV\t", "IDIV\t" };
@@ -1287,7 +1287,7 @@ void x86emuOp_opc80_byte_RM_IMM(u8 X86EMU_UNUSED(op1))
*/
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
@@ -1363,7 +1363,7 @@ void x86emuOp_opc81_word_RM_IMM(u8 X86EMU_UNUSED(op1))
*/
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
@@ -1473,7 +1473,7 @@ void x86emuOp_opc82_byte_RM_IMM(u8 X86EMU_UNUSED(op1))
*/
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
@@ -1547,7 +1547,7 @@ void x86emuOp_opc83_word_RM_IMM(u8 X86EMU_UNUSED(op1))
*/
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
@@ -3129,7 +3129,7 @@ void x86emuOp_opcC0_byte_RM_MEM(u8 X86EMU_UNUSED(op1))
*/
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
@@ -3204,7 +3204,7 @@ void x86emuOp_opcC1_word_RM_MEM(u8 X86EMU_UNUSED(op1))
*/
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
@@ -3681,7 +3681,7 @@ void x86emuOp_opcD0_byte_RM_1(u8 X86EMU_UNUSED(op1))
*/
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
@@ -3752,7 +3752,7 @@ void x86emuOp_opcD1_word_RM_1(u8 X86EMU_UNUSED(op1))
*/
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
@@ -3854,7 +3854,7 @@ void x86emuOp_opcD2_byte_RM_CL(u8 X86EMU_UNUSED(op1))
*/
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
@@ -3927,7 +3927,7 @@ void x86emuOp_opcD3_word_RM_CL(u8 X86EMU_UNUSED(op1))
*/
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
@@ -4930,7 +4930,7 @@ void x86emuOp_opcFE_byte_RM(u8 X86EMU_UNUSED(op1))
/* Yet another special case instruction. */
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
@@ -4996,7 +4996,7 @@ void x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
/* Yet another special case instruction. */
START_OF_INSTR();
FETCH_DECODE_MODRM(mod, rh, rl);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
if (DEBUG_DECODE()) {
/* XXX DECODE_PRINTF may be changed to something more
general, so that it is important to leave the strings
diff --git a/util/x86emu/yabel/biosemu.c b/util/x86emu/yabel/biosemu.c
index a2c678032676..05c360c3ceaf 100644
--- a/util/x86emu/yabel/biosemu.c
+++ b/util/x86emu/yabel/biosemu.c
@@ -70,7 +70,7 @@ biosemu(u8 *biosmem, u32 biosmem_size, struct device * dev, unsigned long rom_ad
{
u8 *rom_image;
int i = 0;
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
debug_flags = 0;//DEBUG_PRINT_INT10 | DEBUG_PNP | DEBUG_INTR | DEBUG_CHECK_VMEM_ACCESS | DEBUG_MEM | DEBUG_IO;
// | DEBUG_CHECK_VMEM_ACCESS | DEBUG_MEM | DEBUG_IO;
// | DEBUG_TRACE_X86EMU | DEBUG_JMP;
@@ -265,7 +265,7 @@ biosemu(u8 *biosmem, u32 biosmem_size, struct device * dev, unsigned long rom_ad
CHECK_DBG(DEBUG_TRACE_X86EMU) {
X86EMU_trace_on();
} else {
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
M.x86.debug |= DEBUG_SAVE_IP_CS_F;
M.x86.debug |= DEBUG_DECODE_F;
M.x86.debug |= DEBUG_DECODE_NOPRINT_F;
@@ -286,7 +286,7 @@ biosemu(u8 *biosmem, u32 biosmem_size, struct device * dev, unsigned long rom_ad
* some boot device status in AX (see PNP BIOS Spec Section 3.3
*/
DEBUG_PRINTF_CS_IP("Option ROM Exit Status: %04x\n", M.x86.R_AX);
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
DEBUG_PRINTF("Exit Status Decode:\n");
if (M.x86.R_AX & 0x100) { // bit 8
DEBUG_PRINTF
diff --git a/util/x86emu/yabel/debug.h b/util/x86emu/yabel/debug.h
index dd088c280120..1ffd42433c2a 100644
--- a/util/x86emu/yabel/debug.h
+++ b/util/x86emu/yabel/debug.h
@@ -73,9 +73,9 @@ static inline void set_ci(void) {};
// set to enable tracing of JMPs in x86emu
#define DEBUG_JMP 0x2000
-//#define DEBUG
-//#undef DEBUG
-#ifdef DEBUG
+//#define CONFIG_DEBUG
+//#undef CONFIG_DEBUG
+#ifdef CONFIG_DEBUG
#define CHECK_DBG(_flag) if (debug_flags & _flag)
@@ -107,7 +107,7 @@ static inline void set_ci(void) {};
#define DEBUG_PRINTF_DISK(_x...)
#define DEBUG_PRINTF_PNP(_x...)
-#endif //DEBUG
+#endif //CONFIG_DEBUG
void dump(u8 * addr, u32 len);
diff --git a/util/x86emu/yabel/device.c b/util/x86emu/yabel/device.c
index adf1b8c3097c..e070a3a5732f 100644
--- a/util/x86emu/yabel/device.c
+++ b/util/x86emu/yabel/device.c
@@ -116,7 +116,7 @@ biosemu_dev_get_addr_info(void)
}
// store last entry index of translate_address_array
taa_last_entry = taa_index - 1;
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
//dump translate_address_array
printf("translate_address_array: \n");
translate_address_t ta;
@@ -199,7 +199,7 @@ biosemu_dev_get_addr_info(void)
}
// store last entry index of translate_address_array
taa_last_entry = taa_index - 1;
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
//dump translate_address_array
printf("translate_address_array: \n");
translate_address_t ta;
@@ -338,7 +338,7 @@ biosemu_dev_check_exprom(unsigned long rom_base_addr)
memcpy(&pci_ds, (void *) (rom_base_addr + pci_ds_offset),
sizeof(pci_ds));
clr_ci();
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
DEBUG_PRINTF("PCI Data Structure @%lx:\n",
rom_base_addr + pci_ds_offset);
dump((void *) &pci_ds, sizeof(pci_ds));
diff --git a/util/x86emu/yabel/mem.c b/util/x86emu/yabel/mem.c
index 4dc5858c363c..86c920b94448 100644
--- a/util/x86emu/yabel/mem.c
+++ b/util/x86emu/yabel/mem.c
@@ -26,7 +26,7 @@
#endif
// define a check for access to certain (virtual) memory regions (interrupt handlers, BIOS Data Area, ...)
-#ifdef DEBUG
+#ifdef CONFIG_DEBUG
static u8 in_check = 0; // to avoid recursion...
u16 ebda_segment;
u32 ebda_size;