Code cleanup.
[v86d.git] / v86.h
blob889c4111fae1599f11254621af468d7c872525b4
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>
8 #include <asm-i386/vm86.h>
10 #undef u8
11 #undef u16
12 #undef u32
14 #define u8 __u8
15 #define u16 __u16
16 #define u32 __u32
18 struct completion;
20 #include <video/uvesafb.h>
22 //#define ulog(args...) do {} while (0)
23 //#define ulog(args...) fprintf(stdout, ##args)
25 #define ulog(args...) syslog(LOG_INFO, ##args)
27 int v86_init();
28 int v86_int(int num, struct vm86_regs *regs);
29 int v86_task(struct uvesafb_task *tsk, u8 *buf);
30 void v86_cleanup();
32 #define IVTBDA_BASE 0x00000
33 #define IVTBDA_SIZE 0x01000
34 #define DEFAULT_STACK_SIZE 0x02000
35 #define REAL_MEM_BASE 0x10000
36 #define REAL_MEM_SIZE 0xa0000 - REAL_MEM_BASE
37 #define BIOS_MEM_SIZE (0x100000 - REAL_MEM_BASE - REAL_MEM_SIZE)
39 void *v86_mem_alloc(int size);
40 void v86_mem_free(void *m);
41 int v86_mem_init(void);
42 void v86_mem_cleanup(void);
44 u16 get_int_seg(int i);
45 u16 get_int_off(int i);
47 extern u8 *real_mem;
49 #endif /* __H_V86 */