1 #include "../port/portfns.h"
3 Dirtab* addarchfile(char*, int, long(*)(Chan*,void*,long,vlong), long(*)(Chan*,void*,long,vlong));
10 void clockintrsched(void);
12 int cistrcmp(char*, char*);
13 int cistrncmp(char*, char*, int);
14 int cmpswap(long*, long, long);
15 void cpuidprint(void);
16 void cserve(ulong, ulong);
17 #define cycles(x) do{}while(0)
18 void timeradd(Timer *);
19 void timerdel(Timer *);
23 int dmainit(int, int);
24 long dmasetup(int, void*, long, int);
25 void _dumpstack(Ureg *);
27 void fataltrap(Ureg *, char *);
29 void faultalpha(Ureg*);
34 int getcfields(char*, char**, int, char*);
38 void i8042auxenable(void (*)(int, int));
39 void i8042reset(void);
40 void i8250console(void);
41 void i8250mouse(char*, int(*)(Queue*,int), int);
42 void i8250setmouseputc(char*, int (*)(Queue*, int));
44 int i8259enable(int, int, Vctl*);
45 #define idlehands() /* nothing to do in the runproc */
49 void intrenable(int, void (*)(Ureg*, void*), void*, int, char*);
50 int intrdisable(int, void (*)(Ureg *, void *), void*, int, char*);
51 int ioalloc(int, int, int, char*);
54 int iounused(int, int);
55 int irqallocread(char*, long, vlong);
56 int isaconfig(char*, int, ISAConf*);
59 void *kmapv(uvlong, int);
60 int kprint(char*, ...);
69 ulong pcibarsize(Pcidev*, int);
70 int pcicfgr8(Pcidev*, int);
71 int pcicfgr16(Pcidev*, int);
72 int pcicfgr32(Pcidev*, int);
73 void pcicfgw8(Pcidev*, int, int);
74 void pcicfgw16(Pcidev*, int, int);
75 void pcicfgw32(Pcidev*, int, int);
76 void pciclrbme(Pcidev*);
77 void pcihinv(Pcidev*);
78 Pcidev* pcimatch(Pcidev*, int, int);
79 Pcidev* pcimatchtbdf(int);
81 void pcisetbme(Pcidev*);
82 int pcmspecial(char*, ISAConf*);
83 int (*_pcmspecial)(char *, ISAConf *);
84 void pcmspecialclose(int);
85 void (*_pcmspecialclose)(int);
88 #define procrestore(p)
90 void procsetup(Proc*);
92 void restfpregs(FPsave*);
94 void screeninit(void);
95 void (*screenputs)(char*, int);
100 void tlbflush(int, ulong);
103 void unaligned(void);
104 ulong upaalloc(int, int);
105 void upafree(ulong, int);
106 #define userureg(ur) ((ur)->status & UMODE)
107 void* vmap(ulong, int);
108 void wrent(int, void*);
109 void wrvptptr(uvlong);
110 void vunmap(void*, int);
112 #define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
113 #define KADDR(a) ((void*)((ulong)(a)|KZERO))
114 #define PADDR(a) ((ulong)(a)&~KZERO)
116 #define inb(p) (arch->_inb)(p)
117 #define ins(p) (arch->_ins)(p)
118 #define inl(p) (arch->_inl)(p)
119 #define outb(p, x) (arch->_outb)((p), (x))
120 #define outs(p, x) (arch->_outs)((p), (x))
121 #define outl(p, x) (arch->_outl)((p), (x))
123 #define insb(p, buf, len) (arch->_insb)((p), (buf), (len))
124 #define inss(p, buf, len) (arch->_inss)((p), (buf), (len))
125 #define insl(p, buf, len) (arch->_insl)((p), (buf), (len))
126 #define outsb(p, buf, len) (arch->_outsb)((p), (buf), (len))
127 #define outss(p, buf, len) (arch->_outss)((p), (buf), (len))
128 #define outsl(p, buf, len) (arch->_outsl)((p), (buf), (len))