fns.h 4.0 KB

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