Lines Matching +full:dc +full:- +full:to +full:- +full:dc

1 /*-
2 * SPDX-License-Identifier: BSD-4-Clause
21 * may be used to endorse or promote products derived from this software
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
88 #define DCONS_FORCE_CONSOLE 0 /* Mostly for FreeBSD-4/DragonFly */
151 dcons_check_break(struct dcons_softc *dc, int c)
158 if ((dc->flags & DC_GDB) != 0 && gdb_cur == &dcons_gdb_dbgport)
159 kdb_alt_break_gdb(c, &dc->brk_state);
162 kdb_alt_break(c, &dc->brk_state);
167 #define dcons_check_break(dc, c) (c)
171 dcons_os_checkc_nopoll(struct dcons_softc *dc)
178 c = dcons_check_break(dc, dcons_checkc(dc));
187 dcons_os_checkc(struct dcons_softc *dc)
190 return (dcons_os_checkc_nopoll(dc));
194 dcons_os_putc(struct dcons_softc *dc, int c)
199 dcons_putc(dc, c);
216 struct dcons_softc *dc;
219 dc = tty_softc(tp);
222 dcons_os_putc(dc, ch);
229 struct dcons_softc *dc;
233 dc = &sc[i];
234 tp = dc->tty;
237 while ((c = dcons_os_checkc_nopoll(dc)) != -1) {
254 sprintf(cp->cn_name, "dcons");
256 cp->cn_pri = CN_REMOTE;
258 cp->cn_pri = CN_NORMAL;
266 cp->cn_arg = (void *)&sc[DCONS_CON]; /* share port0 with unit0 */
287 struct dcons_softc *dc = (struct dcons_softc *)cp->cn_arg;
288 return (dcons_os_checkc(dc));
294 struct dcons_softc *dc = (struct dcons_softc *)cp->cn_arg;
295 dcons_os_putc(dc, c);
308 drv_init = -1;
322 * Allow read/write access to dcons buffer.
328 /* XXX P to V */
357 * bssbuf could be non-continuous.
362 return (-1);
378 struct dcons_softc *dc;
381 dc = &sc[port];
382 tp = tty_alloc(&dcons_ttydevsw, dc);
383 dc->flags = flags;
384 dc->tty = tp;
407 struct dcons_softc *dc;
409 dc = &sc[port];
410 tp = dc->tty;
428 if (ret != -1)
443 dg.buf->magic = 0;
448 /* Wait for tty deferred free callbacks to complete. */
454 dg.buf->magic = 0;
468 dcons_os_getc(struct dcons_softc *dc)
472 while ((c = dcons_os_checkc(dc)) == -1);
483 return (-1);
500 struct dcons_softc *dc = &sc[DCONS_GDB];
501 dcons_os_putc(dc, c);
507 struct dcons_softc *dc = &sc[DCONS_GDB];
508 return (dcons_os_getc(dc));