fns.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. #include "../port/portfns.h"
  2. void archinit(void);
  3. int cistrcmp(char*, char*);
  4. int cistrncmp(char*, char*, int);
  5. void clockcheck(void);
  6. void clockinit(void);
  7. void clockintr(Ureg*);
  8. void clockintrsched(void);
  9. void cpuidentify(void);
  10. void cpuidprint(void);
  11. void cycles(uvlong*);
  12. void dbgputc(int c);
  13. void dcacheenb(void);
  14. void dcflush(void*, ulong);
  15. void dczap(void*, ulong);
  16. void delay(int);
  17. void delayloopinit(void);
  18. void dmiss(void);
  19. void* dpalloc(int);
  20. void dumpregs(Ureg*);
  21. void eieio(void);
  22. void evenaddr(ulong);
  23. void faultpower(Ureg*, ulong addr, int read);
  24. void flashprogpower(int);
  25. void fpinit(void);
  26. void fpgareset(void);
  27. void fprestore(FPsave*);
  28. void fpsave(FPsave*);
  29. void fptrap(Ureg*);
  30. char* getconf(char*);
  31. ulong getdar(void);
  32. ulong getdcmp(void);
  33. ulong getdec(void);
  34. ulong getdepn(void);
  35. ulong getdmiss(void);
  36. ulong getdsisr(void);
  37. ulong gethash1(void);
  38. ulong gethash2(void);
  39. ulong gethid0(void);
  40. ulong gethid1(void);
  41. ulong geticmp(void);
  42. ulong geticmp(void);
  43. ulong getimiss(void);
  44. ulong getimmr(void);
  45. ulong getmsr(void);
  46. ulong getpvr(void);
  47. ulong getrpa(void);
  48. ulong getsdr1(void);
  49. ulong getsr(int);
  50. ulong getsrr1(void);
  51. ulong gettbl(void);
  52. ulong gettbu(void);
  53. void gotopc(ulong);
  54. void hwintrinit(void);
  55. void icacheenb(void);
  56. void icflush(void*, ulong);
  57. void idle(void);
  58. #define idlehands() /* nothing to do in the runproc */
  59. void imiss(void);
  60. int inb(int);
  61. ulong inl(int);
  62. ushort ins(int);
  63. void insb(int, void*, int);
  64. void insl(int, void*, int);
  65. void inss(int, void*, int);
  66. void intr(Ureg*);
  67. void intrenable(int, void (*)(Ureg*, void*), void*, char*);
  68. void intrdisable(int, void (*)(Ureg*, void*), void*, char*);
  69. int ioalloc(int, int, int, char*);
  70. void iofree(int);
  71. void ioinit(void);
  72. int iprint(char*, ...);
  73. int isaconfig(char*, int, ISAConf*);
  74. void kbdinit(void);
  75. void kbdreset(void);
  76. void kernelmmu(void);
  77. void kfpinit(void);
  78. #define kmapinval()
  79. void links(void);
  80. void vectordisable(Vctl *);
  81. int vectorenable(Vctl *);
  82. void intack(void);
  83. void intend(int);
  84. int intvec(void);
  85. void l2disable(void);
  86. void mathinit(void);
  87. void mmuinit(void);
  88. void mmusweep(void*);
  89. void mpicdisable(int);
  90. void mpicenable(int, Vctl*);
  91. int mpiceoi(int);
  92. int mpicintack(void);
  93. int newmmupid(void);
  94. void outb(int, int);
  95. void outl(int, ulong);
  96. void outs(int, ushort);
  97. void outsb(int, void*, int);
  98. void outsl(int, void*, int);
  99. void outss(int, void*, int);
  100. int pcicfgr16(Pcidev*, int);
  101. int pcicfgr32(Pcidev*, int);
  102. int pcicfgr8(Pcidev*, int);
  103. void pcicfgw16(Pcidev*, int, int);
  104. void pcicfgw32(Pcidev*, int, int);
  105. void pcicfgw8(Pcidev*, int, int);
  106. void pcihinv(Pcidev*);
  107. void pcireset(void);
  108. int pciscan(int, Pcidev **);
  109. void pcisetbme(Pcidev*);
  110. void procsave(Proc*);
  111. void procsetup(Proc*);
  112. void putcasid(ulong);
  113. void putdcmp(ulong);
  114. void putdec(ulong);
  115. void puthash1(ulong);
  116. void puthash2(ulong);
  117. void puthid0(ulong);
  118. void puthid1(ulong);
  119. void puthid2(ulong);
  120. void puticmp(ulong);
  121. void puticmp(ulong);
  122. void putmsr(ulong);
  123. void putrpa(ulong);
  124. void putsdr1(ulong);
  125. void putsdr1(ulong);
  126. void putsr(int, ulong);
  127. void putsrr1(ulong);
  128. void raveninit(void);
  129. void screeninit(void);
  130. int screenprint(char*, ...); /* debugging */
  131. int segflush(void*, ulong);
  132. void sethvec(int, void (*)(void));
  133. void setmvec(int, void (*)(void), void (*)(void));
  134. void sharedseginit(void);
  135. void console(void);
  136. void sync(void);
  137. int tas(void*);
  138. void timeradd(Timer *);
  139. void timerdel(Timer *);
  140. void timerinit(void);
  141. void tlbflush(ulong);
  142. void tlbflushall(void);
  143. void tlbld(ulong);
  144. void tlbli(ulong);
  145. void tlbvec(void);
  146. void touser(void*);
  147. void trapinit(void);
  148. void trapvec(void);
  149. void uartinstall(void);
  150. void uartwait(void); /* debugging */
  151. #define userureg(ur) (((ur)->status & MSR_PR) != 0)
  152. #define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
  153. void watchreset(void);
  154. void wbflush(void);
  155. #define KADDR(a) ((void*)((ulong)(a)|KZERO))
  156. #define PADDR(a) ((((ulong)(a)&0xf0000000)==0xf0000000)?(ulong)(a):((ulong)(a)&~KZERO))
  157. #define coherence() eieio()
  158. ulong pcibarsize(Pcidev *, int);
  159. void pciclrbme(Pcidev*);
  160. uchar pciipin(Pcidev *, uchar);
  161. Pcidev* pcimatch(Pcidev*, int, int);
  162. Pcidev* pcimatchtbdf(int);
  163. void procrestore(Proc*);
  164. #ifdef ucuconf
  165. extern ulong getpll(void);
  166. extern ulong getl2cr(void);
  167. extern void putl2cr(ulong);
  168. #endif