From 02e78cbefa8376a5c629fde9f7bb6ee767ba3808 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 6 Apr 2012 18:24:30 +0000 Subject: Get serial console speed from ARCBios earlier; repairs serial console on Octane and O2 (other systems unaffected). --- sys/arch/sgi/sgi/machdep.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'sys/arch/sgi') 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. @@ -308,18 +315,6 @@ mips_init(int argc, void *argv, caddr_t boot_esym) bios_printf("Value of `OSLoadPartition' is too large.\n" "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. -- cgit v1.2.3