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