1 /* $FreeBSD: src/sys/boot/arc/lib/arcconsole.c,v 1.2 1999/08/28 00:39:36 peter Exp $ */
2 /* $DragonFly: src/sys/boot/arc/lib/Attic/arcconsole.c,v 1.2 2003/06/17 04:28:16 dillon Exp $ */
3 /* $NetBSD: prom.c,v 1.3 1997/09/06 14:03:58 drochner Exp $ */
6 * Mach Operating System
7 * Copyright (c) 1992 Carnegie Mellon University
10 * Permission to use, copy, modify and distribute this software and its
11 * documentation is hereby granted, provided that both the copyright
12 * notice and this permission notice appear in all copies of the
13 * software, derivative works or modified versions, and any portions
14 * thereof, and that both notices appear in supporting documentation.
16 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
17 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
18 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
20 * Carnegie Mellon requests users of this software to return to
22 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
23 * School of Computer Science
24 * Carnegie Mellon University
25 * Pittsburgh PA 15213-3890
27 * any improvements or extensions that they make and grant Carnegie Mellon
28 * the rights to redistribute these changes.
31 #include <sys/types.h>
33 #include "bootstrap.h"
39 static void arc_probe(struct console *cp);
40 static int arc_init(int);
41 static void arc_putchar(int);
42 static int arc_getchar(void);
43 static int arc_poll(void);
45 struct console arcconsole = {
47 "ARC firmware console",
57 arc_probe(struct console *cp)
59 cp->c_flags |= C_PRESENTIN|C_PRESENTOUT;
74 Write(StandardOut, &cbuf, 1, &count);
77 static int saved_char = -1;
87 Read(StandardIn, &cbuf, 1, &count);
99 return GetReadStatus(StandardIn) == ESUCCESS;