1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#include "../pc/dat.h"
typedef unsigned char uint8_t;
typedef unsigned char uint8;
typedef unsigned short uint16_t;
typedef unsigned long uint32_t;
typedef unsigned long long uint64_t;
typedef char int8_t;
typedef short int16_t;
typedef long int32_t;
typedef long long int64_t;
#define __attribute__(x)
enum {
EINVAL,
EACCES,
EEXIST,
EISDIR,
ENOENT,
ENOMEM,
ENOSPC,
EIO,
ENOTEMPTY,
ENOSYS,
EROFS,
EBUSY,
EAGAIN,
EISCONN,
};
#include "xendat.h"
#undef mk_unsigned_long
#define mk_unsigned_long(x) ((unsigned long)(x))
#ifndef set_xen_guest_handle
#define set_xen_guest_handle(hnd, val) hnd = val
#endif
extern ulong hypervisor_virt_start;
extern ulong *patomfn, *matopfn;
extern start_info_t *xenstart;
extern ulong xentop;
extern shared_info_t *HYPERVISOR_shared_info;
/*
* Fake kmap
* XXX is this still viable?
*/
#undef VA
#define VA(k) ((ulong)(k))
#define kmap(p) (KMap*)((p)->pa|KZERO)
#define kunmap(k)
|