summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2011-04-03 22:32:40 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2011-04-03 22:32:40 +0000
commitc08305377011411ea16d11f3850fb1e802761d74 (patch)
tree1335f79d510889e3d95fcb8dc26d89e90b8b7e22 /sys
parent3511836bbd8b3613ff05e6e1e0b496e0a39c222c (diff)
Make sure dma_constraint is listed in uvm_md_constraints[] when it does not
span the whole physical address space, for the pmemrange magic to operate correctly.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sgi/sgi/machdep.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index 9f3617212fa..45e1fb619e2 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.106 2010/10/24 15:40:03 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.107 2011/04/03 22:32:39 miod Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -97,7 +97,10 @@ int bufcachepercent = BUFCACHEPERCENT;
/* low 32 bits range. */
struct uvm_constraint_range dma_constraint = { 0x0, 0x7fffffff };
-struct uvm_constraint_range *uvm_md_constraints[] = { NULL };
+struct uvm_constraint_range *uvm_md_constraints[] = {
+ &dma_constraint,
+ NULL
+};
vm_map_t exec_map;
vm_map_t phys_map;
@@ -239,7 +242,6 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
ip32_setup();
break;
#endif
-
#ifdef TGT_ORIGIN
case SGI_IP27:
bios_printf("Found SGI-IP27, setting up.\n");
@@ -256,7 +258,6 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
break;
#endif
-
#ifdef TGT_OCTANE
case SGI_OCTANE:
bios_printf("Found SGI-IP30, setting up.\n");
@@ -264,7 +265,6 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
ip30_setup();
break;
#endif
-
default:
bios_printf("Kernel doesn't support this system type!\n");
bios_printf("Halting system.\n");
@@ -276,7 +276,6 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
* Look at arguments passed to us and compute boothowto.
*/
boothowto = RB_AUTOBOOT;
-
dobootopts(argc, argv);
/*
@@ -446,7 +445,7 @@ mips_init(int argc, void *argv, caddr_t boot_esym)
/*
* Init message buffer.
*/
- msgbufbase = (caddr_t)pmap_steal_memory(MSGBUFSIZE, NULL,NULL);
+ msgbufbase = (caddr_t)pmap_steal_memory(MSGBUFSIZE, NULL, NULL);
initmsgbuf(msgbufbase, MSGBUFSIZE);
/*
@@ -546,11 +545,11 @@ dobootopts(int argc, void *argv)
*/
if (strncmp(cp, "OSLoadOptions=", 14) == 0) {
if (strcmp(&cp[14], "auto") == 0)
- boothowto &= ~(RB_SINGLE|RB_ASKNAME);
+ boothowto &= ~(RB_SINGLE|RB_ASKNAME);
else if (strcmp(&cp[14], "single") == 0)
- boothowto |= RB_SINGLE;
+ boothowto |= RB_SINGLE;
else if (strcmp(&cp[14], "debug") == 0)
- boothowto |= RB_KDB;
+ boothowto |= RB_KDB;
continue;
}