fns.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. #define coherence() eieio()
  10. void cpuidentify(void);
  11. void cpuidprint(void);
  12. #define cycles(x)
  13. void dcflush(void*, ulong);
  14. void delay(int);
  15. void dumpregs(Ureg*);
  16. void delayloopinit(void);
  17. void eieio(void);
  18. void evenaddr(ulong);
  19. void faultpower(Ureg*, ulong addr, int read);
  20. void fpinit(void);
  21. void fprestore(FPsave*);
  22. void fpsave(FPsave*);
  23. void fptrap(Ureg*);
  24. char* getconf(char*);
  25. ulong getdar(void);
  26. ulong getdec(void);
  27. ulong getdepn(void);
  28. ulong getdsisr(void);
  29. ulong gethid0(void);
  30. ulong gethid1(void);
  31. ulong getimmr(void);
  32. ulong getmsr(void);
  33. ulong getpvr(void);
  34. ulong gettbl(void);
  35. ulong gettbu(void);
  36. void gotopc(ulong);
  37. int havetimer(void);
  38. void hwintrinit(void);
  39. void i8250console(void);
  40. void i8259init(void);
  41. int i8259intack(void);
  42. int i8259enable(Vctl*);
  43. int i8259vecno(int);
  44. int i8259disable(int);
  45. void icflush(void*, ulong);
  46. void idle(void);
  47. #define idlehands() /* nothing to do in the runproc */
  48. int inb(int);
  49. void insb(int, void*, int);
  50. ushort ins(int);
  51. void inss(int, void*, int);
  52. ulong inl(int);
  53. void insl(int, void*, int);
  54. void intr(Ureg*);
  55. void intrenable(int, void (*)(Ureg*, void*), void*, int, char*);
  56. int ioalloc(int, int, int, char*);
  57. void iofree(int);
  58. void ioinit(void);
  59. int iprint(char*, ...);
  60. int isaconfig(char*, int, ISAConf*);
  61. void kbdinit(void);
  62. void kbdreset(void);
  63. void kernelmmu(void);
  64. #define kmapinval()
  65. void links(void);
  66. void mathinit(void);
  67. void mmuinit(void);
  68. void mmusweep(void*);
  69. void mpicdisable(int);
  70. void mpicenable(int, Vctl*);
  71. int mpiceoi(int);
  72. int mpicintack(void);
  73. int newmmupid(void);
  74. void outb(int, int);
  75. void outsb(int, void*, int);
  76. void outs(int, ushort);
  77. void outss(int, void*, int);
  78. void outl(int, ulong);
  79. void outsl(int, void*, int);
  80. int pciscan(int, Pcidev **);
  81. ulong pcibarsize(Pcidev *, int);
  82. int pcicfgr8(Pcidev*, int);
  83. int pcicfgr16(Pcidev*, int);
  84. int pcicfgr32(Pcidev*, int);
  85. void pcicfgw8(Pcidev*, int, int);
  86. void pcicfgw16(Pcidev*, int, int);
  87. void pcicfgw32(Pcidev*, int, int);
  88. void pciclrbme(Pcidev*);
  89. void pcihinv(Pcidev*);
  90. uchar pciipin(Pcidev *, uchar);
  91. Pcidev* pcimatch(Pcidev*, int, int);
  92. Pcidev* pcimatchtbdf(int);
  93. void pcireset(void);
  94. void pcisetbme(Pcidev*);
  95. #define procrestore(p)
  96. void procsave(Proc*);
  97. void procsetup(Proc*);
  98. void putdec(ulong);
  99. void puthid0(ulong);
  100. void puthid1(ulong);
  101. void putmsr(ulong);
  102. void putsdr1(ulong);
  103. void putsr(int, ulong);
  104. void raveninit(void);
  105. void screeninit(void);
  106. int screenprint(char*, ...); /* debugging */
  107. int segflush(void*, ulong);
  108. void sync(void);
  109. int tas(void*);
  110. void timeradd(Timer *);
  111. void timerdel(Timer *);
  112. void touser(void*);
  113. void trapinit(void);
  114. void trapvec(void);
  115. void tlbflush(ulong);
  116. void tlbflushall(void);
  117. void uartinstall(void);
  118. void uartwait(void); /* debugging */
  119. #define userureg(ur) (((ur)->status & MSR_PR) != 0)
  120. void watchreset(void);
  121. void wbflush(void);
  122. #define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
  123. #define KADDR(a) ((void*)((ulong)(a)|KZERO))
  124. #define PADDR(a) ((ulong)(a)&~KZERO)