From 45d8d13f1bee4f3835c3c2520bf848c02fb1ef7d Mon Sep 17 00:00:00 2001 From: kettenis Date: Wed, 23 Jul 2008 15:39:52 +0000 Subject: [PATCH] Stop printing the size of BARs; the way the code calculates it is wrong. We'll need kernel support to do it properly. ok dlg@ --- usr.sbin/pcidump/pcidump.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/usr.sbin/pcidump/pcidump.c b/usr.sbin/pcidump/pcidump.c index c2f3d5b2f0e..642761a5726 100644 --- a/usr.sbin/pcidump/pcidump.c +++ b/usr.sbin/pcidump/pcidump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcidump.c,v 1.14 2008/04/07 12:12:48 dlg Exp $ */ +/* $OpenBSD: pcidump.c,v 1.15 2008/07/23 15:39:52 kettenis Exp $ */ /* * Copyright (c) 2006, 2007 David Gwynne @@ -270,9 +270,8 @@ dump_type0(int bus, int dev, int func) case PCI_MAPREG_MEM_TYPE_32BIT_1M: printf("%s ", memtype); - printf("addr: 0x%08x len: %d\n", - PCI_MAPREG_MEM_ADDR(reg), - PCI_MAPREG_MEM_SIZE(reg)); + printf("addr: 0x%08x\n", + PCI_MAPREG_MEM_ADDR(reg)); break; case PCI_MAPREG_MEM_TYPE_64BIT: @@ -283,17 +282,16 @@ dump_type0(int bus, int dev, int func) mem |= (u_int64_t)reg << 32; - printf("64bit addr: 0x%016llx size: %lld\n", - PCI_MAPREG_MEM64_ADDR(mem), - PCI_MAPREG_MEM64_SIZE(mem)); + printf("64bit addr: 0x%016llx\n", + PCI_MAPREG_MEM64_ADDR(mem)); break; } break; case PCI_MAPREG_TYPE_IO: - printf("io addr: 0x%08x size: %d\n", - PCI_MAPREG_IO_ADDR(reg), PCI_MAPREG_IO_SIZE(reg)); + printf("io addr: 0x%08x\n", + PCI_MAPREG_IO_ADDR(reg)); break; } } -- 2.20.1