diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-02-27 22:05:16 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-02-27 22:05:16 +0000 |
commit | 8dc078185a77a1398b1ee995583400b5084a5177 (patch) | |
tree | 7302ee9c1e0198265f33440882621d59b2902a11 /sys/arch/hp300/dev | |
parent | 4906100bfb6110904e11a05a62592ed3518acce9 (diff) |
Decide whether to force serial console on the 425e based upon the service
switch, which is a physical switch on this model, unlike other frodo-based
hp300.
Service mode will now select serial console, while normal mode will select
graphics console.
Diffstat (limited to 'sys/arch/hp300/dev')
-rw-r--r-- | sys/arch/hp300/dev/apci.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/sys/arch/hp300/dev/apci.c b/sys/arch/hp300/dev/apci.c index ac545366ca4..a7f88b5ec89 100644 --- a/sys/arch/hp300/dev/apci.c +++ b/sys/arch/hp300/dev/apci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apci.c,v 1.20 2005/02/14 00:52:09 miod Exp $ */ +/* $OpenBSD: apci.c,v 1.21 2005/02/27 22:05:15 miod Exp $ */ /* $NetBSD: apci.c,v 1.9 2000/11/02 00:35:05 eeh Exp $ */ /*- @@ -923,6 +923,7 @@ void apcicnprobe(cp) struct consdev *cp; { + volatile u_int8_t *frodoregs; /* locate the major number */ for (apcimajor = 0; apcimajor < nchrdev; apcimajor++) @@ -946,13 +947,21 @@ apcicnprobe(cp) if (machineid != HP_425 || mmuid != MMUID_425_E) return; -#ifdef APCI_FORCE_CONSOLE - cp->cn_pri = CN_REMOTE; - conforced = 1; - conscode = -2; /* XXX */ -#else - cp->cn_pri = CN_NORMAL; -#endif + /* + * 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(FRODO_BASE); + if (badaddr((caddr_t)frodoregs) == 0 && + !ISSET(frodoregs[FRODO_IISR], FRODO_IISR_SERVICE)) { + cp->cn_pri = CN_REMOTE; + conforced = 1; + conscode = -2; /* XXX */ + } else { + cp->cn_pri = CN_NORMAL; + } /* * If our priority is higher than the currently-remembered |