Changeset 5131
- Timestamp:
- Feb 19, 2010 8:08:11 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 14 edited
-
src/arch/i386/init (deleted)
-
util/x86emu/biosemu.c (modified) (7 diffs)
-
util/x86emu/include/x86emu/fpu_regs.h (modified) (1 diff)
-
util/x86emu/include/x86emu/regs.h (modified) (1 diff)
-
util/x86emu/include/x86emu/x86emu.h (modified) (2 diffs)
-
util/x86emu/x86_asm.S (modified) (1 diff)
-
util/x86emu/x86emu/debug.c (modified) (3 diffs)
-
util/x86emu/x86emu/debug.h (modified) (9 diffs)
-
util/x86emu/x86emu/decode.c (modified) (13 diffs)
-
util/x86emu/x86emu/fpu.c (modified) (17 diffs)
-
util/x86emu/x86emu/ops.c (modified) (14 diffs)
-
util/x86emu/yabel/biosemu.c (modified) (3 diffs)
-
util/x86emu/yabel/debug.h (modified) (2 diffs)
-
util/x86emu/yabel/device.c (modified) (3 diffs)
-
util/x86emu/yabel/mem.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/util/x86emu/biosemu.c
r5040 r5131 91 91 92 92 val = inb(port); 93 #ifdef CONFIG_DEBUG93 #ifdef DEBUG 94 94 if (port != 0x40) 95 95 printk("inb(0x%04x) = 0x%02x\n", port, val); … … 105 105 val = inw(port); 106 106 107 #ifdef CONFIG_DEBUG107 #ifdef DEBUG 108 108 printk("inw(0x%04x) = 0x%04x\n", port, val); 109 109 #endif … … 117 117 val = inl(port); 118 118 119 #ifdef CONFIG_DEBUG119 #ifdef DEBUG 120 120 printk("inl(0x%04x) = 0x%08x\n", port, val); 121 121 #endif … … 125 125 static void biosemu_outb(u16 port, u8 val) 126 126 { 127 #ifdef CONFIG_DEBUG127 #ifdef DEBUG 128 128 if (port != 0x43) 129 129 printk("outb(0x%02x, 0x%04x)\n", val, port); … … 134 134 static void biosemu_outw(u16 port, u16 val) 135 135 { 136 #ifdef CONFIG_DEBUG136 #ifdef DEBUG 137 137 printk("outw(0x%04x, 0x%04x)\n", val, port); 138 138 #endif … … 142 142 static void biosemu_outl(u16 port, u32 val) 143 143 { 144 #ifdef CONFIG_DEBUG144 #ifdef DEBUG 145 145 printk("outl(0x%08x, 0x%04x)\n", val, port); 146 146 #endif … … 557 557 push_word(X86_SP + 2); 558 558 559 #ifdef CONFIG_DEBUG559 #ifdef DEBUG 560 560 //X86EMU_trace_on(); 561 561 #endif -
trunk/util/x86emu/include/x86emu/fpu_regs.h
r4532 r5131 103 103 #endif /* X86_FPU_SUPPORT */ 104 104 105 #ifdef CONFIG_DEBUG105 #ifdef DEBUG 106 106 # define DECODE_PRINTINSTR32(t,mod,rh,rl) \ 107 107 DECODE_PRINTF(t[(mod<<3)+(rh)]); -
trunk/util/x86emu/include/x86emu/regs.h
r4532 r5131 280 280 volatile int intr; /* mask of pending interrupts */ 281 281 volatile int debug; 282 #ifdef CONFIG_DEBUG282 #ifdef DEBUG 283 283 int check; 284 284 u16 saved_ip; -
trunk/util/x86emu/include/x86emu/x86emu.h
r5040 r5131 48 48 #undef printk 49 49 #define printk(x...) do_printk(BIOS_DEBUG, x) 50 #if defined(CONFIG_DEBUG) && (CONFIG_DEBUG == 0) 51 #undef CONFIG_DEBUG 50 #if defined(CONFIG_YABEL_DEBUG_FLAGS) && (CONFIG_YABEL_DEBUG_FLAGS != 0) 51 #define DEBUG 52 #else 53 #undef DEBUG 52 54 #endif 53 55 … … 165 167 void X86EMU_halt_sys(void); 166 168 167 #ifdef CONFIG_DEBUG169 #ifdef DEBUG 168 170 #define HALT_SYS() \ 169 171 printk("halt_sys: in %s\n", __func__); \ -
trunk/util/x86emu/x86_asm.S
r4911 r5131 171 171 .code16 /* 16 bit code from here on... */ 172 172 173 // CONFIG_DEBUG173 // DEBUG 174 174 movb $0xec, %al 175 175 outb %al, $0x80 -
trunk/util/x86emu/x86emu/debug.c
r4532 r5131 43 43 /*----------------------------- Implementation ----------------------------*/ 44 44 45 #ifdef CONFIG_DEBUG45 #ifdef DEBUG 46 46 47 47 static void print_encoded_bytes (u16 s, u16 o); … … 95 95 * of the register struct. All the major opcodes, once fully 96 96 * decoded, have the following two steps: TRACE_REGS(r,m); 97 * SINGLE_STEP(r,m); which disappear if CONFIG_DEBUG is not defined to97 * SINGLE_STEP(r,m); which disappear if DEBUG is not defined to 98 98 * the preprocessor. The TRACE_REGS macro expands to: 99 99 * … … 365 365 } 366 366 367 #endif /* CONFIG_DEBUG */367 #endif /* DEBUG */ 368 368 369 369 void x86emu_dump_regs (void) -
trunk/util/x86emu/x86emu/debug.h
r4532 r5131 41 41 #define __X86EMU_DEBUG_H 42 42 43 //#define CONFIG_DEBUG 044 //#undef CONFIG_DEBUG43 //#define DEBUG 0 44 //#undef DEBUG 45 45 /*---------------------- Macros and type definitions ----------------------*/ 46 46 … … 52 52 #define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset*/ 53 53 54 #ifdef CONFIG_DEBUG54 #ifdef DEBUG 55 55 # define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F) 56 56 # define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F) … … 64 64 #endif 65 65 66 #ifdef CONFIG_DEBUG66 #ifdef DEBUG 67 67 # define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F) 68 68 # define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F) … … 107 107 #endif 108 108 109 #ifdef CONFIG_DEBUG109 #ifdef DEBUG 110 110 111 111 # define DECODE_PRINTF(x) if (DEBUG_DECODE()) \ … … 137 137 #endif 138 138 139 #ifdef CONFIG_DEBUG139 #ifdef DEBUG 140 140 #define TRACE_REGS() \ 141 141 if (DEBUG_DISASSEMBLE()) { \ … … 148 148 #endif 149 149 150 #ifdef CONFIG_DEBUG150 #ifdef DEBUG 151 151 # define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step() 152 152 #else … … 158 158 SINGLE_STEP() 159 159 160 #ifdef CONFIG_DEBUG160 #ifdef DEBUG 161 161 # define START_OF_INSTR() 162 162 # define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr(); … … 168 168 #endif 169 169 170 #ifdef CONFIG_DEBUG170 #ifdef DEBUG 171 171 # define CALL_TRACE(u,v,w,x,s) \ 172 172 if (DEBUG_TRACECALLREGS()) \ … … 190 190 #endif 191 191 192 #ifdef CONFIG_DEBUG192 #ifdef DEBUG 193 193 #define DB(x) x 194 194 #else -
trunk/util/x86emu/x86emu/decode.c
r4906 r5131 286 286 return M.x86.R_SS; 287 287 default: 288 #ifdef CONFIG_DEBUG288 #ifdef DEBUG 289 289 printk("error: should not happen: multiple overrides.\n"); 290 290 #endif … … 306 306 uint offset) 307 307 { 308 #ifdef CONFIG_DEBUG308 #ifdef DEBUG 309 309 if (CHECK_DATA_ACCESS()) 310 310 x86emu_check_data_access((u16)get_data_segment(), offset); … … 325 325 uint offset) 326 326 { 327 #ifdef CONFIG_DEBUG327 #ifdef DEBUG 328 328 if (CHECK_DATA_ACCESS()) 329 329 x86emu_check_data_access((u16)get_data_segment(), offset); … … 344 344 uint offset) 345 345 { 346 #ifdef CONFIG_DEBUG346 #ifdef DEBUG 347 347 if (CHECK_DATA_ACCESS()) 348 348 x86emu_check_data_access((u16)get_data_segment(), offset); … … 365 365 uint offset) 366 366 { 367 #ifdef CONFIG_DEBUG367 #ifdef DEBUG 368 368 if (CHECK_DATA_ACCESS()) 369 369 x86emu_check_data_access(segment, offset); … … 386 386 uint offset) 387 387 { 388 #ifdef CONFIG_DEBUG388 #ifdef DEBUG 389 389 if (CHECK_DATA_ACCESS()) 390 390 x86emu_check_data_access(segment, offset); … … 407 407 uint offset) 408 408 { 409 #ifdef CONFIG_DEBUG409 #ifdef DEBUG 410 410 if (CHECK_DATA_ACCESS()) 411 411 x86emu_check_data_access(segment, offset); … … 429 429 u8 val) 430 430 { 431 #ifdef CONFIG_DEBUG431 #ifdef DEBUG 432 432 if (CHECK_DATA_ACCESS()) 433 433 x86emu_check_data_access((u16)get_data_segment(), offset); … … 451 451 u16 val) 452 452 { 453 #ifdef CONFIG_DEBUG453 #ifdef DEBUG 454 454 if (CHECK_DATA_ACCESS()) 455 455 x86emu_check_data_access((u16)get_data_segment(), offset); … … 473 473 u32 val) 474 474 { 475 #ifdef CONFIG_DEBUG475 #ifdef DEBUG 476 476 if (CHECK_DATA_ACCESS()) 477 477 x86emu_check_data_access((u16)get_data_segment(), offset); … … 496 496 u8 val) 497 497 { 498 #ifdef CONFIG_DEBUG498 #ifdef DEBUG 499 499 if (CHECK_DATA_ACCESS()) 500 500 x86emu_check_data_access(segment, offset); … … 519 519 u16 val) 520 520 { 521 #ifdef CONFIG_DEBUG521 #ifdef DEBUG 522 522 if (CHECK_DATA_ACCESS()) 523 523 x86emu_check_data_access(segment, offset); … … 542 542 u32 val) 543 543 { 544 #ifdef CONFIG_DEBUG544 #ifdef DEBUG 545 545 if (CHECK_DATA_ACCESS()) 546 546 x86emu_check_data_access(segment, offset); -
trunk/util/x86emu/x86emu/fpu.c
r4532 r5131 51 51 } 52 52 53 #ifdef CONFIG_DEBUG53 #ifdef DEBUG 54 54 55 55 static char *x86emu_fpu_op_d9_tab[] = { … … 90 90 }; 91 91 92 #endif /* CONFIG_DEBUG */92 #endif /* DEBUG */ 93 93 94 94 /* opcode=0xd9 */ … … 101 101 START_OF_INSTR(); 102 102 FETCH_DECODE_MODRM(mod, rh, rl); 103 #ifdef CONFIG_DEBUG103 #ifdef DEBUG 104 104 if (mod != 3) { 105 105 DECODE_PRINTINSTR32(x86emu_fpu_op_d9_tab, mod, rh, rl); … … 295 295 } 296 296 297 #ifdef CONFIG_DEBUG297 #ifdef DEBUG 298 298 299 299 char *x86emu_fpu_op_da_tab[] = { … … 317 317 }; 318 318 319 #endif /* CONFIG_DEBUG */319 #endif /* DEBUG */ 320 320 321 321 /* opcode=0xda */ … … 385 385 } 386 386 387 #ifdef CONFIG_DEBUG387 #ifdef DEBUG 388 388 389 389 char *x86emu_fpu_op_db_tab[] = { … … 398 398 }; 399 399 400 #endif /* CONFIG_DEBUG */400 #endif /* DEBUG */ 401 401 402 402 /* opcode=0xdb */ … … 408 408 START_OF_INSTR(); 409 409 FETCH_DECODE_MODRM(mod, rh, rl); 410 #ifdef CONFIG_DEBUG410 #ifdef DEBUG 411 411 if (mod != 3) { 412 412 DECODE_PRINTINSTR32(x86emu_fpu_op_db_tab, mod, rh, rl); … … 429 429 DECODE_PRINTF2("ESC_DB %0x\n", (mod << 6) + (rh << 3) + (rl)); 430 430 } 431 #endif /* CONFIG_DEBUG */431 #endif /* DEBUG */ 432 432 switch (mod) { 433 433 case 0: … … 505 505 } 506 506 507 #ifdef CONFIG_DEBUG507 #ifdef DEBUG 508 508 char *x86emu_fpu_op_dc_tab[] = { 509 509 "FADD\tQWORD PTR ", "FMUL\tQWORD PTR ", "FCOM\tQWORD PTR ", … … 525 525 "FSUBR\t", "FSUB\t", "FDIVR\t", "FDIV\t", 526 526 }; 527 #endif /* CONFIG_DEBUG */527 #endif /* DEBUG */ 528 528 529 529 /* opcode=0xdc */ … … 619 619 } 620 620 621 #ifdef CONFIG_DEBUG621 #ifdef DEBUG 622 622 623 623 static char *x86emu_fpu_op_dd_tab[] = { … … 635 635 }; 636 636 637 #endif /* CONFIG_DEBUG */637 #endif /* DEBUG */ 638 638 639 639 /* opcode=0xdd */ … … 719 719 } 720 720 721 #ifdef CONFIG_DEBUG721 #ifdef DEBUG 722 722 723 723 static char *x86emu_fpu_op_de_tab[] = … … 742 742 }; 743 743 744 #endif /* CONFIG_DEBUG */744 #endif /* DEBUG */ 745 745 746 746 /* opcode=0xde */ … … 838 838 } 839 839 840 #ifdef CONFIG_DEBUG840 #ifdef DEBUG 841 841 842 842 static char *x86emu_fpu_op_df_tab[] = { … … 861 861 }; 862 862 863 #endif /* CONFIG_DEBUG */863 #endif /* DEBUG */ 864 864 865 865 /* opcode=0xdf */ -
trunk/util/x86emu/x86emu/ops.c
r4906 r5131 77 77 /* constant arrays to do several instructions in just one function */ 78 78 79 #ifdef CONFIG_DEBUG79 #ifdef DEBUG 80 80 static char *x86emu_GenOpName[8] = { 81 81 "ADD", "OR", "ADC", "SBB", "AND", "SUB", "XOR", "CMP"}; … … 158 158 }; 159 159 160 #ifdef CONFIG_DEBUG160 #ifdef DEBUG 161 161 162 162 static char *opF6_names[8] = … … 1286 1286 START_OF_INSTR(); 1287 1287 FETCH_DECODE_MODRM(mod, rh, rl); 1288 #ifdef CONFIG_DEBUG1288 #ifdef DEBUG 1289 1289 if (DEBUG_DECODE()) { 1290 1290 /* XXX DECODE_PRINTF may be changed to something more … … 1362 1362 START_OF_INSTR(); 1363 1363 FETCH_DECODE_MODRM(mod, rh, rl); 1364 #ifdef CONFIG_DEBUG1364 #ifdef DEBUG 1365 1365 if (DEBUG_DECODE()) { 1366 1366 /* XXX DECODE_PRINTF may be changed to something more … … 1472 1472 START_OF_INSTR(); 1473 1473 FETCH_DECODE_MODRM(mod, rh, rl); 1474 #ifdef CONFIG_DEBUG1474 #ifdef DEBUG 1475 1475 if (DEBUG_DECODE()) { 1476 1476 /* XXX DECODE_PRINTF may be changed to something more … … 1546 1546 START_OF_INSTR(); 1547 1547 FETCH_DECODE_MODRM(mod, rh, rl); 1548 #ifdef CONFIG_DEBUG1548 #ifdef DEBUG 1549 1549 if (DEBUG_DECODE()) { 1550 1550 /* XXX DECODE_PRINTF may be changed to something more … … 3128 3128 START_OF_INSTR(); 3129 3129 FETCH_DECODE_MODRM(mod, rh, rl); 3130 #ifdef CONFIG_DEBUG3130 #ifdef DEBUG 3131 3131 if (DEBUG_DECODE()) { 3132 3132 /* XXX DECODE_PRINTF may be changed to something more … … 3203 3203 START_OF_INSTR(); 3204 3204 FETCH_DECODE_MODRM(mod, rh, rl); 3205 #ifdef CONFIG_DEBUG3205 #ifdef DEBUG 3206 3206 if (DEBUG_DECODE()) { 3207 3207 /* XXX DECODE_PRINTF may be changed to something more … … 3680 3680 START_OF_INSTR(); 3681 3681 FETCH_DECODE_MODRM(mod, rh, rl); 3682 #ifdef CONFIG_DEBUG3682 #ifdef DEBUG 3683 3683 if (DEBUG_DECODE()) { 3684 3684 /* XXX DECODE_PRINTF may be changed to something more … … 3751 3751 START_OF_INSTR(); 3752 3752 FETCH_DECODE_MODRM(mod, rh, rl); 3753 #ifdef CONFIG_DEBUG3753 #ifdef DEBUG 3754 3754 if (DEBUG_DECODE()) { 3755 3755 /* XXX DECODE_PRINTF may be changed to something more … … 3853 3853 START_OF_INSTR(); 3854 3854 FETCH_DECODE_MODRM(mod, rh, rl); 3855 #ifdef CONFIG_DEBUG3855 #ifdef DEBUG 3856 3856 if (DEBUG_DECODE()) { 3857 3857 /* XXX DECODE_PRINTF may be changed to something more … … 3926 3926 START_OF_INSTR(); 3927 3927 FETCH_DECODE_MODRM(mod, rh, rl); 3928 #ifdef CONFIG_DEBUG3928 #ifdef DEBUG 3929 3929 if (DEBUG_DECODE()) { 3930 3930 /* XXX DECODE_PRINTF may be changed to something more … … 4929 4929 START_OF_INSTR(); 4930 4930 FETCH_DECODE_MODRM(mod, rh, rl); 4931 #ifdef CONFIG_DEBUG4931 #ifdef DEBUG 4932 4932 if (DEBUG_DECODE()) { 4933 4933 /* XXX DECODE_PRINTF may be changed to something more … … 4995 4995 START_OF_INSTR(); 4996 4996 FETCH_DECODE_MODRM(mod, rh, rl); 4997 #ifdef CONFIG_DEBUG4997 #ifdef DEBUG 4998 4998 if (DEBUG_DECODE()) { 4999 4999 /* XXX DECODE_PRINTF may be changed to something more -
trunk/util/x86emu/yabel/biosemu.c
r5040 r5131 58 58 u8 *rom_image; 59 59 int i = 0; 60 #ifdef CONFIG_DEBUG60 #ifdef DEBUG 61 61 debug_flags = 0;//DEBUG_PRINT_INT10 | DEBUG_PNP | DEBUG_INTR | DEBUG_CHECK_VMEM_ACCESS | DEBUG_MEM | DEBUG_IO; 62 62 // | DEBUG_CHECK_VMEM_ACCESS | DEBUG_MEM | DEBUG_IO; … … 253 253 X86EMU_trace_on(); 254 254 } else { 255 #ifdef CONFIG_DEBUG255 #ifdef DEBUG 256 256 M.x86.debug |= DEBUG_SAVE_IP_CS_F; 257 257 M.x86.debug |= DEBUG_DECODE_F; … … 274 274 */ 275 275 DEBUG_PRINTF_CS_IP("Option ROM Exit Status: %04x\n", M.x86.R_AX); 276 #ifdef CONFIG_DEBUG276 #ifdef DEBUG 277 277 DEBUG_PRINTF("Exit Status Decode:\n"); 278 278 if (M.x86.R_AX & 0x100) { // bit 8 -
trunk/util/x86emu/yabel/debug.h
r5040 r5131 70 70 #define DEBUG_JMP 0x2000 71 71 72 //#define CONFIG_DEBUG73 //#undef CONFIG_DEBUG74 #ifdef CONFIG_DEBUG72 //#define DEBUG 73 //#undef DEBUG 74 #ifdef DEBUG 75 75 76 76 #define CHECK_DBG(_flag) if (debug_flags & _flag) … … 104 104 #define DEBUG_PRINTF_PNP(_x...) 105 105 106 #endif // CONFIG_DEBUG106 #endif //DEBUG 107 107 108 108 void dump(u8 * addr, u32 len); -
trunk/util/x86emu/yabel/device.c
r5041 r5131 113 113 // store last entry index of translate_address_array 114 114 taa_last_entry = taa_index - 1; 115 #ifdef CONFIG_DEBUG115 #ifdef DEBUG 116 116 //dump translate_address_array 117 117 printf("translate_address_array: \n"); … … 196 196 // store last entry index of translate_address_array 197 197 taa_last_entry = taa_index - 1; 198 #ifdef CONFIG_DEBUG198 #ifdef DEBUG 199 199 //dump translate_address_array 200 200 printf("translate_address_array: \n"); … … 335 335 sizeof(pci_ds)); 336 336 clr_ci(); 337 #ifdef CONFIG_DEBUG337 #ifdef DEBUG 338 338 DEBUG_PRINTF("PCI Data Structure @%lx:\n", 339 339 rom_base_addr + pci_ds_offset); -
trunk/util/x86emu/yabel/mem.c
r5040 r5131 20 20 21 21 // define a check for access to certain (virtual) memory regions (interrupt handlers, BIOS Data Area, ...) 22 #ifdef CONFIG_DEBUG22 #ifdef DEBUG 23 23 static u8 in_check = 0; // to avoid recursion... 24 24 u16 ebda_segment;
Note: See TracChangeset
for help on using the changeset viewer.
