20 #ifndef __X86EMU_X86EMU_H 21 #define __X86EMU_X86EMU_H 23 #define NO_SYS_HEADERS 28 #define X86API _ASMAPI 29 #define X86APIP _ASMAPIP 30 typedef int X86EMU_pioAddr;
32 #include "x86emu/types.h" 36 #include "x86emu/regs.h" 67 u8(X86APIP inb)(X86EMU_pioAddr addr);
68 u16(X86APIP inw)(X86EMU_pioAddr addr);
69 u32(X86APIP inl)(X86EMU_pioAddr addr);
70 void(X86APIP outb)(X86EMU_pioAddr addr, u8 val);
71 void(X86APIP outw)(X86EMU_pioAddr addr, u16 val);
72 void(X86APIP outl)(X86EMU_pioAddr addr, u32 val);
99 u8(X86APIP rdb)(u32 addr);
100 u16(X86APIP rdw)(u32 addr);
101 u32(X86APIP rdl)(u32 addr);
102 void(X86APIP wrb)(u32 addr, u8 val);
103 void(X86APIP wrw)(u32 addr, u16 val);
104 void(X86APIP wrl)(u32 addr, u32 val);
111 extern u8 X86API rdb(u32 addr);
112 extern u16 X86API rdw(u32 addr);
113 extern u32 X86API rdl(u32 addr);
114 extern void X86API wrb(u32 addr, u8 val);
115 extern void X86API wrw(u32 addr, u16 val);
116 extern void X86API wrl(u32 addr, u32 val);
124 typedef void(X86APIP X86EMU_intrFuncs)(
int num);
125 extern X86EMU_intrFuncs _X86EMU_intrTab[256];
135 void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]);
136 void X86EMU_prepareForInt(
int num);
140 void X86EMU_exec(
void);
141 void X86EMU_halt_sys(
void);
145 printk("halt_sys: file %s, line %d\n", __FILE__, __LINE__), \ 148 #define HALT_SYS() X86EMU_halt_sys() 153 #define DEBUG_DECODE_F 0x000001 154 #define DEBUG_TRACE_F 0x000002 155 #define DEBUG_STEP_F 0x000004 156 #define DEBUG_DISASSEMBLE_F 0x000008 157 #define DEBUG_BREAK_F 0x000010 158 #define DEBUG_SVC_F 0x000020 159 #define DEBUG_SAVE_IP_CS_F 0x000040 160 #define DEBUG_FS_F 0x000080 161 #define DEBUG_PROC_F 0x000100 162 #define DEBUG_SYSINT_F 0x000200 163 #define DEBUG_TRACECALL_F 0x000400 164 #define DEBUG_INSTRUMENT_F 0x000800 165 #define DEBUG_MEM_TRACE_F 0x001000 166 #define DEBUG_IO_TRACE_F 0x002000 167 #define DEBUG_TRACECALL_REGS_F 0x004000 168 #define DEBUG_DECODE_NOPRINT_F 0x008000 169 #define DEBUG_EXIT 0x010000 170 #define DEBUG_SYS_F (DEBUG_SVC_F | DEBUG_FS_F | DEBUG_PROC_F) 172 void X86EMU_trace_regs(
void);
173 void X86EMU_trace_xregs(
void);
174 void X86EMU_dump_memory(u16 seg, u16 off, u32 amt);
175 int X86EMU_trace_on(
void);
176 int X86EMU_trace_off(
void);