From 3f533fe166f3297924135a3a5dbb5984d9f78070 Mon Sep 17 00:00:00 2001 From: kettenis Date: Thu, 1 Feb 2024 18:26:45 +0000 Subject: [PATCH] Print information about (legacy) Multiple Message MSIs. ok kevlo@, dlg@ --- usr.sbin/pcidump/pcidump.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pcidump/pcidump.c b/usr.sbin/pcidump/pcidump.c index e5df1ef709f..c7dc589ce89 100644 --- a/usr.sbin/pcidump/pcidump.c +++ b/usr.sbin/pcidump/pcidump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcidump.c,v 1.69 2023/04/16 17:26:14 kettenis Exp $ */ +/* $OpenBSD: pcidump.c,v 1.70 2024/02/01 18:26:45 kettenis Exp $ */ /* * Copyright (c) 2006, 2007 David Gwynne @@ -606,7 +606,10 @@ dump_msi(int bus, int dev, int func, u_int8_t ptr) if (pci_read(bus, dev, func, ptr, ®) != 0) return; - printf("\t\tEnabled: %s\n", reg & PCI_MSI_MC_MSIE ? "yes" : "no"); + printf("\t\tEnabled: %s; %d vectors (%d enabled)\n", + reg & PCI_MSI_MC_MSIE ? "yes" : "no", + (1 << ((reg & PCI_MSI_MC_MMC_MASK) >> PCI_MSI_MC_MMC_SHIFT)), + (1 << ((reg & PCI_MSI_MC_MME_MASK) >> PCI_MSI_MC_MME_SHIFT))); } void -- 2.20.1