-
Notifications
You must be signed in to change notification settings - Fork 0
/
fns.h
104 lines (96 loc) · 2.49 KB
/
fns.h
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include "../port/portfns.h"
ulong cankaddr(ulong);
void clock(Ureg*);
void clockinit(void);
int cmpswap(long*, long, long);
void coherence(void);
void cycles(uvlong *);
void dcflush(void*, ulong);
void evenaddr(uintptr);
void faultmips(Ureg*, int, int);
ulong fcr31(void);
//void fptrap(Ureg*);
char* getconf(char*);
ulong getpagemask(void);
ulong getrandom(void);
int gettlbp(ulong, ulong*);
ulong gettlbvirt(int);
int hpc3irqlevel(int);
int isaconfig(char*, int, ISAConf*);
void icflush(void *, ulong);
void idlehands(void);
void introff(int);
void intron(int);
void kfault(Ureg*);
KMap* kmap(Page*);
void kmapdump(void);
void kmapinit(void);
void kmapinval(void);
void kunmap(KMap*);
void links(void);
void outl(void*, void*, ulong);
ulong prid(void);
void procfork(Proc *);
void procrestore(Proc *);
void procsave(Proc *);
void procsetup(Proc *);
void purgetlb(int);
void puttlbx(int, ulong, ulong, ulong, int);
ulong rdcompare(void);
ulong rdcount(void);
ulong* reg(Ureg*, int);
void restfpregs(FPsave*, ulong);
void intrenable(int, void(*)(Ureg *, void *), void *, int, char*);
void intrdisable(int, void (*)(Ureg*, void *), void*, int, char*);
void screeninit(void);
void setpagemask(ulong);
void setwired(ulong);
ulong stlbhash(ulong);
void syscall(Ureg*);
int tas(void*);
void tlbinit(void);
ulong tlbvirt(void);
void touser(void*);
#define userureg(ur) ((ur)->status & KUSER)
void validalign(uintptr, unsigned);
void wrcompare(ulong);
void wrcount(ulong);
#define PTR2UINT(p) ((uintptr)(p))
#define UINT2PTR(i) ((void*)(i))
//#define KADDR(a) ((void*)((ulong)(a)|KSEG0))
#define KADDR(pa) ((void*)(KZERO | ((uintptr)(pa) & ~KSEGM)))
//#define PADDR(a) ((ulong)(a)&~KSEGM)
#define PADDR(va) (((uintptr)(va)) & ~KSEGM)
#define FMASK(o, w) (((1<<(w))-1)<<(o))
#define KSEG1ADDR(a) ((void*)((ulong)(a)|KSEG1))
//void (*screenputs)(char*, int);
void _uartputs(char*, int);
int _uartprint(char*, ...);
void uartinit(void);
void zoot(void);
void idle(void);
ulong getstatus(void);
void setstatus(ulong);
ulong getcause(void);
ulong getconfig(void);
ulong getconfig1(void);
ulong getconfig2(void);
ulong getconfig3(void);
ulong getconfig7(void);
ulong gethwreg3(void);
void plan9iniinit(void);
void noted(Ureg*, ulong);
int notify(Ureg*);
void intrinit(void);
int i8250console(void);
void setconfenv(void);
void uartkirkwoodconsole(void);
void serialputs(char*, int);
void intrclear(int);
ulong incraw(void);
ulong incmask(void);
ulong incstat(void);
ulong incsel(void);
void setwatchhi0(ulong);
void setwatchlo0(ulong);
int fpuemu(Ureg *);