summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2002-09-23 04:25:53 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2002-09-23 04:25:53 +0000
commit7db2418acec2750d6606f4371a3251a480f15eb9 (patch)
tree1a3ab1fae6467fb783d249900eb1f872879db9c6 /sys
parentf6c58a2ce74362d01ebd9e88536689a559dd2a1c (diff)
panic if out of kvm when mapping devices. ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/macppc/macppc/machdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index 66004c2f47c..60600f2cd08 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.43 2002/09/16 16:06:33 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.44 2002/09/23 04:25:52 drahn Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -1233,6 +1233,9 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp)
}
} else {
vaddr = uvm_km_valloc_wait(phys_map, len);
+ if (vaddr == 0)
+ panic("bus_mem_add_mapping: kvm alloc of 0x%x failed",
+ len);
}
*bshp = vaddr + off;
#ifdef DEBUG_BUS_MEM_ADD_MAPPING