fns.h 3.8 KB

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