1 /* 2 * Copyright 2003-2006, Axel Dörfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 * 5 * Copyright 2001, Travis Geiselbrecht. All rights reserved. 6 * Distributed under the terms of the NewOS License. 7 */ 8 9 10 #include <arch_platform.h> 11 #include <arch/debug_console.h> 12 #include <boot/kernel_args.h> 13 #include <kernel.h> 14 #include <vm/vm.h> 15 16 #include <string.h> 17 18 19 void 20 arch_debug_remove_interrupt_handler(uint32 line) 21 { 22 } 23 24 25 void 26 arch_debug_install_interrupt_handlers(void) 27 { 28 } 29 30 31 int 32 arch_debug_blue_screen_try_getchar(void) 33 { 34 // TODO: Implement correctly! 35 return arch_debug_blue_screen_getchar(); 36 } 37 38 39 char 40 arch_debug_blue_screen_getchar(void) 41 { 42 return 0; 43 } 44 45 46 int 47 arch_debug_serial_try_getchar(void) 48 { 49 // TODO: Implement correctly! 50 return arch_debug_serial_getchar(); 51 } 52 53 54 char 55 arch_debug_serial_getchar(void) 56 { 57 return PPCPlatform::Default()->SerialDebugGetChar(); 58 } 59 60 61 void 62 arch_debug_serial_putchar(const char c) 63 { 64 return PPCPlatform::Default()->SerialDebugPutChar(c); 65 } 66 67 68 void 69 arch_debug_serial_puts(const char *s) 70 { 71 while (*s != '\0') { 72 arch_debug_serial_putchar(*s); 73 s++; 74 } 75 } 76 77 78 void 79 arch_debug_serial_early_boot_message(const char *string) 80 { 81 // this function will only be called in fatal situations 82 } 83 84 85 status_t 86 arch_debug_console_init(kernel_args *args) 87 { 88 return PPCPlatform::Default()->InitSerialDebug(args); 89 } 90 91 92 status_t 93 arch_debug_console_init_settings(kernel_args *args) 94 { 95 return B_OK; 96 } 97 98