summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2006-07-16 21:52:05 +0000
committermiod <miod@openbsd.org>2006-07-16 21:52:05 +0000
commitca00571e66f9dd198635ffaf6c2f2116837fd71a (patch)
tree80a665675f94806458caece3de745957741e4904
parentUse a global variable for the console ibm561 state, and use it when the (diff)
downloadwireguard-openbsd-ca00571e66f9dd198635ffaf6c2f2116837fd71a.tar.xz
wireguard-openbsd-ca00571e66f9dd198635ffaf6c2f2116837fd71a.zip
On LX164 systems (and maybe others), isa video boards are reported by
the SRM as pci boards with invalid bus and slot number, so check for this to decide which vga attachment to use. Found the hard way by robert@
-rw-r--r--sys/arch/alpha/alpha/dec_eb164.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/arch/alpha/alpha/dec_eb164.c b/sys/arch/alpha/alpha/dec_eb164.c
index b01dc6a25e4..d245fc28932 100644
--- a/sys/arch/alpha/alpha/dec_eb164.c
+++ b/sys/arch/alpha/alpha/dec_eb164.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dec_eb164.c,v 1.12 2005/05/09 21:55:12 martin Exp $ */
+/* $OpenBSD: dec_eb164.c,v 1.13 2006/07/16 21:52:05 miod Exp $ */
/* $NetBSD: dec_eb164.c,v 1.33 2000/05/22 20:13:32 thorpej Exp $ */
/*
@@ -127,8 +127,17 @@ dec_eb164_cons_init()
/* XXX */
(void) pckbc_cnattach(&ccp->cc_iot, IO_KBD, KBCMDP,
PCKBC_KBD_SLOT);
+
+ /*
+ * On at least LX164, SRM reports an isa video board
+ * as a pci slot with 0xff as the bus and slot numbers.
+ * Since these values are not plausible from a pci point
+ * of view, it is safe to check for them.
+ */
if (CTB_TURBOSLOT_TYPE(ctb->ctb_turboslot) ==
- CTB_TURBOSLOT_TYPE_ISA)
+ CTB_TURBOSLOT_TYPE_ISA ||
+ (CTB_TURBOSLOT_BUS(ctb->ctb_turboslot) == 0xff &&
+ CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot) == 0xff))
isa_display_console(&ccp->cc_iot, &ccp->cc_memt);
else
pci_display_console(&ccp->cc_iot, &ccp->cc_memt,