x86emu: add support for the rdtsc opcode
[v86d.git] / v86.h
blob98cc2b380bb3951422ea34008da2c1124f1465ef
1 #ifndef __H_V86
2 #define __H_V86
4 #include <stdio.h>
5 #include <syslog.h>
6 #include <sys/types.h>
7 #include <linux/connector.h>
9 #undef u8
10 #undef u16
11 #undef u32
12 #undef u64
14 #define u8 __u8
15 #define u16 __u16
16 #define u32 __u32
17 #define u64 __u64
19 #ifdef __x86_64__
20 #define uptr u64
21 #else
22 #define uptr u32
23 #endif
25 struct completion;
27 #include <video/uvesafb.h>
29 //#define ulog(args...) do {} while (0)
30 //#define ulog(args...) fprintf(stdout, ##args)
32 #define ulog(args...) syslog(LOG_INFO, ##args)
34 int v86_init();
35 int v86_int(int num, struct v86_regs *regs);
36 int v86_task(struct uvesafb_task *tsk, u8 *buf);
37 void v86_cleanup();
39 #define MEM_SIZE 0x10ffef
40 #define IVTBDA_BASE 0x00000
41 #define IVTBDA_SIZE 0x01000
42 #define DEFAULT_STACK_SIZE 0x02000
43 #define REAL_MEM_BASE 0x10000
44 #define REAL_MEM_SIZE (0x30000 - REAL_MEM_BASE)
45 #define BIOS_MEM_SIZE (0x100000 - REAL_MEM_BASE - REAL_MEM_SIZE)
47 void *v86_mem_alloc(int size);
48 void v86_mem_free(void *m);
49 int v86_mem_init(void);
50 void v86_mem_cleanup(void);
52 u16 get_int_seg(int i);
53 u16 get_int_off(int i);
55 extern u8 *real_mem;
57 #endif /* __H_V86 */