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*);
58 void i8042auxenable(void (*)(int, int));
59 void i8042reset(void);
60 void i8250console(void);
61 void* i8250alloc(int, int, int);
62 void i8253enable(void);
64 void i8253reset(void);
65 uvlong i8253read(uvlong*);
66 void i8253timerset(uvlong);
70 void insb(int, void*, int);
72 void inss(int, void*, int);
74 void insl(int, void*, int);
75 void intrdisable(int, void (*)(Ureg *, void *), void*, int, char*);
76 void intrenable(int, void (*)(Ureg*, void*), void*, int, char*);
81 int iprint(char*, ...);
82 int isaconfig(char*, int, ISAConf*);
97 void memreserve(uintptr, uintptr);
99 #define mmuflushtlb() putcr3(getcr3())
101 uintptr *mmuwalk(uintptr*, uintptr, int, int);
102 char* mtrr(uvlong, uvlong, char *);
103 char* mtrrattr(uvlong, uvlong *);
104 void mtrrclock(void);
105 int mtrrprint(char *, long);
107 void nmienable(void);
109 uchar nvramread(int);
110 void nvramwrite(int, uchar);
112 void outsb(int, void*, int);
113 void outs(int, ushort);
114 void outss(int, void*, int);
115 void outl(int, ulong);
116 void outsl(int, void*, int);
117 uintptr paddr(void*);
118 void patwc(void*, int);
119 void pcicfginit(void);
120 int (*pcicfgrw8)(int, int, int, int);
121 int (*pcicfgrw16)(int, int, int, int);
122 int (*pcicfgrw32)(int, int, int, int);
123 void pcmcisread(PCMslot*);
124 int pcmcistuple(int, int, int, void*, int);
125 PCMmap* pcmmap(int, ulong, int, int);
126 int pcmspecial(char*, ISAConf*);
127 int (*_pcmspecial)(char *, ISAConf *);
128 void pcmspecialclose(int);
129 void (*_pcmspecialclose)(int);
130 void pcmunmap(int, PCMmap*);
131 void pmap(uintptr, uintptr, vlong);
132 void punmap(uintptr, vlong);
133 void preallocpages(void);
134 void procrestore(Proc*);
135 void procsave(Proc*);
136 void procsetup(Proc*);
137 void procfork(Proc*);
142 void putxcr0(u64int);
144 void putdr01236(u64int*);
148 int rdmsr(int, vlong*);
149 void realmode(Ureg*);
150 void* rsdsearch(void);
151 void screeninit(void);
152 void (*screenputs)(char*, int);
153 void setconfenv(void);
154 void* sigsearch(char*, int);
155 void syncclock(void);
156 void syscallentry(void);
158 void trapenable(int, void (*)(Ureg*, void*), void*, char*);
160 void trapinit0(void);
162 uvlong tscticks(uvlong*);
163 ulong umballoc(ulong, ulong, ulong);
164 void umbfree(ulong, ulong);
165 uvlong upaalloc(uvlong, ulong, ulong);
166 uvlong upaallocwin(uvlong, ulong, ulong, ulong);
167 void upafree(uvlong, ulong);
168 void vectortable(void);
169 void vmxprocrestore(Proc *);
170 void vmxshutdown(void);
171 void* vmap(uvlong, int);
172 void vunmap(void*, int);
174 void writeconf(void);
175 int wrmsr(int, vlong);
176 int xchgw(ushort*, int);
177 void rdrandbuf(void*, ulong);
179 #define userureg(ur) (((ur)->cs & 3) == 3)
180 #define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
181 #define KADDR(a) kaddr(a)
182 #define PADDR(a) paddr((void*)(a))