fns.h 3.6 KB

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