From 6195ca347432908cacbc334332f3d81ee4b02508 Mon Sep 17 00:00:00 2001 From: thorpej Date: Thu, 1 Feb 2001 19:56:44 +0000 Subject: [PATCH] Add some info to the dmamap_sync assertion messages. --- sys/arch/dreamcast/dev/g2/gapspci_dma.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/arch/dreamcast/dev/g2/gapspci_dma.c b/sys/arch/dreamcast/dev/g2/gapspci_dma.c index 82b50544e09c..91960962f650 100644 --- a/sys/arch/dreamcast/dev/g2/gapspci_dma.c +++ b/sys/arch/dreamcast/dev/g2/gapspci_dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: gapspci_dma.c,v 1.2 2001/02/01 19:35:04 marcus Exp $ */ +/* $NetBSD: gapspci_dma.c,v 1.3 2001/02/01 19:56:44 thorpej Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -358,10 +358,16 @@ gaps_dmamap_sync(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset, #ifdef DIAGNOSTIC if ((ops & (BUS_DMASYNC_PREWRITE|BUS_DMASYNC_POSTREAD)) != 0) { - if (offset >= map->dm_mapsize) + if (offset >= map->dm_mapsize) { + printf("offset 0x%lx mapsize 0x%lx\n", + offset, map->dm_mapsize); panic("gaps_dmamap_sync: bad offset"); - if (len == 0 || (offset + len) > map->dm_mapsize) + } + if (len == 0 || (offset + len) > map->dm_mapsize) { + printf("len 0x%lx offset 0x%lx mapsize 0x%lx\n", + len, offset, map->dm_mapsize); panic("gaps_dmamap_sync: bad length"); + } } #endif