Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Root Complex Event Collector Bus Number Associat...
details: https://anonhg.NetBSD.org/src/rev/28e50e8c08d7
branches: trunk
changeset: 836112:28e50e8c08d7
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Sep 27 07:09:29 2018 +0000
description:
Root Complex Event Collector Bus Number Association ECN.
- If capability version is 2 (or greater), decode RCEC Associated Bus Numbers
register.
diffstat:
sys/dev/pci/pci_subr.c | 16 ++++++++++++++--
sys/dev/pci/pcireg.h | 7 +++++--
2 files changed, 19 insertions(+), 4 deletions(-)
diffs (58 lines):
diff -r c1fe430fa600 -r 28e50e8c08d7 sys/dev/pci/pci_subr.c
--- a/sys/dev/pci/pci_subr.c Thu Sep 27 05:40:27 2018 +0000
+++ b/sys/dev/pci/pci_subr.c Thu Sep 27 07:09:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_subr.c,v 1.203 2018/09/12 07:42:22 msaitoh Exp $ */
+/* $NetBSD: pci_subr.c,v 1.204 2018/09/27 07:09:29 msaitoh Exp $ */
/*
* Copyright (c) 1997 Zubin D. Dittia. All rights reserved.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.203 2018/09/12 07:42:22 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.204 2018/09/27 07:09:29 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_pci.h"
@@ -3061,6 +3061,18 @@
reg = regs[o2i(extcapoff + PCI_RCEC_ASSOC_ASSOCBITMAP)];
printf(" Association Bitmap for Root Complex Integrated Devices:"
" 0x%08x\n", reg);
+
+ if (PCI_EXTCAPLIST_VERSION(regs[o2i(extcapoff)]) >= 2) {
+ reg = regs[o2i(extcapoff + PCI_RCEC_ASSOC_ASSOCBUSNUM)];
+ printf(" RCEC Associated Bus Numbers register: 0x%08x\n",
+ reg);
+ printf(" RCEC Next Bus: %u\n",
+ (unsigned int)__SHIFTOUT(reg,
+ PCI_RCEC_ASSOCBUSNUM_RCECNEXT));
+ printf(" RCEC Last Bus: %u\n",
+ (unsigned int)__SHIFTOUT(reg,
+ PCI_RCEC_ASSOCBUSNUM_RCECLAST));
+ }
}
/* XXX pci_conf_print_mfvc_cap */
diff -r c1fe430fa600 -r 28e50e8c08d7 sys/dev/pci/pcireg.h
--- a/sys/dev/pci/pcireg.h Thu Sep 27 05:40:27 2018 +0000
+++ b/sys/dev/pci/pcireg.h Thu Sep 27 07:09:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcireg.h,v 1.140 2018/09/12 07:42:21 msaitoh Exp $ */
+/* $NetBSD: pcireg.h,v 1.141 2018/09/27 07:09:29 msaitoh Exp $ */
/*
* Copyright (c) 1995, 1996, 1999, 2000
@@ -1699,7 +1699,10 @@
* Extended capability ID: 0x0007
* Root Complex Event Collector Association
*/
-#define PCI_RCEC_ASSOC_ASSOCBITMAP 0x04
+#define PCI_RCEC_ASSOC_ASSOCBITMAP 0x04 /* Association Bitmap */
+#define PCI_RCEC_ASSOC_ASSOCBUSNUM 0x08 /* Associcated Bus Number */
+#define PCI_RCEC_ASSOCBUSNUM_RCECNEXT __BITS(15, 8) /* RCEC Next Bus */
+#define PCI_RCEC_ASSOCBUSNUM_RCECLAST __BITS(23, 16) /* RCEC Last Bus */
/*
* Extended capability ID: 0x0008
Home |
Main Index |
Thread Index |
Old Index