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
19void
20arch_debug_remove_interrupt_handler(uint32 line)
21{
22}
23
24
25void
26arch_debug_install_interrupt_handlers(void)
27{
28}
29
30
31int
32arch_debug_blue_screen_try_getchar(void)
33{
34	// TODO: Implement correctly!
35	return arch_debug_blue_screen_getchar();
36}
37
38
39char
40arch_debug_blue_screen_getchar(void)
41{
42	return 0;
43}
44
45
46int
47arch_debug_serial_try_getchar(void)
48{
49	// TODO: Implement correctly!
50	return arch_debug_serial_getchar();
51}
52
53
54char
55arch_debug_serial_getchar(void)
56{
57	return SparcPlatform::Default()->SerialDebugGetChar();
58}
59
60
61void
62arch_debug_serial_putchar(const char c)
63{
64	return SparcPlatform::Default()->SerialDebugPutChar(c);
65}
66
67
68void
69arch_debug_serial_puts(const char *s)
70{
71	while (*s != '\0') {
72		arch_debug_serial_putchar(*s);
73		s++;
74	}
75}
76
77
78void
79arch_debug_serial_early_boot_message(const char *string)
80{
81	// this function will only be called in fatal situations
82}
83
84
85status_t
86arch_debug_console_init(kernel_args *args)
87{
88	return SparcPlatform::Default()->InitSerialDebug(args);
89}
90
91
92status_t
93arch_debug_console_init_settings(kernel_args *args)
94{
95	return B_OK;
96}
97
98