1124771Sgrehan/*-
2124771Sgrehan * Copyright (c) 2003 Jake Burkholder.
3124771Sgrehan * All rights reserved.
4124771Sgrehan *
5124771Sgrehan * Redistribution and use in source and binary forms, with or without
6124771Sgrehan * modification, are permitted provided that the following conditions
7124771Sgrehan * are met:
8124771Sgrehan * 1. Redistributions of source code must retain the above copyright
9124771Sgrehan *    notice, this list of conditions and the following disclaimer.
10124771Sgrehan * 2. Redistributions in binary form must reproduce the above copyright
11124771Sgrehan *    notice, this list of conditions and the following disclaimer in the
12124771Sgrehan *    documentation and/or other materials provided with the distribution.
13124771Sgrehan *
14124771Sgrehan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15124771Sgrehan * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16124771Sgrehan * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17124771Sgrehan * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18124771Sgrehan * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19124771Sgrehan * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20124771Sgrehan * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21124771Sgrehan * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22124771Sgrehan * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23124771Sgrehan * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24124771Sgrehan * SUCH DAMAGE.
25124771Sgrehan *
26124771Sgrehan */
27124771Sgrehan
28124771Sgrehan#include <sys/cdefs.h>
29124771Sgrehan__FBSDID("$FreeBSD$");
30124771Sgrehan
31124771Sgrehan#include <sys/param.h>
32124771Sgrehan#include <sys/systm.h>
33124771Sgrehan#include <sys/kernel.h>
34124771Sgrehan#include <sys/module.h>
35124771Sgrehan#include <sys/bus.h>
36124771Sgrehan#include <sys/cons.h>
37124771Sgrehan#include <sys/kbio.h>
38124771Sgrehan#include <sys/consio.h>
39124771Sgrehan#include <sys/sysctl.h>
40124771Sgrehan
41124771Sgrehan#include <dev/syscons/syscons.h>
42124771Sgrehan
43124771Sgrehanstatic sc_softc_t sc_softcs[8];
44124771Sgrehan
45124771Sgrehanint
46124771Sgrehansc_get_cons_priority(int *unit, int *flags)
47124771Sgrehan{
48124771Sgrehan
49124771Sgrehan	*unit = 0;
50124771Sgrehan	*flags = 0;
51124771Sgrehan	return (CN_INTERNAL);
52124771Sgrehan}
53124771Sgrehan
54124771Sgrehanint
55124771Sgrehansc_max_unit(void)
56124771Sgrehan{
57124771Sgrehan	return (1);
58124771Sgrehan}
59124771Sgrehan
60124771Sgrehansc_softc_t *
61124771Sgrehansc_get_softc(int unit, int flags)
62124771Sgrehan{
63124771Sgrehan	sc_softc_t *sc;
64124771Sgrehan
65124771Sgrehan	if (unit < 0)
66124771Sgrehan		return (NULL);
67124771Sgrehan	sc = &sc_softcs[unit];
68124771Sgrehan	sc->unit = unit;
69124771Sgrehan	if ((sc->flags & SC_INIT_DONE) == 0) {
70124771Sgrehan		sc->keyboard = -1;
71124771Sgrehan		sc->adapter = -1;
72124771Sgrehan		sc->cursor_char = SC_CURSOR_CHAR;
73124771Sgrehan		sc->mouse_char = SC_MOUSE_CHAR;
74124771Sgrehan	}
75124771Sgrehan	return (sc);
76124771Sgrehan}
77124771Sgrehan
78124771Sgrehanvoid
79124771Sgrehansc_get_bios_values(bios_values_t *values)
80124771Sgrehan{
81124771Sgrehan	values->cursor_start = 0;
82124771Sgrehan	values->cursor_end = 32;
83124771Sgrehan	values->shift_state = 0;
84124771Sgrehan}
85124771Sgrehan
86124771Sgrehanint
87124771Sgrehansc_tone(int hz)
88124771Sgrehan{
89124771Sgrehan	return (0);
90124771Sgrehan}
91