summaryrefslogtreecommitdiff
path: root/sys/arch/arc/dev/pccons.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/arc/dev/pccons.c')
-rw-r--r--sys/arch/arc/dev/pccons.c323
1 files changed, 181 insertions, 142 deletions
diff --git a/sys/arch/arc/dev/pccons.c b/sys/arch/arc/dev/pccons.c
index 0b4174f589c..cfb1359cc40 100644
--- a/sys/arch/arc/dev/pccons.c
+++ b/sys/arch/arc/dev/pccons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccons.c,v 1.13 1997/04/10 16:29:19 pefo Exp $ */
+/* $OpenBSD: pccons.c,v 1.14 1997/04/19 17:19:53 pefo Exp $ */
/* $NetBSD: pccons.c,v 1.89 1995/05/04 19:35:20 cgd Exp $ */
/*-
@@ -72,6 +72,7 @@
#include <machine/display.h>
#include <machine/pccons.h>
#include <arc/arc/arctype.h>
+#include <arc/arc/arcbios.h>
#include <arc/pica/pica.h>
#include <arc/dti/desktech.h>
@@ -104,6 +105,8 @@ static u_short cursor_shape = 0xffff, /* don't update until set by user */
static pccons_keymap_t scan_codes[KB_NUM_KEYS];/* keyboard translation table */
int pc_xmode = 0;
+cdev_decl(pc);
+
/*
* Keyboard output queue.
*/
@@ -150,6 +153,25 @@ struct pms_softc { /* driver status information */
int pcprobe __P((struct device *, void *, void *));
void pcattach __P((struct device *, struct device *, void *));
int pcintr __P((void *));
+void pc_xmode_on __P((void));
+void pc_xmode_off __P((void));
+static u_char kbc_get8042cmd __P((void));
+static int kbc_put8042cmd __P((u_char));
+int kbd_cmd __P((u_char, u_char));
+static __inline int kbd_wait_output __P((void));
+static __inline int kbd_wait_input __P((void));
+static __inline void kbd_flush_input __P((void));
+void set_cursor_shape __P((void));
+void get_cursor_shape __P((void));
+void async_update __P((void));
+void do_async_update __P((u_char));;
+
+void pccnprobe __P((struct consdev *));
+void pccninit __P((struct consdev *));
+void pccnputc __P((dev_t, char c));
+int pccngetc __P((dev_t));
+void pccnpollc __P((dev_t, int));
+
struct cfdriver pc_cd = {
NULL, "pc", DV_TTY, NULL, 0
@@ -189,11 +211,13 @@ static unsigned int kbd_datap = 0x60;
char *sget __P((void));
void sput __P((u_char *, int));
-void pcstart();
-int pcparam();
+void pcstart __P((struct tty *));
+int pcparam __P((struct tty *, struct termios *));
+static __inline void wcopy __P((void *, void *, u_int));
+
char partab[];
-extern pcopen(dev_t, int, int, struct proc *);
+extern void fillw __P((int, u_int16_t *, int));
#define KBD_DELAY \
DELAY(10);
@@ -253,7 +277,7 @@ kbd_flush_input()
{
u_char c;
- while (c = inb(kbd_cmdp) & 0x03)
+ while ((c = inb(kbd_cmdp)) & 0x03)
if ((c & KBS_DIB) == KBS_DIB) {
/* XXX - delay is needed to prevent some keyboards from
wedging when the system boots */
@@ -426,13 +450,13 @@ async_update()
if (kernel || polling) {
if (async)
- untimeout(do_async_update, NULL);
+ untimeout((void(*)(void *))do_async_update, NULL);
do_async_update(1);
} else {
if (async)
return;
async = 1;
- timeout(do_async_update, NULL, 1);
+ timeout((void(*)(void *))do_async_update, NULL, 1);
}
}
@@ -763,7 +787,7 @@ pcstart(tp)
struct tty *tp;
{
struct clist *cl;
- int s, len, n;
+ int s, len;
u_char buf[PCBURST];
s = spltty();
@@ -795,12 +819,12 @@ out:
splx(s);
}
-void
+int
pcstop(tp, flag)
struct tty *tp;
int flag;
{
-
+ return(0);
}
void
@@ -886,6 +910,7 @@ pccnputc(dev, c)
}
/* ARGSUSED */
+int
pccngetc(dev)
dev_t dev;
{
@@ -1338,7 +1363,7 @@ sput(cp, n)
fillw((vs.at << 8) | ' ',
Crtat + vs.ncol * (vs.nrow - cx),
vs.ncol * cx);
- /* crtat -= vs.ncol * cx; /* XXX */
+ /* crtat -= vs.ncol * cx; XXX */
vs.state = 0;
break;
}
@@ -1388,7 +1413,7 @@ sput(cp, n)
#endif
fillw((vs.at << 8) | ' ', Crtat,
vs.ncol * cx);
- /* crtat += vs.ncol * cx; /* XXX */
+ /* crtat += vs.ncol * cx; XXX */
vs.state = 0;
break;
}
@@ -1486,134 +1511,134 @@ sput(cp, n)
left and right shift when reading the keyboard map */
static pccons_keymap_t scan_codes[KB_NUM_KEYS] = {
/* type unshift shift control altgr shift_altgr scancode */
- KB_NONE, "", "", "", "", "", /* 0 unused */
- KB_ASCII, "\033", "\033", "\033", "", "", /* 1 ESCape */
- KB_ASCII, "1", "!", "!", "", "", /* 2 1 */
- KB_ASCII, "2", "@", "\000", "", "", /* 3 2 */
- KB_ASCII, "3", "#", "#", "", "", /* 4 3 */
- KB_ASCII, "4", "$", "$", "", "", /* 5 4 */
- KB_ASCII, "5", "%", "%", "", "", /* 6 5 */
- KB_ASCII, "6", "^", "\036", "", "", /* 7 6 */
- KB_ASCII, "7", "&", "&", "", "", /* 8 7 */
- KB_ASCII, "8", "*", "\010", "", "", /* 9 8 */
- KB_ASCII, "9", "(", "(", "", "", /* 10 9 */
- KB_ASCII, "0", ")", ")", "", "", /* 11 0 */
- KB_ASCII, "-", "_", "\037", "", "", /* 12 - */
- KB_ASCII, "=", "+", "+", "", "", /* 13 = */
- KB_ASCII, "\177", "\177", "\010", "", "", /* 14 backspace */
- KB_ASCII, "\t", "\t", "\t", "", "", /* 15 tab */
- KB_ASCII, "q", "Q", "\021", "", "", /* 16 q */
- KB_ASCII, "w", "W", "\027", "", "", /* 17 w */
- KB_ASCII, "e", "E", "\005", "", "", /* 18 e */
- KB_ASCII, "r", "R", "\022", "", "", /* 19 r */
- KB_ASCII, "t", "T", "\024", "", "", /* 20 t */
- KB_ASCII, "y", "Y", "\031", "", "", /* 21 y */
- KB_ASCII, "u", "U", "\025", "", "", /* 22 u */
- KB_ASCII, "i", "I", "\011", "", "", /* 23 i */
- KB_ASCII, "o", "O", "\017", "", "", /* 24 o */
- KB_ASCII, "p", "P", "\020", "", "", /* 25 p */
- KB_ASCII, "[", "{", "\033", "", "", /* 26 [ */
- KB_ASCII, "]", "}", "\035", "", "", /* 27 ] */
- KB_ASCII, "\r", "\r", "\n", "", "", /* 28 return */
- KB_CTL, "", "", "", "", "", /* 29 control */
- KB_ASCII, "a", "A", "\001", "", "", /* 30 a */
- KB_ASCII, "s", "S", "\023", "", "", /* 31 s */
- KB_ASCII, "d", "D", "\004", "", "", /* 32 d */
- KB_ASCII, "f", "F", "\006", "", "", /* 33 f */
- KB_ASCII, "g", "G", "\007", "", "", /* 34 g */
- KB_ASCII, "h", "H", "\010", "", "", /* 35 h */
- KB_ASCII, "j", "J", "\n", "", "", /* 36 j */
- KB_ASCII, "k", "K", "\013", "", "", /* 37 k */
- KB_ASCII, "l", "L", "\014", "", "", /* 38 l */
- KB_ASCII, ";", ":", ";", "", "", /* 39 ; */
- KB_ASCII, "'", "\"", "'", "", "", /* 40 ' */
- KB_ASCII, "`", "~", "`", "", "", /* 41 ` */
- KB_SHIFT, "\001", "", "", "", "", /* 42 shift */
- KB_ASCII, "\\", "|", "\034", "", "", /* 43 \ */
- KB_ASCII, "z", "Z", "\032", "", "", /* 44 z */
- KB_ASCII, "x", "X", "\030", "", "", /* 45 x */
- KB_ASCII, "c", "C", "\003", "", "", /* 46 c */
- KB_ASCII, "v", "V", "\026", "", "", /* 47 v */
- KB_ASCII, "b", "B", "\002", "", "", /* 48 b */
- KB_ASCII, "n", "N", "\016", "", "", /* 49 n */
- KB_ASCII, "m", "M", "\r", "", "", /* 50 m */
- KB_ASCII, ",", "<", "<", "", "", /* 51 , */
- KB_ASCII, ".", ">", ">", "", "", /* 52 . */
- KB_ASCII, "/", "?", "\037", "", "", /* 53 / */
- KB_SHIFT, "\002", "", "", "", "", /* 54 shift */
- KB_KP, "*", "*", "*", "", "", /* 55 kp * */
- KB_ALT, "", "", "", "", "", /* 56 alt */
- KB_ASCII, " ", " ", "\000", "", "", /* 57 space */
- KB_CAPS, "", "", "", "", "", /* 58 caps */
- KB_FUNC, "\033[M", "\033[Y", "\033[k", "", "", /* 59 f1 */
- KB_FUNC, "\033[N", "\033[Z", "\033[l", "", "", /* 60 f2 */
- KB_FUNC, "\033[O", "\033[a", "\033[m", "", "", /* 61 f3 */
- KB_FUNC, "\033[P", "\033[b", "\033[n", "", "", /* 62 f4 */
- KB_FUNC, "\033[Q", "\033[c", "\033[o", "", "", /* 63 f5 */
- KB_FUNC, "\033[R", "\033[d", "\033[p", "", "", /* 64 f6 */
- KB_FUNC, "\033[S", "\033[e", "\033[q", "", "", /* 65 f7 */
- KB_FUNC, "\033[T", "\033[f", "\033[r", "", "", /* 66 f8 */
- KB_FUNC, "\033[U", "\033[g", "\033[s", "", "", /* 67 f9 */
- KB_FUNC, "\033[V", "\033[h", "\033[t", "", "", /* 68 f10 */
- KB_NUM, "", "", "", "", "", /* 69 num lock */
- KB_SCROLL, "", "", "", "", "", /* 70 scroll lock */
- KB_KP, "7", "\033[H", "7", "", "", /* 71 kp 7 */
- KB_KP, "8", "\033[A", "8", "", "", /* 72 kp 8 */
- KB_KP, "9", "\033[I", "9", "", "", /* 73 kp 9 */
- KB_KP, "-", "-", "-", "", "", /* 74 kp - */
- KB_KP, "4", "\033[D", "4", "", "", /* 75 kp 4 */
- KB_KP, "5", "\033[E", "5", "", "", /* 76 kp 5 */
- KB_KP, "6", "\033[C", "6", "", "", /* 77 kp 6 */
- KB_KP, "+", "+", "+", "", "", /* 78 kp + */
- KB_KP, "1", "\033[F", "1", "", "", /* 79 kp 1 */
- KB_KP, "2", "\033[B", "2", "", "", /* 80 kp 2 */
- KB_KP, "3", "\033[G", "3", "", "", /* 81 kp 3 */
- KB_KP, "0", "\033[L", "0", "", "", /* 82 kp 0 */
- KB_KP, ",", "\177", ",", "", "", /* 83 kp , */
- KB_NONE, "", "", "", "", "", /* 84 0 */
- KB_NONE, "", "", "", "", "", /* 85 0 */
- KB_NONE, "", "", "", "", "", /* 86 0 */
- KB_FUNC, "\033[W", "\033[i", "\033[u", "", "", /* 87 f11 */
- KB_FUNC, "\033[X", "\033[j", "\033[v", "", "", /* 88 f12 */
- KB_NONE, "", "", "", "", "", /* 89 0 */
- KB_NONE, "", "", "", "", "", /* 90 0 */
- KB_NONE, "", "", "", "", "", /* 91 0 */
- KB_NONE, "", "", "", "", "", /* 92 0 */
- KB_NONE, "", "", "", "", "", /* 93 0 */
- KB_NONE, "", "", "", "", "", /* 94 0 */
- KB_NONE, "", "", "", "", "", /* 95 0 */
- KB_NONE, "", "", "", "", "", /* 96 0 */
- KB_NONE, "", "", "", "", "", /* 97 0 */
- KB_NONE, "", "", "", "", "", /* 98 0 */
- KB_NONE, "", "", "", "", "", /* 99 0 */
- KB_NONE, "", "", "", "", "", /* 100 */
- KB_NONE, "", "", "", "", "", /* 101 */
- KB_NONE, "", "", "", "", "", /* 102 */
- KB_NONE, "", "", "", "", "", /* 103 */
- KB_NONE, "", "", "", "", "", /* 104 */
- KB_NONE, "", "", "", "", "", /* 105 */
- KB_NONE, "", "", "", "", "", /* 106 */
- KB_NONE, "", "", "", "", "", /* 107 */
- KB_NONE, "", "", "", "", "", /* 108 */
- KB_NONE, "", "", "", "", "", /* 109 */
- KB_NONE, "", "", "", "", "", /* 110 */
- KB_NONE, "", "", "", "", "", /* 111 */
- KB_NONE, "", "", "", "", "", /* 112 */
- KB_NONE, "", "", "", "", "", /* 113 */
- KB_NONE, "", "", "", "", "", /* 114 */
- KB_NONE, "", "", "", "", "", /* 115 */
- KB_NONE, "", "", "", "", "", /* 116 */
- KB_NONE, "", "", "", "", "", /* 117 */
- KB_NONE, "", "", "", "", "", /* 118 */
- KB_NONE, "", "", "", "", "", /* 119 */
- KB_NONE, "", "", "", "", "", /* 120 */
- KB_NONE, "", "", "", "", "", /* 121 */
- KB_NONE, "", "", "", "", "", /* 122 */
- KB_NONE, "", "", "", "", "", /* 123 */
- KB_NONE, "", "", "", "", "", /* 124 */
- KB_NONE, "", "", "", "", "", /* 125 */
- KB_NONE, "", "", "", "", "", /* 126 */
- KB_NONE, "", "", "", "", "" /* 127 */
+ { KB_NONE, "", "", "", "", ""}, /* 0 unused */
+ { KB_ASCII, "\033", "\033", "\033", "", ""}, /* 1 ESCape */
+ { KB_ASCII, "1", "!", "!", "", ""}, /* 2 1 */
+ { KB_ASCII, "2", "@", "\000", "", ""}, /* 3 2 */
+ { KB_ASCII, "3", "#", "#", "", ""}, /* 4 3 */
+ { KB_ASCII, "4", "$", "$", "", ""}, /* 5 4 */
+ { KB_ASCII, "5", "%", "%", "", ""}, /* 6 5 */
+ { KB_ASCII, "6", "^", "\036", "", ""}, /* 7 6 */
+ { KB_ASCII, "7", "&", "&", "", ""}, /* 8 7 */
+ { KB_ASCII, "8", "*", "\010", "", ""}, /* 9 8 */
+ { KB_ASCII, "9", "(", "(", "", ""}, /* 10 9 */
+ { KB_ASCII, "0", ")", ")", "", ""}, /* 11 0 */
+ { KB_ASCII, "-", "_", "\037", "", ""}, /* 12 - */
+ { KB_ASCII, "=", "+", "+", "", ""}, /* 13 = */
+ { KB_ASCII, "\177", "\177", "\010", "", ""}, /* 14 backspace */
+ { KB_ASCII, "\t", "\t", "\t", "", ""}, /* 15 tab */
+ { KB_ASCII, "q", "Q", "\021", "", ""}, /* 16 q */
+ { KB_ASCII, "w", "W", "\027", "", ""}, /* 17 w */
+ { KB_ASCII, "e", "E", "\005", "", ""}, /* 18 e */
+ { KB_ASCII, "r", "R", "\022", "", ""}, /* 19 r */
+ { KB_ASCII, "t", "T", "\024", "", ""}, /* 20 t */
+ { KB_ASCII, "y", "Y", "\031", "", ""}, /* 21 y */
+ { KB_ASCII, "u", "U", "\025", "", ""}, /* 22 u */
+ { KB_ASCII, "i", "I", "\011", "", ""}, /* 23 i */
+ { KB_ASCII, "o", "O", "\017", "", ""}, /* 24 o */
+ { KB_ASCII, "p", "P", "\020", "", ""}, /* 25 p */
+ { KB_ASCII, "[", "{", "\033", "", ""}, /* 26 [ */
+ { KB_ASCII, "]", "}", "\035", "", ""}, /* 27 ] */
+ { KB_ASCII, "\r", "\r", "\n", "", ""}, /* 28 return */
+ { KB_CTL, "", "", "", "", ""}, /* 29 control */
+ { KB_ASCII, "a", "A", "\001", "", ""}, /* 30 a */
+ { KB_ASCII, "s", "S", "\023", "", ""}, /* 31 s */
+ { KB_ASCII, "d", "D", "\004", "", ""}, /* 32 d */
+ { KB_ASCII, "f", "F", "\006", "", ""}, /* 33 f */
+ { KB_ASCII, "g", "G", "\007", "", ""}, /* 34 g */
+ { KB_ASCII, "h", "H", "\010", "", ""}, /* 35 h */
+ { KB_ASCII, "j", "J", "\n", "", ""}, /* 36 j */
+ { KB_ASCII, "k", "K", "\013", "", ""}, /* 37 k */
+ { KB_ASCII, "l", "L", "\014", "", ""}, /* 38 l */
+ { KB_ASCII, ";", ":", ";", "", ""}, /* 39 ; */
+ { KB_ASCII, "'", "\"", "'", "", ""}, /* 40 ' */
+ { KB_ASCII, "`", "~", "`", "", ""}, /* 41 ` */
+ { KB_SHIFT, "\001", "", "", "", ""}, /* 42 shift */
+ { KB_ASCII, "\\", "|", "\034", "", ""}, /* 43 \ */
+ { KB_ASCII, "z", "Z", "\032", "", ""}, /* 44 z */
+ { KB_ASCII, "x", "X", "\030", "", ""}, /* 45 x */
+ { KB_ASCII, "c", "C", "\003", "", ""}, /* 46 c */
+ { KB_ASCII, "v", "V", "\026", "", ""}, /* 47 v */
+ { KB_ASCII, "b", "B", "\002", "", ""}, /* 48 b */
+ { KB_ASCII, "n", "N", "\016", "", ""}, /* 49 n */
+ { KB_ASCII, "m", "M", "\r", "", ""}, /* 50 m */
+ { KB_ASCII, ",", "<", "<", "", ""}, /* 51 , */
+ { KB_ASCII, ".", ">", ">", "", ""}, /* 52 . */
+ { KB_ASCII, "/", "?", "\037", "", ""}, /* 53 / */
+ { KB_SHIFT, "\002", "", "", "", ""}, /* 54 shift */
+ { KB_KP, "*", "*", "*", "", ""}, /* 55 kp * */
+ { KB_ALT, "", "", "", "", ""}, /* 56 alt */
+ { KB_ASCII, " ", " ", "\000", "", ""}, /* 57 space */
+ { KB_CAPS, "", "", "", "", ""}, /* 58 caps */
+ { KB_FUNC, "\033[M", "\033[Y", "\033[k", "", ""}, /* 59 f1 */
+ { KB_FUNC, "\033[N", "\033[Z", "\033[l", "", ""}, /* 60 f2 */
+ { KB_FUNC, "\033[O", "\033[a", "\033[m", "", ""}, /* 61 f3 */
+ { KB_FUNC, "\033[P", "\033[b", "\033[n", "", ""}, /* 62 f4 */
+ { KB_FUNC, "\033[Q", "\033[c", "\033[o", "", ""}, /* 63 f5 */
+ { KB_FUNC, "\033[R", "\033[d", "\033[p", "", ""}, /* 64 f6 */
+ { KB_FUNC, "\033[S", "\033[e", "\033[q", "", ""}, /* 65 f7 */
+ { KB_FUNC, "\033[T", "\033[f", "\033[r", "", ""}, /* 66 f8 */
+ { KB_FUNC, "\033[U", "\033[g", "\033[s", "", ""}, /* 67 f9 */
+ { KB_FUNC, "\033[V", "\033[h", "\033[t", "", ""}, /* 68 f10 */
+ { KB_NUM, "", "", "", "", ""}, /* 69 num lock */
+ { KB_SCROLL, "", "", "", "", ""}, /* 70 scroll lock */
+ { KB_KP, "7", "\033[H", "7", "", ""}, /* 71 kp 7 */
+ { KB_KP, "8", "\033[A", "8", "", ""}, /* 72 kp 8 */
+ { KB_KP, "9", "\033[I", "9", "", ""}, /* 73 kp 9 */
+ { KB_KP, "-", "-", "-", "", ""}, /* 74 kp - */
+ { KB_KP, "4", "\033[D", "4", "", ""}, /* 75 kp 4 */
+ { KB_KP, "5", "\033[E", "5", "", ""}, /* 76 kp 5 */
+ { KB_KP, "6", "\033[C", "6", "", ""}, /* 77 kp 6 */
+ { KB_KP, "+", "+", "+", "", ""}, /* 78 kp + */
+ { KB_KP, "1", "\033[F", "1", "", ""}, /* 79 kp 1 */
+ { KB_KP, "2", "\033[B", "2", "", ""}, /* 80 kp 2 */
+ { KB_KP, "3", "\033[G", "3", "", ""}, /* 81 kp 3 */
+ { KB_KP, "0", "\033[L", "0", "", ""}, /* 82 kp 0 */
+ { KB_KP, ",", "\177", ",", "", ""}, /* 83 kp , */
+ { KB_NONE, "", "", "", "", ""}, /* 84 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 85 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 86 0 */
+ { KB_FUNC, "\033[W", "\033[i", "\033[u", "", ""}, /* 87 f11 */
+ { KB_FUNC, "\033[X", "\033[j", "\033[v", "", ""}, /* 88 f12 */
+ { KB_NONE, "", "", "", "", ""}, /* 89 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 90 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 91 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 92 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 93 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 94 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 95 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 96 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 97 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 98 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 99 0 */
+ { KB_NONE, "", "", "", "", ""}, /* 100 */
+ { KB_NONE, "", "", "", "", ""}, /* 101 */
+ { KB_NONE, "", "", "", "", ""}, /* 102 */
+ { KB_NONE, "", "", "", "", ""}, /* 103 */
+ { KB_NONE, "", "", "", "", ""}, /* 104 */
+ { KB_NONE, "", "", "", "", ""}, /* 105 */
+ { KB_NONE, "", "", "", "", ""}, /* 106 */
+ { KB_NONE, "", "", "", "", ""}, /* 107 */
+ { KB_NONE, "", "", "", "", ""}, /* 108 */
+ { KB_NONE, "", "", "", "", ""}, /* 109 */
+ { KB_NONE, "", "", "", "", ""}, /* 110 */
+ { KB_NONE, "", "", "", "", ""}, /* 111 */
+ { KB_NONE, "", "", "", "", ""}, /* 112 */
+ { KB_NONE, "", "", "", "", ""}, /* 113 */
+ { KB_NONE, "", "", "", "", ""}, /* 114 */
+ { KB_NONE, "", "", "", "", ""}, /* 115 */
+ { KB_NONE, "", "", "", "", ""}, /* 116 */
+ { KB_NONE, "", "", "", "", ""}, /* 117 */
+ { KB_NONE, "", "", "", "", ""}, /* 118 */
+ { KB_NONE, "", "", "", "", ""}, /* 119 */
+ { KB_NONE, "", "", "", "", ""}, /* 120 */
+ { KB_NONE, "", "", "", "", ""}, /* 121 */
+ { KB_NONE, "", "", "", "", ""}, /* 122 */
+ { KB_NONE, "", "", "", "", ""}, /* 123 */
+ { KB_NONE, "", "", "", "", ""}, /* 124 */
+ { KB_NONE, "", "", "", "", ""}, /* 125 */
+ { KB_NONE, "", "", "", "", ""}, /* 126 */
+ { KB_NONE, "", "", "", "", ""} /* 127 */
};
/*
@@ -1878,8 +1903,10 @@ pcmmap(dev, offset, nprot)
return mips_btop(TYNE_V_ISA_MEM + offset - 0x40000000);
return -1;
}
+ return -1;
}
+void
pc_xmode_on()
{
if (pc_xmode)
@@ -1893,6 +1920,7 @@ pc_xmode_on()
#endif
}
+void
pc_xmode_off()
{
if (pc_xmode == 0)
@@ -1937,6 +1965,15 @@ pc_xmode_off()
#define FLUSHQ(q) { if((q)->c_cc) ndflush(q, (q)->c_cc); }
+int pmsopen __P((dev_t, int));
+int pmsclose __P((dev_t, int));
+int pmsread __P((dev_t, struct uio *, int));
+int pmsioctl __P((dev_t, u_long, caddr_t, int));
+int pmsselect __P((dev_t, int, struct proc *));
+static __inline void pms_dev_cmd __P((u_char));
+static __inline void pms_aux_cmd __P((u_char));
+static __inline void pms_pit_cmd __P((u_char));
+
static __inline void
pms_dev_cmd(value)
u_char value;
@@ -2085,7 +2122,8 @@ pmsread(dev, uio, flag)
return EWOULDBLOCK;
}
sc->sc_state |= PMS_ASLP;
- if (error = tsleep((caddr_t)sc, PZERO | PCATCH, "pmsrea", 0)) {
+ error = tsleep((caddr_t)sc, PZERO | PCATCH, "pmsrea", 0);
+ if (error) {
sc->sc_state &= ~PMS_ASLP;
splx(s);
return error;
@@ -2104,7 +2142,8 @@ pmsread(dev, uio, flag)
(void) q_to_b(&sc->sc_q, buffer, length);
/* Copy the data to the user process. */
- if (error = uiomove(buffer, length, uio))
+ error = uiomove(buffer, length, uio);
+ if (error)
break;
}