Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/arcbios Make the ARCS console work again, by initial...
details: https://anonhg.NetBSD.org/src/rev/9d201c3032b6
branches: trunk
changeset: 514667:9d201c3032b6
user: rafal <rafal%NetBSD.org@localhost>
date: Sat Sep 08 01:39:11 2001 +0000
description:
Make the ARCS console work again, by initializing the dev_t on arcbios init
rather than in the open entry point (where it's too late for cnopen). Being
checked in from my Indy using the ARCS console on the graphics display.
diffstat:
sys/dev/arcbios/arcbios.c | 14 +++++++++++++-
sys/dev/arcbios/arcbios_tty.c | 14 ++------------
2 files changed, 15 insertions(+), 13 deletions(-)
diffs (92 lines):
diff -r bf15e730fa6b -r 9d201c3032b6 sys/dev/arcbios/arcbios.c
--- a/sys/dev/arcbios/arcbios.c Sat Sep 08 01:34:37 2001 +0000
+++ b/sys/dev/arcbios/arcbios.c Sat Sep 08 01:39:11 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arcbios.c,v 1.3 2001/07/08 23:57:09 thorpej Exp $ */
+/* $NetBSD: arcbios.c,v 1.4 2001/09/08 01:39:11 rafal Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -38,7 +38,9 @@
#include <sys/param.h>
+#include <sys/systm.h>
#include <dev/cons.h>
+#include <sys/conf.h>
#include <dev/arcbios/arcbios.h>
#include <dev/arcbios/arcbiosvar.h>
@@ -62,6 +64,8 @@
NODEV, CN_NORMAL,
};
+cdev_decl(arcbios_tty);
+
/*
* arcbios_init:
*
@@ -70,6 +74,7 @@
int
arcbios_init(vaddr_t pblkva)
{
+ int maj;
struct arcbios_sysid *sid;
ARCBIOS_SPB = (struct arcbios_spb *) pblkva;
@@ -88,6 +93,13 @@
/* Initialize our pointer to the firmware vector. */
ARCBIOS = ARCBIOS_SPB->FirmwareVector;
+ /* Find the ARC BIOS console device major (needed by cnopen) */
+ for (maj = 0; maj < nchrdev; maj++)
+ if (cdevsw[maj].d_open == arcbios_ttyopen)
+ break;
+
+ arcbios_cn.cn_dev = makedev(maj, 0);
+
/* Initialize the bootstrap console. */
cn_tab = &arcbios_cn;
diff -r bf15e730fa6b -r 9d201c3032b6 sys/dev/arcbios/arcbios_tty.c
--- a/sys/dev/arcbios/arcbios_tty.c Sat Sep 08 01:34:37 2001 +0000
+++ b/sys/dev/arcbios/arcbios_tty.c Sat Sep 08 01:39:11 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arcbios_tty.c,v 1.1 2001/07/08 19:58:03 thorpej Exp $ */
+/* $NetBSD: arcbios_tty.c,v 1.2 2001/09/08 01:39:12 rafal Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -47,8 +47,6 @@
static struct tty *arcbios_tty[1];
-extern struct consdev arcbios_cn;
-
void arcbios_tty_start(struct tty *);
void arcbios_tty_poll(void *);
int arcbios_tty_param(struct tty *, struct termios *);
@@ -60,7 +58,7 @@
{
int unit = minor(dev);
struct tty *tp;
- int s, maj, error = 0, setuptimeout = 0;
+ int s, error = 0, setuptimeout = 0;
if (unit != 0)
return (ENODEV);
@@ -87,14 +85,6 @@
ttsetwater(tp);
setuptimeout = 1;
-
- /*
- * Initialize the ARC BIOS console device major.
- */
- for (maj = 0; maj < nchrdev; maj++)
- if (cdevsw[maj].d_open == arcbios_ttyopen)
- break;
- arcbios_cn.cn_dev = makedev(maj, 0);
} else if (tp->t_state & TS_XCLUDE && p->p_ucred->cr_uid != 0) {
splx(s);
return (EBUSY);
Home |
Main Index |
Thread Index |
Old Index