diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2010-03-03 12:25:10 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2010-03-03 12:25:10 +0000 |
commit | 0b4f59c33f4ad77c8c270f9521302f6cb0290b78 (patch) | |
tree | 6ade2f985e7d4938b3cd374a8a7a9260e2da4ca3 /sys/arch/sgi | |
parent | 966ff3a8f0e66279ecaf1ee2b9752aa09808f8cb (diff) |
Store ARCBios variables before machine specific setup is performed and
make console selection on a per machine basis. Whilst here store the
keyboard layout ('keybd') and graphics state ('gfx') variables for
future use.
ok miod@
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/sgi/ip32_machdep.c | 17 | ||||
-rw-r--r-- | sys/arch/sgi/sgi/machdep.c | 26 |
2 files changed, 24 insertions, 19 deletions
diff --git a/sys/arch/sgi/sgi/ip32_machdep.c b/sys/arch/sgi/sgi/ip32_machdep.c index bb6b2272541..fdaa3872e15 100644 --- a/sys/arch/sgi/sgi/ip32_machdep.c +++ b/sys/arch/sgi/sgi/ip32_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip32_machdep.c,v 1.13 2010/01/09 20:33:16 miod Exp $ */ +/* $OpenBSD: ip32_machdep.c,v 1.14 2010/03/03 12:25:09 jsing Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -196,12 +196,15 @@ ip32_setup() break; } - comconsaddr = MACE_ISA_SER1_OFFS; - comconsfreq = 1843200; - comconsiot = &macebus_tag; - comconsrate = bios_getenvint("dbaud"); - if (comconsrate < 50 || comconsrate > 115200) - comconsrate = 9600; + /* Setup serial console if ARCS is telling us not to use video. */ + if (strncmp(bios_console, "video", 5) != 0) { + comconsaddr = MACE_ISA_SER1_OFFS; + comconsfreq = 1843200; + comconsiot = &macebus_tag; + comconsrate = bios_getenvint("dbaud"); + if (comconsrate < 50 || comconsrate > 115200) + comconsrate = 9600; + } /* not sure if there is a way to tell O2 and O2+ apart */ hw_prod = "O2"; diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index 8f5e6a7b042..bf5fec1883f 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.99 2010/02/13 14:07:30 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.100 2010/03/03 12:25:09 jsing Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -199,6 +199,19 @@ mips_init(int argc, void *argv, caddr_t boot_esym) bios_ident(); /* + * Read and store ARCBios variables for future reference. + */ + cp = Bios_GetEnvironmentVariable("ConsoleOut"); + if (cp != NULL && *cp != '\0') + strlcpy(bios_console, cp, sizeof(bios_console)); + cp = Bios_GetEnvironmentVariable("gfx"); + if (cp != NULL && *cp != '\0') + strlcpy(bios_graphics, cp, sizeof(bios_graphics)); + cp = Bios_GetEnvironmentVariable("keybd"); + if (cp != NULL && *cp != '\0') + strlcpy(bios_keyboard, cp, sizeof(bios_keyboard)); + + /* * Determine system type and set up configuration record data. */ hw_vendor = "SGI"; @@ -244,17 +257,6 @@ mips_init(int argc, void *argv, caddr_t boot_esym) } /* - * Read and store console type. - */ - cp = Bios_GetEnvironmentVariable("ConsoleOut"); - 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. */ boothowto = RB_AUTOBOOT; |