Author: stepan Date: 2009-06-30 17:24:03 +0200 (Tue, 30 Jun 2009) New Revision: 1173
Modified: coreboot-v3/util/x86emu/biosemu.c coreboot-v3/util/x86emu/include/x86emu/fpu_regs.h coreboot-v3/util/x86emu/include/x86emu/regs.h coreboot-v3/util/x86emu/include/x86emu/x86emu.h coreboot-v3/util/x86emu/x86_asm.S coreboot-v3/util/x86emu/x86emu/debug.c coreboot-v3/util/x86emu/x86emu/debug.h coreboot-v3/util/x86emu/x86emu/decode.c coreboot-v3/util/x86emu/x86emu/fpu.c coreboot-v3/util/x86emu/x86emu/ops.c coreboot-v3/util/x86emu/yabel/biosemu.c coreboot-v3/util/x86emu/yabel/debug.h coreboot-v3/util/x86emu/yabel/device.c coreboot-v3/util/x86emu/yabel/mem.c Log: commit svn:externals for previous commit (2/2)
Signed-off-by: Stefan Reinauer stepan@coresystems.de Acked-by: Ronald G. Minnich rminnich@gmail.com
Modified: coreboot-v3/util/x86emu/biosemu.c =================================================================== --- coreboot-v3/util/x86emu/biosemu.c 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/biosemu.c 2009-06-30 15:24:03 UTC (rev 1173) @@ -102,7 +102,7 @@ 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 @@
val = inw(port);
-#ifdef DEBUG +#ifdef CONFIG_DEBUG printk("inw(0x%04x) = 0x%04x\n", port, val); #endif return val; @@ -128,7 +128,7 @@
val = inl(port);
-#ifdef DEBUG +#ifdef CONFIG_DEBUG printk("inl(0x%04x) = 0x%08x\n", port, val); #endif return val; @@ -136,7 +136,7 @@
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_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_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 @@ pushw(X86_SS); pushw(X86_SP + 2);
-#ifdef DEBUG +#ifdef CONFIG_DEBUG //X86EMU_trace_on(); #endif
Modified: coreboot-v3/util/x86emu/include/x86emu/fpu_regs.h =================================================================== --- coreboot-v3/util/x86emu/include/x86emu/fpu_regs.h 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/include/x86emu/fpu_regs.h 2009-06-30 15:24:03 UTC (rev 1173) @@ -102,7 +102,7 @@
#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) \
Modified: coreboot-v3/util/x86emu/include/x86emu/regs.h =================================================================== --- coreboot-v3/util/x86emu/include/x86emu/regs.h 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/include/x86emu/regs.h 2009-06-30 15:24:03 UTC (rev 1173) @@ -279,7 +279,7 @@ 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;
Modified: coreboot-v3/util/x86emu/include/x86emu/x86emu.h =================================================================== --- coreboot-v3/util/x86emu/include/x86emu/x86emu.h 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/include/x86emu/x86emu.h 2009-06-30 15:24:03 UTC (rev 1173) @@ -163,7 +163,7 @@ 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();
Modified: coreboot-v3/util/x86emu/x86_asm.S =================================================================== --- coreboot-v3/util/x86emu/x86_asm.S 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/x86_asm.S 2009-06-30 15:24:03 UTC (rev 1173) @@ -168,7 +168,7 @@ 1: .code16 /* 16 bit code from here on... */
- // DEBUG + // CONFIG_DEBUG movb $0xec, %al outb %al, $0x80
Modified: coreboot-v3/util/x86emu/x86emu/debug.c =================================================================== --- coreboot-v3/util/x86emu/x86emu/debug.c 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/x86emu/debug.c 2009-06-30 15:24:03 UTC (rev 1173) @@ -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 @@ * 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 @@ #endif }
-#endif /* DEBUG */ +#endif /* CONFIG_DEBUG */
void x86emu_dump_regs (void) {
Modified: coreboot-v3/util/x86emu/x86emu/debug.h =================================================================== --- coreboot-v3/util/x86emu/x86emu/debug.h 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/x86emu/debug.h 2009-06-30 15:24:03 UTC (rev 1173) @@ -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)
Modified: coreboot-v3/util/x86emu/x86emu/decode.c =================================================================== --- coreboot-v3/util/x86emu/x86emu/decode.c 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/x86emu/decode.c 2009-06-30 15:24:03 UTC (rev 1173) @@ -285,7 +285,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ uint segment, uint offset) { -#ifdef DEBUG +#ifdef CONFIG_DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif @@ -385,7 +385,7 @@ uint segment, uint offset) { -#ifdef DEBUG +#ifdef CONFIG_DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif @@ -406,7 +406,7 @@ uint segment, uint offset) { -#ifdef DEBUG +#ifdef CONFIG_DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif @@ -428,7 +428,7 @@ 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 @@ 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 @@ 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 @@ uint offset, u8 val) { -#ifdef DEBUG +#ifdef CONFIG_DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif @@ -518,7 +518,7 @@ uint offset, u16 val) { -#ifdef DEBUG +#ifdef CONFIG_DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif @@ -541,7 +541,7 @@ uint offset, u32 val) { -#ifdef DEBUG +#ifdef CONFIG_DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif
Modified: coreboot-v3/util/x86emu/x86emu/fpu.c =================================================================== --- coreboot-v3/util/x86emu/x86emu/fpu.c 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/x86emu/fpu.c 2009-06-30 15:24:03 UTC (rev 1173) @@ -50,7 +50,7 @@ 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 @@ "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 @@
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 @@ 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 @@ "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 @@ 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 @@ "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 @@
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 @@ } 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 @@ 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 @@ "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 @@ 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 @@ "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 @@ END_OF_INSTR_NO_TRACE(); }
-#ifdef DEBUG +#ifdef CONFIG_DEBUG
static char *x86emu_fpu_op_de_tab[] = { @@ -741,7 +741,7 @@ "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 @@ END_OF_INSTR_NO_TRACE(); }
-#ifdef DEBUG +#ifdef CONFIG_DEBUG
static char *x86emu_fpu_op_df_tab[] = { /* mod == 00 */ @@ -860,7 +860,7 @@ "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))
Modified: coreboot-v3/util/x86emu/x86emu/ops.c =================================================================== --- coreboot-v3/util/x86emu/x86emu/ops.c 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/x86emu/ops.c 2009-06-30 15:24:03 UTC (rev 1173) @@ -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 @@ 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 @@ */ 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 @@ */ 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 @@ */ 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 @@ */ 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 @@ */ 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 @@ */ 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 @@ */ 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 @@ */ 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 @@ */ 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 @@ */ 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 @@ /* 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 @@ /* 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
Modified: coreboot-v3/util/x86emu/yabel/biosemu.c =================================================================== --- coreboot-v3/util/x86emu/yabel/biosemu.c 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/yabel/biosemu.c 2009-06-30 15:24:03 UTC (rev 1173) @@ -70,7 +70,7 @@ { 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 @@ 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 @@ * 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
Modified: coreboot-v3/util/x86emu/yabel/debug.h =================================================================== --- coreboot-v3/util/x86emu/yabel/debug.h 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/yabel/debug.h 2009-06-30 15:24:03 UTC (rev 1173) @@ -73,9 +73,9 @@ // 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 @@ #define DEBUG_PRINTF_DISK(_x...) #define DEBUG_PRINTF_PNP(_x...)
-#endif //DEBUG +#endif //CONFIG_DEBUG
void dump(u8 * addr, u32 len);
Modified: coreboot-v3/util/x86emu/yabel/device.c =================================================================== --- coreboot-v3/util/x86emu/yabel/device.c 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/yabel/device.c 2009-06-30 15:24:03 UTC (rev 1173) @@ -116,7 +116,7 @@ } // 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 @@ } // 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 @@ 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));
Modified: coreboot-v3/util/x86emu/yabel/mem.c =================================================================== --- coreboot-v3/util/x86emu/yabel/mem.c 2009-06-09 11:14:26 UTC (rev 1172) +++ coreboot-v3/util/x86emu/yabel/mem.c 2009-06-30 15:24:03 UTC (rev 1173) @@ -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;