34 #ifndef _BIOSEMU_DEBUG_H_
35 #define _BIOSEMU_DEBUG_H_
40 #if CONFIG(X86EMU_DEBUG_TIMINGS)
50 #define printf(x...) printk(BIOS_DEBUG, x)
82 #define DEBUG_CHECK_VMEM_ACCESS 0x4
83 #define DEBUG_INTR 0x8
84 #define DEBUG_PRINT_INT10 0x10
85 #define DEBUG_VBE 0x20
86 #define DEBUG_PMM 0x40
87 #define DEBUG_DISK 0x80
88 #define DEBUG_PNP 0x100
90 #define DEBUG_TRACE_X86EMU 0x1000
92 #define DEBUG_JMP 0x2000
94 #if CONFIG(X86EMU_DEBUG)
96 #define CHECK_DBG(_flag) if (debug_flags & _flag)
98 #define DEBUG_PRINTF(_x...) printf(_x);
102 #if CONFIG(X86EMU_DEBUG_TIMINGS)
103 #define DEBUG_PRINTF_CS_IP(_x...) DEBUG_PRINTF("[%08lx]%x:%x ", (current_time_from(&zero)).microseconds, M.x86.R_CS, M.x86.R_IP); DEBUG_PRINTF(_x);
105 #define DEBUG_PRINTF_CS_IP(_x...) DEBUG_PRINTF("%x:%x ", M.x86.R_CS, M.x86.R_IP); DEBUG_PRINTF(_x);
108 #define DEBUG_PRINTF_IO(_x...) CHECK_DBG(DEBUG_IO) { DEBUG_PRINTF_CS_IP(_x) }
109 #define DEBUG_PRINTF_MEM(_x...) CHECK_DBG(DEBUG_MEM) { DEBUG_PRINTF_CS_IP(_x) }
110 #define DEBUG_PRINTF_INTR(_x...) CHECK_DBG(DEBUG_INTR) { DEBUG_PRINTF_CS_IP(_x) }
111 #define DEBUG_PRINTF_VBE(_x...) CHECK_DBG(DEBUG_VBE) { DEBUG_PRINTF_CS_IP(_x) }
112 #define DEBUG_PRINTF_PMM(_x...) CHECK_DBG(DEBUG_PMM) { DEBUG_PRINTF_CS_IP(_x) }
113 #define DEBUG_PRINTF_DISK(_x...) CHECK_DBG(DEBUG_DISK) { DEBUG_PRINTF_CS_IP(_x) }
114 #define DEBUG_PRINTF_PNP(_x...) CHECK_DBG(DEBUG_PNP) { DEBUG_PRINTF_CS_IP(_x) }
118 #define CHECK_DBG(_flag) if (0)
120 #define DEBUG_PRINTF(_x...)
121 #define DEBUG_PRINTF_CS_IP(_x...)
123 #define DEBUG_PRINTF_IO(_x...)
124 #define DEBUG_PRINTF_MEM(_x...)
125 #define DEBUG_PRINTF_INTR(_x...)
126 #define DEBUG_PRINTF_VBE(_x...)
127 #define DEBUG_PRINTF_PMM(_x...)
128 #define DEBUG_PRINTF_DISK(_x...)
129 #define DEBUG_PRINTF_PNP(_x...)
void x86emu_dump_xregs(void)
void dump(u8 *addr, u32 len)