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