Add info about supported arches.
[v86d.git] / v86.h
blob8214fe2837ad1e61e7514f8804409308a78a3461
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 struct completion;
21 #include <video/uvesafb.h>
23 //#define ulog(args...) do {} while (0)
24 //#define ulog(args...) fprintf(stdout, ##args)
26 #define ulog(args...) syslog(LOG_INFO, ##args)
28 int v86_init();
29 int v86_int(int num, struct v86_regs *regs);
30 int v86_task(struct uvesafb_task *tsk, u8 *buf);
31 void v86_cleanup();
33 #define MEM_SIZE 0x10ffef
34 #define IVTBDA_BASE 0x00000
35 #define IVTBDA_SIZE 0x01000
36 #define DEFAULT_STACK_SIZE 0x02000
37 #define REAL_MEM_BASE 0x10000
38 #define REAL_MEM_SIZE (0x30000 - REAL_MEM_BASE)
39 #define BIOS_BASE 0xa0000
40 #define BIOS_SIZE (MEM_SIZE - BIOS_BASE)
42 u32 v86_mem_alloc(int size);
43 void v86_mem_free(u32 m);
44 int v86_mem_init(void);
45 void v86_mem_cleanup(void);
47 u8 v_rdb(u32 addr);
48 u16 v_rdw(u32 addr);
49 u32 v_rdl(u32 addr);
50 void v_wrb(u32 addr, u8 val);
51 void v_wrw(u32 addr, u16 val);
52 void v_wrl(u32 addr, u32 val);
53 void *vptr(u32 addr);
55 extern int iopl (int __level);
56 extern int ioperm (unsigned long int __from, unsigned long int __num,
57 int __turn_on);
59 #endif /* __H_V86 */