1 #include "../port/portfns.h"
4 Dirtab* addarchfile(char*, int, long(*)(Chan*,void*,long,vlong), long(*)(Chan*,void*,long,vlong));
7 int bios32call(BIOS32ci*, u16int[3]);
8 int bios32ci(BIOS32si*, BIOS32ci*);
9 void bios32close(BIOS32si*);
10 BIOS32si* bios32open(char*);
11 void bootargsinit(void);
12 uintptr cankaddr(uintptr);
13 int checksum(void *, int);
14 void clockintr(Ureg*, void*);
15 int (*cmpswap)(long*, long, long);
16 int cmpswap486(long*, long, long);
17 void (*coherence)(void);
18 void cpuid(int, int, ulong regs[]);
20 int cpuidentify(void);
21 void cpuidprint(void);
22 void (*cycles)(uvlong*);
25 #define dmaflush(clean, addr, len)
29 int dmainit(int, int);
33 long dmasetup(int, void*, long, int);
34 void dumpmcregs(void);
35 int ecinit(int cmdport, int dataport);
36 int ecread(uchar addr);
37 int ecwrite(uchar addr, uchar val);
38 #define evenaddr(x) /* x86 doesn't care */
40 void (*fprestore)(FPsave*);
41 void (*fpsave)(FPsave*);
42 void fpuprocsetup(Proc*);
43 void fpuprocfork(Proc*);
44 void fpuprocsave(Proc*);
45 void fpuprocrestore(Proc*);
59 void i8042auxenable(void (*)(int, int));
60 void i8042reset(void);
61 void i8250console(void);
62 void* i8250alloc(int, int, int);
63 void i8253enable(void);
65 void i8253reset(void);
66 uvlong i8253read(uvlong*);
67 void i8253timerset(uvlong);
71 void insb(int, void*, int);
73 void inss(int, void*, int);
75 void insl(int, void*, int);
76 void intrdisable(int, void (*)(Ureg *, void *), void*, int, char*);
77 void intrenable(int, void (*)(Ureg*, void*), void*, int, char*);
82 int iprint(char*, ...);
83 int isaconfig(char*, int, ISAConf*);
98 void memreserve(uintptr, uintptr);
100 #define mmuflushtlb() putcr3(getcr3())
102 uintptr *mmuwalk(uintptr*, uintptr, int, int);
103 char* mtrr(uvlong, uvlong, char *);
104 char* mtrrattr(uvlong, uvlong *);
105 void mtrrclock(void);
106 int mtrrprint(char *, long);
108 void nmienable(void);
110 uchar nvramread(int);
111 void nvramwrite(int, uchar);
113 void outsb(int, void*, int);
114 void outs(int, ushort);
115 void outss(int, void*, int);
116 void outl(int, ulong);
117 void outsl(int, void*, int);
118 uintptr paddr(void*);
119 void patwc(void*, int);
120 void pcicfginit(void);
121 int (*pcicfgrw8)(int, int, int, int);
122 int (*pcicfgrw16)(int, int, int, int);
123 int (*pcicfgrw32)(int, int, int, int);
124 void pcmcisread(PCMslot*);
125 int pcmcistuple(int, int, int, void*, int);
126 PCMmap* pcmmap(int, ulong, int, int);
127 int pcmspecial(char*, ISAConf*);
128 int (*_pcmspecial)(char *, ISAConf *);
129 void pcmspecialclose(int);
130 void (*_pcmspecialclose)(int);
131 void pcmunmap(int, PCMmap*);
132 void pmap(uintptr, uintptr, vlong);
133 void punmap(uintptr, vlong);
134 void preallocpages(void);
135 void procrestore(Proc*);
136 void procsave(Proc*);
137 void procsetup(Proc*);
138 void procfork(Proc*);
143 void putxcr0(u64int);
145 void putdr01236(u64int*);
149 int rdmsr(int, vlong*);
150 void realmode(Ureg*);
151 void* rsdsearch(void);
152 void screeninit(void);
153 void (*screenputs)(char*, int);
154 void setconfenv(void);
155 void* sigsearch(char*, int);
156 void syncclock(void);
157 void syscallentry(void);
159 void trapenable(int, void (*)(Ureg*, void*), void*, char*);
161 void trapinit0(void);
163 uvlong tscticks(uvlong*);
164 ulong umballoc(ulong, ulong, ulong);
165 void umbfree(ulong, ulong);
166 uvlong upaalloc(uvlong, ulong, ulong);
167 uvlong upaallocwin(uvlong, ulong, ulong, ulong);
168 void upafree(uvlong, ulong);
169 void vectortable(void);
170 void vmxprocrestore(Proc *);
171 void vmxshutdown(void);
172 void* vmap(uvlong, int);
173 void vunmap(void*, int);
175 void writeconf(void);
176 int wrmsr(int, vlong);
177 int xchgw(ushort*, int);
178 void rdrandbuf(void*, ulong);
180 #define userureg(ur) (((ur)->cs & 3) == 3)
181 #define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
182 #define KADDR(a) kaddr(a)
183 #define PADDR(a) paddr((void*)(a))