fns.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. 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. #define flushpage(s) icflush()
  30. void fpenab(int);
  31. void fptrap(Ureg*);
  32. int getcfields(char*, char**, int, char*);
  33. char *getconf(char*);
  34. ulong getfcr(void);
  35. ulong getstatus(void);
  36. void gotopc(ulong);
  37. int havetimer(void);
  38. int i8042auxcmd(int);
  39. void i8042auxenable(void (*)(int, int));
  40. void i8042reset(void);
  41. void i8250console(void);
  42. void i8250mouse(char*, int(*)(Queue*,int), int);
  43. void i8259init(void);
  44. int i8259enable(int, int, Vctl*);
  45. #define idlehands() /* nothing to do in the runproc */
  46. void icflush(void);
  47. void illegal0(void);
  48. void intr0(void);
  49. void intrenable(int, void (*)(Ureg*, void*), void*, int, char*);
  50. void intrdisable(int, void (*)(Ureg *, void *), void*, int, char*);
  51. int ioalloc(int, int, int, char*);
  52. void iofree(int);
  53. void ioinit(void);
  54. int iounused(int, int);
  55. int irqallocread(char*, long, vlong);
  56. int isaconfig(char*, int, ISAConf*);
  57. void kbdinit(void);
  58. #define kmapinval()
  59. void *kmapv(uvlong, int);
  60. int kprint(char*, ...);
  61. void launchinit(void);
  62. void launch(int);
  63. void links(void);
  64. void mb(void);
  65. void memholes(void);
  66. ulong meminit(void);
  67. void mmudump(void);
  68. void mmuinit(void);
  69. #define mmunewpage(x)
  70. void mmupark(void);
  71. void mntdump(void);
  72. void ns16552install(void);
  73. void ns16552special(int, int, Queue**, Queue**, int (*)(Queue*, int));
  74. ulong pcibarsize(Pcidev*, int);
  75. int pcicfgr8(Pcidev*, int);
  76. int pcicfgr16(Pcidev*, int);
  77. int pcicfgr32(Pcidev*, int);
  78. void pcicfgw8(Pcidev*, int, int);
  79. void pcicfgw16(Pcidev*, int, int);
  80. void pcicfgw32(Pcidev*, int, int);
  81. void pciclrbme(Pcidev*);
  82. void pcihinv(Pcidev*);
  83. Pcidev* pcimatch(Pcidev*, int, int);
  84. Pcidev* pcimatchtbdf(int);
  85. void pcireset(void);
  86. void pcisetbme(Pcidev*);
  87. int pcmspecial(char*, ISAConf*);
  88. int (*_pcmspecial)(char *, ISAConf *);
  89. void pcmspecialclose(int);
  90. void (*_pcmspecialclose)(int);
  91. void prflush(void);
  92. void printinit(void);
  93. #define procrestore(p)
  94. void procsave(Proc*);
  95. void procsetup(Proc*);
  96. void restfpregs(FPsave*);
  97. uvlong rpcc(uvlong*);
  98. void screeninit(void);
  99. void (*screenputs)(char*, int);
  100. void setpcb(PCB *);
  101. PCB *swpctx(PCB *);
  102. void syscall0(void);
  103. int tas(ulong*);
  104. void tlbflush(int, ulong);
  105. void touser(void*);
  106. void trapinit(void);
  107. void unaligned(void);
  108. ulong upamalloc(ulong, int, int);
  109. void upafree(ulong, int);
  110. #define userureg(ur) ((ur)->status & UMODE)
  111. void wrent(int, void*);
  112. void wrvptptr(uvlong);
  113. #define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
  114. #define kmapperm(x) kmap(x)
  115. #define KADDR(a) ((void*)((ulong)(a)|KZERO))
  116. #define PADDR(a) ((ulong)(a)&~KZERO)
  117. #define inb(p) (arch->_inb)(p)
  118. #define ins(p) (arch->_ins)(p)
  119. #define inl(p) (arch->_inl)(p)
  120. #define outb(p, x) (arch->_outb)((p), (x))
  121. #define outs(p, x) (arch->_outs)((p), (x))
  122. #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))