fns.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. #include "../port/portfns.h"
  2. ulong aifinit(uchar *aifarr);
  3. void aamloop(int);
  4. int archaudiopower(int);
  5. void archaudiomute(int);
  6. void archaudioamp(int);
  7. int archaudiospeed(int, int);
  8. void archcodecreset(void);
  9. void archconfinit(void);
  10. void archconsole(void);
  11. int archflash12v(int);
  12. int archhooksw(int);
  13. long archkprofmicrosecondspertick(void);
  14. void archkprofenable(int);
  15. void archlcdenable(int);
  16. void archpowerdown(void);
  17. void archpowerup(void);
  18. void archreboot(void);
  19. void archreset(void);
  20. vlong archrdtsc(void);
  21. ulong archrdtsc32(void);
  22. void archuartpower(int, int);
  23. void blankscreen(int);
  24. ulong call_apcs(ulong addr, int nargs, ...);
  25. ulong call_apcs0(ulong addr);
  26. ulong call_apcs1(ulong addr, ulong a1);
  27. ulong call_apcs2(ulong addr, ulong a1, ulong a2);
  28. ulong call_apcs3(ulong addr, ulong a1, ulong a2, ulong a3);
  29. void cisread(int slotno, void (*f)(int, uchar *));
  30. void clockcheck(void);
  31. void clockinit(void);
  32. void clockpoll(void);
  33. #define coherence() /* nothing to do for cache coherence for uniprocessor */
  34. void cursorhide(void);
  35. void cursorunhide(void);
  36. void dcflush(void*, ulong);
  37. void dcflushall(void);
  38. void dcinval(void);
  39. int dmaidle(Dma*);
  40. Dma* dmasetup(int device, int direction, int bigend, void(*)(void*,ulong), void*);
  41. int dmastart(Dma*, void*, int);
  42. int dmacontinue(Dma*, void*, int);
  43. void dmastop(Dma*);
  44. int dmaerror(Dma*);
  45. void dmafree(Dma*);
  46. void dmareset(void);
  47. void dmawait(Dma*);
  48. void dumplongs(char *, ulong *, int);
  49. void dumpregs(Ureg* ureg);
  50. void dumpstack(void);
  51. int fpiarm(Ureg*);
  52. void fpinit(void);
  53. ulong getcallerpc(void*);
  54. ulong getcpsr(void);
  55. ulong getcpuid(void);
  56. ulong getspsr(void);
  57. void gotopc(ulong);
  58. void icflushall(void);
  59. void _idlemode(void);
  60. void (*idle)(void);
  61. void idlehands(void);
  62. int inb(ulong);
  63. int ins(ulong);
  64. ulong inl(ulong);
  65. void outb(ulong, int);
  66. void outs(ulong, int);
  67. void outl(ulong, ulong);
  68. void inss(ulong, void*, int);
  69. void outss(ulong, void*, int);
  70. void insb(ulong, void*, int);
  71. void outsb(ulong, void*, int);
  72. void intrdisable(int, void (*)(Ureg*, void*), void*, int, char*);
  73. void intrenable(int, void (*)(Ureg*, void*), void*, int, char*);
  74. void iofree(int);
  75. #define iofree(x)
  76. void ioinit(void);
  77. int iounused(int, int);
  78. int ioalloc(int, int, int, char*);
  79. #define ioalloc(a,b,c,d) 0
  80. int iprint(char*, ...);
  81. void installprof(void (*)(Ureg *, int));
  82. int isvalid_va(void*);
  83. void kbdinit(void);
  84. void L3init(void);
  85. int L3read(int, void*, int);
  86. int L3write(int, void*, int);
  87. void lcd_setbacklight(int);
  88. void lcd_sethz(int);
  89. void lights(ulong);
  90. void links(void);
  91. ulong mcpgettfreq(void);
  92. void mcpinit(void);
  93. void mcpsettfreq(ulong tfreq);
  94. void mcpspeaker(int, int);
  95. void mcptelecomsetup(ulong hz, int adm, int xint, int rint);
  96. ushort mcpadcread(int ts);
  97. void mcptouchsetup(int ts);
  98. void mcptouchintrenable(void);
  99. void mcptouchintrdisable(void);
  100. void mcpgpiowrite(ushort mask, ushort data);
  101. void mcpgpiosetdir(ushort mask, ushort dir);
  102. ushort mcpgpioread(void);
  103. void* minicached(void*);
  104. void minidcflush(void);
  105. void mmuenable(ulong);
  106. ulong mmugetctl(void);
  107. ulong mmugetdac(void);
  108. ulong mmugetfar(void);
  109. ulong mmugetfsr(void);
  110. void mmuinit(void);
  111. void* mmuphysmap(ulong, ulong);
  112. void mmuputctl(ulong);
  113. void mmuputdac(ulong);
  114. void mmuputfsr(ulong);
  115. void mmuputttb(ulong);
  116. void mmureset(void);
  117. void mouseinit(void);
  118. void nowriteSeg(void *, void *);
  119. void* pa2va(ulong);
  120. void pcmcisread(PCMslot*);
  121. int pcmcistuple(int, int, int, void*, int);
  122. PCMmap* pcmmap(int, ulong, int, int);
  123. void pcmunmap(int, PCMmap*);
  124. int pcmpin(int slot, int type);
  125. void pcmpower(int slotno, int on);
  126. int pcmpowered(int);
  127. void pcmreset(int);
  128. void pcmsetvcc(int, int);
  129. void pcmsetvpp(int, int);
  130. int pcmspecial(char *idstr, ISAConf *isa);
  131. void pcmspecialclose(int slotno);
  132. void pcmintrenable(int, void (*)(Ureg*, void*), void*);
  133. void powerenable(void (*)(int));
  134. void powerdisable(void (*)(int));
  135. void powerdown(void);
  136. void powerinit(void);
  137. void powersuspend(void);
  138. #define procsave(p)
  139. #define procrestore(p)
  140. long rtctime(void);
  141. void screeninit(void);
  142. void (*screenputs)(char*, int);
  143. int segflush(void*, ulong);
  144. void setpanic(void);
  145. void setr13(int, void*);
  146. int splfhi(void);
  147. int splflo(void);
  148. void _suspendcode(void);
  149. void tlbinvalidate(void);
  150. void tlbinvalidateaddr(void*);
  151. void trapinit(void);
  152. void trapstacks(void);
  153. void trapspecial(int (*)(Ureg *, uint));
  154. int uartprint(char*, ...);
  155. void uartspecial(int, int, char, Queue**, Queue**, int (*)(Queue*, int));
  156. ulong va2pa(void*);
  157. void vectors(void);
  158. void vtable(void);
  159. #define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1]))
  160. int wasbusy(int);
  161. #define KADDR(p) ((void *) p)
  162. #define PADDR(v) va2pa((void*)(v))
  163. // #define timer_start() (*OSCR)
  164. // #define timer_ticks(t) (*OSCR - (ulong)(t))
  165. ulong timer_start(void);
  166. ulong timer_ticks(ulong);
  167. int timer_devwait(ulong *adr, ulong mask, ulong val, int ost);
  168. void timer_setwatchdog(int ost);
  169. void timer_delay(int ost);
  170. ulong ms2tmr(int ms);
  171. int tmr2ms(ulong t);
  172. void delay(int ms);
  173. ulong us2tmr(int us);
  174. int tmr2us(ulong t);
  175. void microdelay(int us);