From ed68e042f3e7383b8dda74d7813bda0f5f9a41a1 Mon Sep 17 00:00:00 2001 From: gwr Date: Wed, 30 Nov 1994 22:02:47 +0000 Subject: [PATCH] Improve diagnostic in pmap_page_index(). --- sys/arch/sun3/sun3/pmap.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/arch/sun3/sun3/pmap.c b/sys/arch/sun3/sun3/pmap.c index b1650dfb75d1..accd1148d86f 100644 --- a/sys/arch/sun3/sun3/pmap.c +++ b/sys/arch/sun3/sun3/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.40 1994/11/30 15:45:19 gwr Exp $ */ +/* $NetBSD: pmap.c,v 1.41 1994/11/30 22:02:47 gwr Exp $ */ /* * Copyright (c) 1994 Gordon W. Ross @@ -1546,8 +1546,15 @@ pmap_page_index(pa) { u_long idx; +#ifdef DIAGNOSTIC if (pa < avail_start || pa >= avail_end) - panic("pmap_page_index"); + panic("pmap_page_index: pa=0x%x", pa); + if (hole_start && pa >= hole_start) { + /* Make sure pa is not in the hole. */ + if (pa < (hole_start + hole_size)) + panic("pmap_page_index: pa=0x%x", pa); + } +#endif return (sun3_btop(pa)); }