d75048edaf20489e7bbadf68e6d11accfb7b65aa
[tpg/acess2.git] / Kernel / arch / armv7 / debug.c
1 /**
2  * Acess2
3  * - By John Hodge (thePowersGang)
4  *
5  * arch/arm7/debug.c
6  * - ARM7 Debug output
7  * NOTE: Currently designed for the realview-pb-a8 emulated by Qemu
8  */
9 #include <acess.h>
10
11 // === CONSTANTS ===
12 //#define UART0_BASE    0x10009000
13 #define UART0_BASE      0xF1000000      // Boot time mapped
14
15 // === PROTOTYPES ===
16 void    KernelPanic_SetMode(void);
17 void    KernelPanic_PutChar(char Ch);
18 void    StartupPrint(const char *str);
19
20 // === GLOBALS ===
21  int    giDebug_SerialInitialised = 0;
22
23 // === CODE ===
24 void Debug_PutCharDebug(char ch)
25 {
26 //      while( *(volatile Uint32*)(SERIAL_BASE + SERIAL_REG_FLAG) & SERIAL_FLAG_FULL )
27                 ;
28         
29 //      *(volatile Uint32*)(SERIAL_BASE + SERIAL_REG_DATA) = ch;
30         *(volatile Uint32*)(UART0_BASE) = ch;
31 }
32
33 void Debug_PutStringDebug(const char *str)
34 {
35         for( ; *str; str++ )
36                 Debug_PutCharDebug( *str );
37 }
38
39 void KernelPanic_SetMode(void)
40 {
41 }
42
43 void KernelPanic_PutChar(char ch)
44 {
45 //      Debug_PutCharDebug(ch);
46 }
47
48 void StartupPrint(const char *str)
49 {
50 }
51

UCC git Repository :: git.ucc.asn.au