From 7db2418acec2750d6606f4371a3251a480f15eb9 Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Mon, 23 Sep 2002 04:25:53 +0000 Subject: panic if out of kvm when mapping devices. ok deraadt@ --- sys/arch/macppc/macppc/machdep.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/arch/macppc') 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 -- cgit v1.2.3