Deleted Added
sdiff udiff text old ( 214348 ) new ( 225203 )
full compact
1/*-
2 * Copyright (C) 2008 by Nathan Whitehorn. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 9 unchanged lines hidden (view full) ---

18 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
19 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
20 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
21 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include <sys/cdefs.h>
26__FBSDID("$FreeBSD: head/sys/powerpc/mambo/mambo_console.c 225203 2011-08-26 21:46:36Z rwatson $");
27
28#include "opt_comconsole.h"
29
30#include <sys/param.h>
31#include <sys/kdb.h>
32#include <sys/kernel.h>
33#include <sys/priv.h>
34#include <sys/systm.h>

--- 20 unchanged lines hidden (view full) ---

55 .tsw_flags = TF_NOPREFIX,
56 .tsw_outwakeup = mambotty_outwakeup,
57};
58
59static int polltime;
60static struct callout mambo_callout;
61static struct tty *tp = NULL;
62
63#if defined(KDB)
64static int alt_break_state;
65#endif
66
67static void mambo_timeout(void *);
68
69static cn_probe_t mambo_cnprobe;
70static cn_init_t mambo_cninit;
71static cn_term_t mambo_cnterm;

--- 79 unchanged lines hidden (view full) ---

151static int
152mambo_cngetc(struct consdev *cp)
153{
154 int ch;
155
156 ch = mambocall(MAMBO_CONSOLE_READ);
157
158 if (ch > 0 && ch < 0xff) {
159#if defined(KDB)
160 kdb_alt_break(ch, &alt_break_state);
161#endif
162 return (ch);
163 }
164
165 return (-1);
166}
167
168static void
169mambo_cnputc(struct consdev *cp, int c)
170{
171 char cbuf;
172
173 cbuf = c;
174 mambocall(MAMBO_CONSOLE_WRITE, &cbuf, 1UL, 1UL);
175}