fns.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #include "../port/portfns.h"
  2. ulong cankaddr(ulong);
  3. int cistrcmp(char*, char*);
  4. int cistrncmp(char*, char*, int);
  5. void clockinit(void);
  6. void clockintr(Ureg*);
  7. void clockintrsched(void);
  8. int cmpswap(long*, long, long);
  9. #define coherence() eieio()
  10. void cpuidprint(void);
  11. #define cycles(x) do{}while(0)
  12. void dcflush(void*, ulong);
  13. void delay(int);
  14. void dumpregs(Ureg*);
  15. void delayloopinit(void);
  16. void eieio(void);
  17. void evenaddr(ulong);
  18. void faultpower(Ureg*, ulong addr, int read);
  19. void fprestore(FPsave*);
  20. void fpsave(FPsave*);
  21. char* getconf(char*);
  22. ulong getdar(void);
  23. ulong getdec(void);
  24. ulong getdsisr(void);
  25. ulong gethid0(void);
  26. ulong gethid1(void);
  27. ulong getmsr(void);
  28. ulong getpvr(void);
  29. void gotopc(ulong);
  30. int havetimer(void);
  31. void hwintrinit(void);
  32. void i8250console(void);
  33. void i8259init(void);
  34. int i8259intack(void);
  35. int i8259enable(Vctl*);
  36. int i8259vecno(int);
  37. int i8259disable(int);
  38. void icflush(void*, ulong);
  39. #define idlehands() /* nothing to do in the runproc */
  40. int inb(int);
  41. void insb(int, void*, int);
  42. ushort ins(int);
  43. void inss(int, void*, int);
  44. ulong inl(int);
  45. void insl(int, void*, int);
  46. void intr(Ureg*);
  47. void intrenable(int, void (*)(Ureg*, void*), void*, int, char*);
  48. int ioalloc(int, int, int, char*);
  49. void iofree(int);
  50. void ioinit(void);
  51. int iprint(char*, ...);
  52. int isaconfig(char*, int, ISAConf*);
  53. void kbdinit(void);
  54. #define kexit(a)
  55. #define kmapinval()
  56. void links(void);
  57. void mmuinit(void);
  58. void mmusweep(void*);
  59. void mpicdisable(int);
  60. void mpicenable(int, Vctl*);
  61. int mpiceoi(int);
  62. int mpicintack(void);
  63. int newmmupid(void);
  64. void outb(int, int);
  65. void outsb(int, void*, int);
  66. void outs(int, ushort);
  67. void outss(int, void*, int);
  68. void outl(int, ulong);
  69. void outsl(int, void*, int);
  70. int pciscan(int, Pcidev **);
  71. ulong pcibarsize(Pcidev *, int);
  72. int pcicfgr8(Pcidev*, int);
  73. int pcicfgr16(Pcidev*, int);
  74. int pcicfgr32(Pcidev*, int);
  75. void pcicfgw8(Pcidev*, int, int);
  76. void pcicfgw16(Pcidev*, int, int);
  77. void pcicfgw32(Pcidev*, int, int);
  78. void pciclrbme(Pcidev*);
  79. void pcihinv(Pcidev*);
  80. uchar pciipin(Pcidev *, uchar);
  81. Pcidev* pcimatch(Pcidev*, int, int);
  82. Pcidev* pcimatchtbdf(int);
  83. void pcireset(void);
  84. void pcisetbme(Pcidev*);
  85. #define procrestore(p)
  86. void procsave(Proc*);
  87. void procsetup(Proc*);
  88. void putdec(ulong);
  89. void puthid0(ulong);
  90. void puthid1(ulong);
  91. void putmsr(ulong);
  92. void putsdr1(ulong);
  93. void putsr(int, ulong);
  94. void raveninit(void);
  95. void sync(void);
  96. int tas(void*);
  97. void timeradd(Timer *);
  98. void timerdel(Timer *);
  99. void touser(void*);
  100. void trapinit(void);
  101. void trapvec(void);
  102. void tlbflush(ulong);
  103. void tlbflushall(void);
  104. #define userureg(ur) (((ur)->status & MSR_PR) != 0)
  105. void watchreset(void);
  106. #define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
  107. #define KADDR(a) ((void*)((ulong)(a)|KZERO))
  108. #define PADDR(a) ((ulong)(a)&~KZERO)