7 /* _cpu_config==0 => Abel
8 * _cpu_config==1 => Zeta
9 * _cpu_config==2 => Phi
11 extern int _cpu_config
;
12 static volatile int *UART
;
13 static volatile int *TIMER
;
19 * Wait indefinitely for input byte
23 int __attribute__ ((weak
)) inbyte()
39 * Output one character to the serial port
43 void __attribute__ ((weak
)) outbyte(int c
)
45 /* Wait for space in FIFO */
46 while ((UART
[0]&0x100)==0);
50 static const int mhz
=64;
52 void __attribute__ ((weak
)) _initIO(void)
58 /* Phi board addresses */
59 UART
=(volatile int *)0x080a000c;
60 TIMER
=(volatile int *)0x080a0014;
61 MHZ
=(volatile int *)&mhz
;
65 UART
=(volatile int *)0xc000;
66 TIMER
=(volatile int *)0x9000;
67 MHZ
=(volatile int *)0x8800;
71 UART
=(volatile int *)0x80000024;
72 TIMER
=(volatile int *)0x80000100;
73 MHZ
=(volatile int *)0x80000200;
79 long long __attribute__ ((weak
)) _readCycles()
84 TIMER
[0]=0x2; /* sample timer */
88 clock
|=((long long )(TIMER
[i
]))<<(i
*32);