summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2010-03-03 12:25:10 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2010-03-03 12:25:10 +0000
commit0b4f59c33f4ad77c8c270f9521302f6cb0290b78 (patch)
tree6ade2f985e7d4938b3cd374a8a7a9260e2da4ca3 /sys
parent966ff3a8f0e66279ecaf1ee2b9752aa09808f8cb (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')
-rw-r--r--sys/arch/mips64/include/arcbios.h6
-rw-r--r--sys/arch/mips64/mips64/arcbios.c6
-rw-r--r--sys/arch/sgi/sgi/ip32_machdep.c17
-rw-r--r--sys/arch/sgi/sgi/machdep.c26
4 files changed, 32 insertions, 23 deletions
diff --git a/sys/arch/mips64/include/arcbios.h b/sys/arch/mips64/include/arcbios.h
index 85480a913d7..acaaef10505 100644
--- a/sys/arch/mips64/include/arcbios.h
+++ b/sys/arch/mips64/include/arcbios.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: arcbios.h,v 1.13 2009/12/07 18:56:27 miod Exp $ */
+/* $OpenBSD: arcbios.h,v 1.14 2010/03/03 12:25:09 jsing Exp $ */
/*-
* Copyright (c) 1996 M. Warner Losh. All rights reserved.
*
@@ -403,7 +403,9 @@ typedef struct arc_param_blk_64
extern int bios_is_32bit;
extern char bios_enaddr[20];
-extern char bios_console[10];
+extern char bios_console[30];
+extern char bios_graphics[6];
+extern char bios_keyboard[6];
int bios_getchar(void);
void bios_putchar(char);
diff --git a/sys/arch/mips64/mips64/arcbios.c b/sys/arch/mips64/mips64/arcbios.c
index a477a157069..94f1e74a134 100644
--- a/sys/arch/mips64/mips64/arcbios.c
+++ b/sys/arch/mips64/mips64/arcbios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arcbios.c,v 1.28 2009/12/07 19:39:57 miod Exp $ */
+/* $OpenBSD: arcbios.c,v 1.29 2010/03/03 12:25:09 jsing Exp $ */
/*-
* Copyright (c) 1996 M. Warner Losh. All rights reserved.
* Copyright (c) 1996-2004 Opsycon AB. All rights reserved.
@@ -50,7 +50,9 @@ int bios_is_32bit;
*/
char bios_enaddr[20] = "ff:ff:ff:ff:ff:ff";
-char bios_console[10]; /* Primary console. */
+char bios_console[30]; /* Primary console. */
+char bios_graphics[6]; /* Graphics state. */
+char bios_keyboard[6]; /* Keyboard layout. */
extern int physmem; /* Total physical memory size */
extern int rsvdmem; /* Total reserved memory size */
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;