diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2012-04-06 18:24:30 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2012-04-06 18:24:30 +0000 |
commit | 02e78cbefa8376a5c629fde9f7bb6ee767ba3808 (patch) | |
tree | 117817133e6dcbc49c45f60c6c7f3eca1cf0c240 /sys/arch/sgi | |
parent | 49c8c5c9e98293a88eea8fd50ad27b6c68a50786 (diff) |
Get serial console speed from ARCBios earlier; repairs serial console on Octane
and O2 (other systems unaffected).
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/sgi/machdep.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c index 1a991d22da8..4e29f8f0a7a 100644 --- a/sys/arch/sgi/sgi/machdep.c +++ b/sys/arch/sgi/sgi/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.116 2012/04/03 21:17:35 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.117 2012/04/06 18:24:29 miod Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -216,6 +216,13 @@ mips_init(int argc, void *argv, caddr_t boot_esym) cp = Bios_GetEnvironmentVariable("keybd"); if (cp != NULL && *cp != '\0') strlcpy(bios_keyboard, cp, sizeof(bios_keyboard)); + /* the following variables may not exist on all systems */ + cp = Bios_GetEnvironmentVariable("eaddr"); + if (cp != NULL && strlen(cp) > 0) + strlcpy(bios_enaddr, cp, sizeof bios_enaddr); + bios_consrate = bios_getenvint("dbaud"); + if (bios_consrate < 50 || bios_consrate > 115200) + bios_consrate = 9600; /* sane default */ /* * Determine system type and set up configuration record data. @@ -309,18 +316,6 @@ mips_init(int argc, void *argv, caddr_t boot_esym) "The kernel might not be able to find out its root device.\n"); /* - * Read platform-specific environment variables from ARCBios. - * (Note these may not exist on all systems) - */ - /* onboard Ethernet address (does not exist on IP27/IP35) */ - cp = Bios_GetEnvironmentVariable("eaddr"); - if (cp != NULL && strlen(cp) > 0) - strlcpy(bios_enaddr, cp, sizeof bios_enaddr); - bios_consrate = bios_getenvint("dbaud"); - if (bios_consrate < 50 || bios_consrate > 115200) - bios_consrate = 9600; /* sane default */ - - /* * Set pagesize to enable use of page macros and functions. * Commit available memory to UVM system. */ |