diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/x86emu/biosemu.c | 14 | ||||
-rw-r--r-- | util/x86emu/include/x86emu/fpu_regs.h | 2 | ||||
-rw-r--r-- | util/x86emu/include/x86emu/regs.h | 2 | ||||
-rw-r--r-- | util/x86emu/include/x86emu/x86emu.h | 8 | ||||
-rw-r--r-- | util/x86emu/x86_asm.S | 2 | ||||
-rw-r--r-- | util/x86emu/x86emu/debug.c | 6 | ||||
-rw-r--r-- | util/x86emu/x86emu/debug.h | 20 | ||||
-rw-r--r-- | util/x86emu/x86emu/decode.c | 26 | ||||
-rw-r--r-- | util/x86emu/x86emu/fpu.c | 34 | ||||
-rw-r--r-- | util/x86emu/x86emu/ops.c | 28 | ||||
-rw-r--r-- | util/x86emu/yabel/biosemu.c | 6 | ||||
-rw-r--r-- | util/x86emu/yabel/debug.h | 8 | ||||
-rw-r--r-- | util/x86emu/yabel/device.c | 6 | ||||
-rw-r--r-- | util/x86emu/yabel/mem.c | 2 |
14 files changed, 83 insertions, 81 deletions
diff --git a/util/x86emu/biosemu.c b/util/x86emu/biosemu.c index b847bb0109..7c5e3d766f 100644 --- a/util/x86emu/biosemu.c +++ b/util/x86emu/biosemu.c @@ -90,7 +90,7 @@ static u8 biosemu_inb(u16 port) u8 val; val = inb(port); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (port != 0x40) printk("inb(0x%04x) = 0x%02x\n", port, val); #endif @@ -104,7 +104,7 @@ static u16 biosemu_inw(u16 port) val = inw(port); -#ifdef CONFIG_DEBUG +#ifdef DEBUG printk("inw(0x%04x) = 0x%04x\n", port, val); #endif return val; @@ -116,7 +116,7 @@ static u32 biosemu_inl(u16 port) val = inl(port); -#ifdef CONFIG_DEBUG +#ifdef DEBUG printk("inl(0x%04x) = 0x%08x\n", port, val); #endif return val; @@ -124,7 +124,7 @@ static u32 biosemu_inl(u16 port) static void biosemu_outb(u16 port, u8 val) { -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (port != 0x43) printk("outb(0x%02x, 0x%04x)\n", val, port); #endif @@ -133,7 +133,7 @@ static void biosemu_outb(u16 port, u8 val) static void biosemu_outw(u16 port, u16 val) { -#ifdef CONFIG_DEBUG +#ifdef DEBUG printk("outw(0x%04x, 0x%04x)\n", val, port); #endif outw(val, port); @@ -141,7 +141,7 @@ static void biosemu_outw(u16 port, u16 val) static void biosemu_outl(u16 port, u32 val) { -#ifdef CONFIG_DEBUG +#ifdef DEBUG printk("outl(0x%08x, 0x%04x)\n", val, port); #endif outl(val, port); @@ -556,7 +556,7 @@ void run_bios(struct device * dev, unsigned long addr) push_word(X86_SS); push_word(X86_SP + 2); -#ifdef CONFIG_DEBUG +#ifdef DEBUG //X86EMU_trace_on(); #endif diff --git a/util/x86emu/include/x86emu/fpu_regs.h b/util/x86emu/include/x86emu/fpu_regs.h index efc13ef2be..56e9a04d75 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 CONFIG_DEBUG +#ifdef 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 4b368e4622..df5c6b2d90 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 CONFIG_DEBUG +#ifdef 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 60acfe763c..22e08a9542 100644 --- a/util/x86emu/include/x86emu/x86emu.h +++ b/util/x86emu/include/x86emu/x86emu.h @@ -47,8 +47,10 @@ #include <console/console.h> #undef printk #define printk(x...) do_printk(BIOS_DEBUG, x) -#if defined(CONFIG_DEBUG) && (CONFIG_DEBUG == 0) -#undef CONFIG_DEBUG +#if defined(CONFIG_YABEL_DEBUG_FLAGS) && (CONFIG_YABEL_DEBUG_FLAGS != 0) +#define DEBUG +#else +#undef DEBUG #endif #ifdef SCITECH @@ -164,7 +166,7 @@ void X86EMU_setMemBase(void *base, size_t size); void X86EMU_exec(void); void X86EMU_halt_sys(void); -#ifdef CONFIG_DEBUG +#ifdef DEBUG #define HALT_SYS() \ printk("halt_sys: in %s\n", __func__); \ X86EMU_halt_sys(); diff --git a/util/x86emu/x86_asm.S b/util/x86emu/x86_asm.S index 5e2518c695..616aa8675f 100644 --- a/util/x86emu/x86_asm.S +++ b/util/x86emu/x86_asm.S @@ -170,7 +170,7 @@ __run_interrupt = RELOCATED(.) 1: .code16 /* 16 bit code from here on... */ - // CONFIG_DEBUG + // DEBUG movb $0xec, %al outb %al, $0x80 diff --git a/util/x86emu/x86emu/debug.c b/util/x86emu/x86emu/debug.c index c884462567..026c03fddd 100644 --- a/util/x86emu/x86emu/debug.c +++ b/util/x86emu/x86emu/debug.c @@ -42,7 +42,7 @@ /*----------------------------- Implementation ----------------------------*/ -#ifdef CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG is not defined to + * SINGLE_STEP(r,m); which disappear if 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 /* CONFIG_DEBUG */ +#endif /* DEBUG */ void x86emu_dump_regs (void) { diff --git a/util/x86emu/x86emu/debug.h b/util/x86emu/x86emu/debug.h index 4e95e34c38..f6bab3cf78 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 CONFIG_DEBUG 0 -//#undef CONFIG_DEBUG +//#define DEBUG 0 +//#undef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef DEBUG # define DECODE_PRINTF(x) if (DEBUG_DECODE()) \ x86emu_decode_printf(x) @@ -136,7 +136,7 @@ # define SAVE_IP_CS(x,y) #endif -#ifdef CONFIG_DEBUG +#ifdef DEBUG #define TRACE_REGS() \ if (DEBUG_DISASSEMBLE()) { \ x86emu_just_disassemble(); \ @@ -147,7 +147,7 @@ # define TRACE_REGS() #endif -#ifdef CONFIG_DEBUG +#ifdef DEBUG # define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step() #else # define SINGLE_STEP() @@ -157,7 +157,7 @@ TRACE_REGS(); \ SINGLE_STEP() -#ifdef CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef DEBUG #define DB(x) x #else #define DB(x) diff --git a/util/x86emu/x86emu/decode.c b/util/x86emu/x86emu/decode.c index 0d878b9c5f..2cd62348d7 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 86be6e9611..85f55c8854 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 CONFIG_DEBUG +#ifdef 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 /* CONFIG_DEBUG */ +#endif /* 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef 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 /* CONFIG_DEBUG */ +#endif /* 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 CONFIG_DEBUG +#ifdef 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 /* CONFIG_DEBUG */ +#endif /* 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 CONFIG_DEBUG +#ifdef 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 /* CONFIG_DEBUG */ +#endif /* 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 CONFIG_DEBUG +#ifdef 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 /* CONFIG_DEBUG */ +#endif /* 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 CONFIG_DEBUG +#ifdef 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 /* CONFIG_DEBUG */ +#endif /* 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 CONFIG_DEBUG +#ifdef 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 /* CONFIG_DEBUG */ +#endif /* 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 CONFIG_DEBUG +#ifdef 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 /* CONFIG_DEBUG */ +#endif /* 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 71a155f349..fd7ad32d22 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 CONFIG_DEBUG +#ifdef 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 CONFIG_DEBUG +#ifdef DEBUG static char *opF6_names[8] = { "TEST\t", "", "NOT\t", "NEG\t", "MUL\t", "IMUL\t", "DIV\t", "IDIV\t" }; @@ -1285,7 +1285,7 @@ static void x86emuOp_opc80_byte_RM_IMM(u8 X86EMU_UNUSED(op1)) */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings @@ -1361,7 +1361,7 @@ static void x86emuOp_opc81_word_RM_IMM(u8 X86EMU_UNUSED(op1)) */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings @@ -1471,7 +1471,7 @@ static void x86emuOp_opc82_byte_RM_IMM(u8 X86EMU_UNUSED(op1)) */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings @@ -1545,7 +1545,7 @@ static void x86emuOp_opc83_word_RM_IMM(u8 X86EMU_UNUSED(op1)) */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings @@ -3127,7 +3127,7 @@ static void x86emuOp_opcC0_byte_RM_MEM(u8 X86EMU_UNUSED(op1)) */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings @@ -3202,7 +3202,7 @@ static void x86emuOp_opcC1_word_RM_MEM(u8 X86EMU_UNUSED(op1)) */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings @@ -3679,7 +3679,7 @@ static void x86emuOp_opcD0_byte_RM_1(u8 X86EMU_UNUSED(op1)) */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings @@ -3750,7 +3750,7 @@ static void x86emuOp_opcD1_word_RM_1(u8 X86EMU_UNUSED(op1)) */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings @@ -3852,7 +3852,7 @@ static void x86emuOp_opcD2_byte_RM_CL(u8 X86EMU_UNUSED(op1)) */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings @@ -3925,7 +3925,7 @@ static void x86emuOp_opcD3_word_RM_CL(u8 X86EMU_UNUSED(op1)) */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings @@ -4928,7 +4928,7 @@ static void x86emuOp_opcFE_byte_RM(u8 X86EMU_UNUSED(op1)) /* Yet another special case instruction. */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings @@ -4994,7 +4994,7 @@ static void x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1)) /* Yet another special case instruction. */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); -#ifdef CONFIG_DEBUG +#ifdef 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 096af16688..df202814a4 100644 --- a/util/x86emu/yabel/biosemu.c +++ b/util/x86emu/yabel/biosemu.c @@ -57,7 +57,7 @@ biosemu(u8 *biosmem, u32 biosmem_size, struct device * dev, unsigned long rom_ad { u8 *rom_image; int i = 0; -#ifdef CONFIG_DEBUG +#ifdef 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; @@ -252,7 +252,7 @@ biosemu(u8 *biosmem, u32 biosmem_size, struct device * dev, unsigned long rom_ad CHECK_DBG(DEBUG_TRACE_X86EMU) { X86EMU_trace_on(); } else { -#ifdef CONFIG_DEBUG +#ifdef DEBUG M.x86.debug |= DEBUG_SAVE_IP_CS_F; M.x86.debug |= DEBUG_DECODE_F; M.x86.debug |= DEBUG_DECODE_NOPRINT_F; @@ -273,7 +273,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 CONFIG_DEBUG +#ifdef 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 484a0f7ade..92e78782c3 100644 --- a/util/x86emu/yabel/debug.h +++ b/util/x86emu/yabel/debug.h @@ -69,9 +69,9 @@ static inline void set_ci(void) {}; // set to enable tracing of JMPs in x86emu #define DEBUG_JMP 0x2000 -//#define CONFIG_DEBUG -//#undef CONFIG_DEBUG -#ifdef CONFIG_DEBUG +//#define DEBUG +//#undef DEBUG +#ifdef DEBUG #define CHECK_DBG(_flag) if (debug_flags & _flag) @@ -103,7 +103,7 @@ static inline void set_ci(void) {}; #define DEBUG_PRINTF_DISK(_x...) #define DEBUG_PRINTF_PNP(_x...) -#endif //CONFIG_DEBUG +#endif //DEBUG void dump(u8 * addr, u32 len); diff --git a/util/x86emu/yabel/device.c b/util/x86emu/yabel/device.c index 60bad5c122..929e97779b 100644 --- a/util/x86emu/yabel/device.c +++ b/util/x86emu/yabel/device.c @@ -112,7 +112,7 @@ biosemu_dev_get_addr_info(void) } // store last entry index of translate_address_array taa_last_entry = taa_index - 1; -#ifdef CONFIG_DEBUG +#ifdef DEBUG //dump translate_address_array printf("translate_address_array: \n"); translate_address_t ta; @@ -195,7 +195,7 @@ biosemu_dev_get_addr_info(void) } // store last entry index of translate_address_array taa_last_entry = taa_index - 1; -#ifdef CONFIG_DEBUG +#ifdef DEBUG //dump translate_address_array printf("translate_address_array: \n"); translate_address_t ta; @@ -334,7 +334,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 CONFIG_DEBUG +#ifdef 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 339e59f61e..294e76db1a 100644 --- a/util/x86emu/yabel/mem.c +++ b/util/x86emu/yabel/mem.c @@ -19,7 +19,7 @@ #include "compat/time.h" // define a check for access to certain (virtual) memory regions (interrupt handlers, BIOS Data Area, ...) -#ifdef CONFIG_DEBUG +#ifdef DEBUG static u8 in_check = 0; // to avoid recursion... u16 ebda_segment; u32 ebda_size; |