summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2008-05-18 07:36:11 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2008-05-18 07:36:11 +0000
commit73a6de7e91969cee2ba7295af1ac319be602c398 (patch)
tree7aa40229e871d4b54df1246f8a7fcadb8516184e /sys/arch
parent7660b8f7e166deda993b136e0638fcad0ceb2313 (diff)
Unbreak glass console on OpenBSD/sgi - if we're supposed to be using the
glass console set comconsaddr to zero so we don't switch to serial when com* attach. spotted by jasper@, ok miod@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sgi/localbus/com_lbus.c4
-rw-r--r--sys/arch/sgi/sgi/machdep.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/sgi/localbus/com_lbus.c b/sys/arch/sgi/localbus/com_lbus.c
index 825fa71c667..0d0b19364c9 100644
--- a/sys/arch/sgi/localbus/com_lbus.c
+++ b/sys/arch/sgi/localbus/com_lbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_lbus.c,v 1.7 2008/05/01 13:36:09 miod Exp $ */
+/* $OpenBSD: com_lbus.c,v 1.8 2008/05/18 07:36:10 jsing Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -84,10 +84,10 @@ com_macebus_attach(struct device *parent, struct device *self, void *aux)
/* If it's in use as the console, then it's there. */
if (ca->ca_baseaddr == comconsaddr && !comconsattached) {
- sc->sc_ioh = comconsioh;
if (comcnattach(sc->sc_iot, sc->sc_iobase, TTYDEF_SPEED,
sc->sc_frequency, (TTYDEF_CFLAG & ~(CSIZE | PARENB)) | CS8))
panic("failed to setup serial console!");
+ sc->sc_ioh = comconsioh;
} else {
if (bus_space_map(sc->sc_iot, ca->ca_baseaddr, COM_NPORTS, 0,
&sc->sc_ioh)) {
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index 1124284c924..a0c11ddab46 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.59 2008/05/04 09:57:47 martin Exp $ */
+/* $OpenBSD: machdep.c,v 1.60 2008/05/18 07:36:10 jsing Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -82,6 +82,7 @@
extern char kernel_text[];
extern int makebootdev(const char *, int);
extern void stacktrace(void);
+extern bus_addr_t comconsaddr;
#ifdef DEBUG
void dump_tlb(void);
@@ -274,6 +275,10 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
if (cp != NULL && *cp != '\0')
strlcpy(bios_console, cp, sizeof bios_console);
+ /* Disable serial console if ARCS is telling us to use video. */
+ if (strncmp(bios_console, "video", 5) == 0)
+ comconsaddr = 0;
+
/*
* Look at arguments passed to us and compute boothowto.
*/