1 #include "../port/portfns.h" 2 3 ulong aifinit(uchar *aifarr); 4 void aamloop(int); 5 void archconfinit(void); 6 int archflash12v(int); 7 void archflashwp(int); 8 void archreboot(void); 9 void archreset(void); 10 void catchDref(char *s, void *v); 11 void catchDval(char *s, ulong v, ulong m); 12 void catchIref(char *s, void *a); 13 void cisread(int slotno, void (*f)(int, uchar *)); 14 int cistrcmp(char *, char *); 15 void cleanDentry(void *); 16 void clockcheck(void); 17 void clockinit(void); 18 void clockpoll(void); 19 #define coherence() /* nothing to do for cache coherence for uniprocessor */ 20 uint cpsrr(void); 21 void cursorhide(void); 22 void cursorunhide(void); 23 void dmasetup(int channel, int device, int direction, int endianess); 24 void dmastart(int channel, void *b1, int b1siz, void *b2, int b2siz); 25 int dmacontinue(int channel, void *buf, int bufsize); 26 void dmastop(int channel); 27 int dmaerror(int channel); 28 void dmareset(void); 29 void drainWBuffer(void); 30 void dumplongs(char *, ulong *, int); 31 void dumpregs(Ureg* ureg); 32 void dumpstk(ulong *); 33 void flushDcache(void); 34 void flushIDC(void); 35 void flushIcache(void); 36 void flushDentry(void *); 37 void flushTLB(void); 38 int fpiarm(Ureg*); 39 void fpinit(void); 40 ulong getcallerpc(void*); 41 void gotopc(ulong); 42 #define idlehands() /* nothing to do in the runproc */ 43 void intrenable(int, void (*)(Ureg*, void*), void*, int); 44 void intrclear(int, int); 45 void intrmask(int, int); 46 void intrunmask(int, int); 47 int iprint(char *fmt, ...); 48 void installprof(void (*)(Ureg *, int)); 49 int isvalid_va(void*); 50 void kbdinit(void); 51 void lcd_setbacklight(int); 52 void lcd_setbrightness(ushort); 53 void lcd_setcontrast(ushort); 54 void lcd_sethz(int); 55 void lights(ulong); 56 void setled7ascii(char); 57 void links(void); 58 ulong mcpgettfreq(void); 59 void mcpinit(void); 60 void mcpsettfreq(ulong tfreq); 61 void mcpspeaker(int, int); 62 void mcptelecomsetup(ulong hz, uchar adm, uchar xint, uchar rint); 63 ushort mcpadcread(int ts); 64 void mcptouchsetup(int ts); 65 void mcptouchintrenable(void); 66 void mcptouchintrdisable(void); 67 void mcpgpiowrite(ushort mask, ushort data); 68 void mcpgpiosetdir(ushort mask, ushort dir); 69 ushort mcpgpioread(void); 70 void mmuinit(void); 71 ulong mmuctlregr(void); 72 void mmuctlregw(ulong); 73 ulong mmuregr(int); 74 void mmuregw(int, ulong); 75 void mmureset(void); 76 void mouseinit(void); 77 void nowriteSeg(void *, void *); 78 void* pa2va(ulong); 79 int pcmpin(int slot, int type); 80 void pcmpower(int slotno, int on); 81 int pcmpowered(int slotno); 82 void pcmsetvcc(int slotno, int vcc); 83 void pcmsetvpp(int slotno, int vpp); 84 int pcmspecial(char *idstr, ISAConf *isa); 85 void pcmspecialclose(int slotno); 86 void pcmintrenable(int, void (*)(Ureg*, void*), void*); 87 void putcsr(ulong); 88 #define procsave(p) 89 #define procrestore(p) 90 void remaplomem(void); 91 long rtctime(void); 92 void* screenalloc(ulong); 93 void screeninit(void); 94 void screenputs(char*, int); 95 int segflush(void*, ulong); 96 void setpanic(void); 97 void setr13(int, void*); 98 uint spsrr(void); 99 void touchrawcal(int q, int px, int py); 100 int touchcalibrate(void); 101 int touchreadxy(int *fx, int *fy); 102 int touchpressed(void); 103 int touchreleased(void); 104 void touchsetrawcal(int q, int n, int v); 105 int touchgetrawcal(int q, int n); 106 void trapinit(void); 107 void trapspecial(int (*)(Ureg *, uint)); 108 int uartprint(char*, ...); 109 void uartspecial(int, int, char, Queue**, Queue**, int (*)(Queue*, int)); 110 void umbfree(ulong addr, int size); 111 ulong umbmalloc(ulong addr, int size, int align); 112 void umbscan(void); 113 ulong va2pa(void*); 114 void vectors(void); 115 void vtable(void); 116 #define waserror() (up->nerrlab++, setlabel(&up->errlab[up->nerrlab-1])) 117 int wasbusy(int); 118 void _vfiqcall(void); 119 void _virqcall(void); 120 void _vundcall(void); 121 void _vsvccall(void); 122 void _vpabcall(void); 123 void _vdabcall(void); 124 void vgaputc(char); 125 void writeBackBDC(void); 126 void writeBackDC(void); 127 128 #define KADDR(p) ((void *) p) 129 #define PADDR(v) va2pa((void*)(v)) 130 131 // #define timer_start() (*OSCR) 132 // #define timer_ticks(t) (*OSCR - (ulong)(t)) 133 #define DELAY(ms) timer_delay(MS2TMR(ms)) 134 #define MICRODELAY(us) timer_delay(US2TMR(us)) 135 ulong timer_start(void); 136 ulong timer_ticks(ulong); 137 int timer_devwait(ulong *adr, ulong mask, ulong val, int ost); 138 void timer_setwatchdog(int ost); 139 void timer_delay(int ost); 140 ulong ms2tmr(int ms); 141 int tmr2ms(ulong t); 142 void delay(int ms); 143 ulong us2tmr(int us); 144 int tmr2us(ulong t); 145 void microdelay(int us); 146