fvp.c (449B)
1 #include <os9/os9.h> 2 3 #include <string.h> 4 5 #include "arch.h" 6 7 static uint32_t *early = (uint32_t *) 0x1C090000; 8 9 10 Mach mach = { 11 .phystack = 0x80080000, 12 .phytext = 0x80000000, 13 .kzero = 0xFFFFFF0000000000 - 0x80000000, 14 }; 15 16 void 17 putch(int c) 18 { 19 char ch; 20 21 if (console) { 22 ch = c; 23 chanwrite(console, &ch, 1); 24 } else { 25 if (c == '\n') 26 putch('\r'); 27 while (inm32(early+6) & 1<<5) 28 ; 29 outm32(c, early); 30 } 31 32 barrier(DATA); 33 barrier(CODE); 34 }