fns.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. #include "../port/portfns.h"
  2. Dirtab* addarchfile(char*, int, long(*)(Chan*,void*,long,vlong), long(*)(Chan*,void*,long,vlong));
  3. void archinit(void);
  4. void arginit(void);
  5. void arith(void);
  6. void clock(Ureg*);
  7. void clockinit(void);
  8. void clockintrsched(void);
  9. #define coherence mb
  10. int cistrcmp(char*, char*);
  11. int cistrncmp(char*, char*, int);
  12. void cpuidprint(void);
  13. void cserve(ulong, ulong);
  14. #define cycles(x) do{}while(0)
  15. void timeradd(Timer *);
  16. void timerdel(Timer *);
  17. int dmacount(int);
  18. int dmadone(int);
  19. void dmaend(int);
  20. int dmainit(int, int);
  21. long dmasetup(int, void*, long, int);
  22. void _dumpstack(Ureg *);
  23. void evenaddr(ulong);
  24. void fataltrap(Ureg *, char *);
  25. void fault0(void);
  26. void faultalpha(Ureg*);
  27. ulong fcr31(void);
  28. void firmware(void);
  29. void fpenab(int);
  30. void fptrap(Ureg*);
  31. int getcfields(char*, char**, int, char*);
  32. char *getconf(char*);
  33. int havetimer(void);
  34. int i8042auxcmd(int);
  35. void i8042auxenable(void (*)(int, int));
  36. void i8042reset(void);
  37. void i8250console(void);
  38. void i8250mouse(char*, int(*)(Queue*,int), int);
  39. void i8250setmouseputc(char*, int (*)(Queue*, int));
  40. void i8259init(void);
  41. int i8259enable(int, int, Vctl*);
  42. #define idlehands() /* nothing to do in the runproc */
  43. void icflush(void);
  44. void illegal0(void);
  45. void intr0(void);
  46. void intrenable(int, void (*)(Ureg*, void*), void*, int, char*);
  47. int intrdisable(int, void (*)(Ureg *, void *), void*, int, char*);
  48. int ioalloc(int, int, int, char*);
  49. void iofree(int);
  50. void ioinit(void);
  51. int iounused(int, int);
  52. int irqallocread(char*, long, vlong);
  53. int isaconfig(char*, int, ISAConf*);
  54. void kbdinit(void);
  55. #define kexit(a)
  56. #define kmapinval()
  57. void *kmapv(uvlong, int);
  58. int kprint(char*, ...);
  59. void links(void);
  60. void mb(void);
  61. void memholes(void);
  62. ulong meminit(void);
  63. void mmudump(void);
  64. void mmuinit(void);
  65. void mmupark(void);
  66. ulong pcibarsize(Pcidev*, int);
  67. int pcicfgr8(Pcidev*, int);
  68. int pcicfgr16(Pcidev*, int);
  69. int pcicfgr32(Pcidev*, int);
  70. void pcicfgw8(Pcidev*, int, int);
  71. void pcicfgw16(Pcidev*, int, int);
  72. void pcicfgw32(Pcidev*, int, int);
  73. void pciclrbme(Pcidev*);
  74. void pcihinv(Pcidev*);
  75. Pcidev* pcimatch(Pcidev*, int, int);
  76. Pcidev* pcimatchtbdf(int);
  77. void pcireset(void);
  78. void pcisetbme(Pcidev*);
  79. int pcmspecial(char*, ISAConf*);
  80. int (*_pcmspecial)(char *, ISAConf *);
  81. void pcmspecialclose(int);
  82. void (*_pcmspecialclose)(int);
  83. void prflush(void);
  84. void printinit(void);
  85. #define procrestore(p)
  86. void procsave(Proc*);
  87. void procsetup(Proc*);
  88. void restfpregs(FPsave*);
  89. uvlong rpcc(uvlong*);
  90. void screeninit(void);
  91. void (*screenputs)(char*, int);
  92. void setpcb(PCB *);
  93. PCB *swpctx(PCB *);
  94. void syscall0(void);
  95. int tas(ulong*);
  96. void tlbflush(int, ulong);
  97. void touser(void*);
  98. void trapinit(void);
  99. void unaligned(void);
  100. ulong upaalloc(int, int);
  101. void upafree(ulong, int);
  102. #define userureg(ur) ((ur)->status & UMODE)
  103. void* vmap(ulong, int);
  104. void wrent(int, void*);
  105. void wrvptptr(uvlong);
  106. void vunmap(void*, int);
  107. #define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
  108. #define KADDR(a) ((void*)((ulong)(a)|KZERO))
  109. #define PADDR(a) ((ulong)(a)&~KZERO)
  110. #define inb(p) (arch->_inb)(p)
  111. #define ins(p) (arch->_ins)(p)
  112. #define inl(p) (arch->_inl)(p)
  113. #define outb(p, x) (arch->_outb)((p), (x))
  114. #define outs(p, x) (arch->_outs)((p), (x))
  115. #define outl(p, x) (arch->_outl)((p), (x))
  116. #define insb(p, buf, len) (arch->_insb)((p), (buf), (len))
  117. #define inss(p, buf, len) (arch->_inss)((p), (buf), (len))
  118. #define insl(p, buf, len) (arch->_insl)((p), (buf), (len))
  119. #define outsb(p, buf, len) (arch->_outsb)((p), (buf), (len))
  120. #define outss(p, buf, len) (arch->_outss)((p), (buf), (len))
  121. #define outsl(p, buf, len) (arch->_outsl)((p), (buf), (len))