Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hp300/stand/common Check the service switch on 425e...
details: https://anonhg.NetBSD.org/src/rev/3ae3da5ec89f
branches: trunk
changeset: 328757:3ae3da5ec89f
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Thu Apr 17 12:35:24 2014 +0000
description:
Check the service switch on 425e to select apci serial console.
Taken from OpenBSD/hp300. See the following comment for details:
>> * Check the service switch. On the 425e, this is a physical
>> * switch, unlike other frodo-based machines, so we can use it
>> * as a serial vs internal video selector, since the PROM can not
>> * be configured for serial console.
diffstat:
sys/arch/hp300/stand/common/apci.c | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diffs (49 lines):
diff -r 611d6e38d82b -r 3ae3da5ec89f sys/arch/hp300/stand/common/apci.c
--- a/sys/arch/hp300/stand/common/apci.c Wed Apr 16 22:44:42 2014 +0000
+++ b/sys/arch/hp300/stand/common/apci.c Thu Apr 17 12:35:24 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apci.c,v 1.12 2014/04/10 18:10:09 tsutsui Exp $ */
+/* $NetBSD: apci.c,v 1.13 2014/04/17 12:35:24 tsutsui Exp $ */
/*-
* Copyright (c) 1997, 1999 The NetBSD Foundation, Inc.
@@ -84,9 +84,7 @@
void
apciprobe(struct consdev *cp)
{
-
- apcicnaddr =
- (void *)IIOV(INTIOBASE + FRODO_BASE + FRODO_APCI_OFFSET(1));
+ volatile uint8_t *frodoregs;
cp->cn_pri = CN_DEAD;
@@ -97,12 +95,26 @@
if (machineid != HP_425 || mmuid != MMUID_425_E)
return;
+ /*
+ * Check the service switch. On the 425e, this is a physical
+ * switch, unlike other frodo-based machines, so we can use it
+ * as a serial vs internal video selector, since the PROM can not
+ * be configured for serial console.
+ */
+ frodoregs = (volatile u_int8_t *)IIOV(INTIOBASE + FRODO_BASE);
+ if (badaddr((char *)frodoregs) == 0 &&
+ (frodoregs[FRODO_IISR] & FRODO_IISR_SERVICE) == 0)
+ cp->cn_pri = CN_REMOTE;
+ else
+ cp->cn_pri = CN_NORMAL;
+
#ifdef FORCEAPCICONSOLE
cp->cn_pri = CN_REMOTE;
-#else
- cp->cn_pri = CN_NORMAL;
#endif
curcons_scode = -2;
+
+ apcicnaddr =
+ (void *)IIOV(INTIOBASE + FRODO_BASE + FRODO_APCI_OFFSET(1));
}
void
Home |
Main Index |
Thread Index |
Old Index