Print phys_base_ptr in testvbe.
[v86d.git] / v86.h
bloba64b6a281fa253ddfd770bd406eabc05fa1214a7
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 "config.h"
10 #undef u8
11 #undef u16
12 #undef u32
13 #undef u64
15 #define u8 __u8
16 #define u16 __u16
17 #define u32 __u32
18 #define u64 __u64
20 struct completion;
22 #include <video/uvesafb.h>
24 //#define ulog(args...) do {} while (0)
25 //#define ulog(args...) fprintf(stdout, ##args)
27 #ifdef CONFIG_DEBUG
28 #define MAX_LOG_LEVEL LOG_DEBUG
29 #else
30 #define MAX_LOG_LEVEL LOG_WARNING
31 #endif
33 /* klibc doesn't provide setlogmask(), so simulate it here */
34 #define ulog(level, args...) if (level <= MAX_LOG_LEVEL) { syslog(level, ##args); }
36 int v86_init();
37 int v86_int(int num, struct v86_regs *regs);
38 int v86_task(struct uvesafb_task *tsk, u8 *buf);
39 void v86_cleanup();
41 #define IVTBDA_BASE 0x00000
42 #define IVTBDA_SIZE 0x01000
43 #define DEFAULT_STACK_SIZE 0x02000
44 #define REAL_MEM_BASE 0x10000
45 #define REAL_MEM_SIZE (0x30000 - REAL_MEM_BASE)
46 #define EBDA_BASE 0x9fc00
47 #define VRAM_BASE 0xa0000
48 #define VRAM_SIZE 0x20000
49 #define SBIOS_SIZE 0x20000
50 #define SBIOS_BASE 0xe0000
51 #define VBIOS_BASE 0xc0000
53 u32 v86_mem_alloc(int size);
54 void v86_mem_free(u32 m);
55 int v86_mem_init(void);
56 void v86_mem_cleanup(void);
58 u8 v_rdb(u32 addr);
59 u16 v_rdw(u32 addr);
60 u32 v_rdl(u32 addr);
61 void v_wrb(u32 addr, u8 val);
62 void v_wrw(u32 addr, u16 val);
63 void v_wrl(u32 addr, u32 val);
64 void *vptr(u32 addr);
66 extern int iopl (int __level);
67 extern int ioperm (unsigned long int __from, unsigned long int __num,
68 int __turn_on);
70 #endif /* __H_V86 */