Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev/pci Pull up the following revisions(s) (requested...
details: https://anonhg.NetBSD.org/src/rev/4f0caadfea4d
branches: netbsd-8
changeset: 445461:4f0caadfea4d
user: sborrill <sborrill%NetBSD.org@localhost>
date: Tue Oct 30 09:32:32 2018 +0000
description:
Pull up the following revisions(s) (requested by msaitoh in ticket #1074):
sys/dev/pci/pci_subr.c: revision 1.204-1.206
sys/dev/pci/pcireg.h: revision 1.141-1.142
Root Complex Event Collector Bus Number Association ECN.
- If capability version is 2 (or greater), decode RCEC Associated Bus Numbers
register.
- Don't print TPH requester's ST Table Size if the ST table location field
is not PCI_TPH_REQ_STTBLLOC_TPHREQ because the size field is only applicable
for PCI_TPH_REQ_STTBLLOC_TPHREQ case.
- Add comment.
diffstat:
sys/dev/pci/pci_subr.c | 28 +++++++++++++++++++++-------
sys/dev/pci/pcireg.h | 11 +++++++----
2 files changed, 28 insertions(+), 11 deletions(-)
diffs (113 lines):
diff -r 5eb20af97b37 -r 4f0caadfea4d sys/dev/pci/pci_subr.c
--- a/sys/dev/pci/pci_subr.c Tue Oct 30 09:26:05 2018 +0000
+++ b/sys/dev/pci/pci_subr.c Tue Oct 30 09:32:32 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_subr.c,v 1.183.2.7 2018/09/23 17:40:37 martin Exp $ */
+/* $NetBSD: pci_subr.c,v 1.183.2.8 2018/10/30 09:32:32 sborrill 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.183.2.7 2018/09/23 17:40:37 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.183.2.8 2018/10/30 09:32:32 sborrill 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 */
@@ -3526,7 +3538,7 @@
pci_conf_print_tph_req_cap(const pcireg_t *regs, int extcapoff)
{
pcireg_t reg;
- int size, i, j;
+ int size = 0, i, j;
uint8_t sttbloc;
printf("\n TPH Requester Extended Capability\n");
@@ -3540,8 +3552,10 @@
sttbloc = __SHIFTOUT(reg, PCI_TPH_REQ_CAP_STTBLLOC);
printf(" ST Table Location: %s\n",
pci_conf_print_tph_req_cap_sttabloc(sttbloc));
- size = __SHIFTOUT(reg, PCI_TPH_REQ_CAP_STTBLSIZ) + 1;
- printf(" ST Table Size: %d\n", size);
+ if (sttbloc == PCI_TPH_REQ_STTBLLOC_TPHREQ) {
+ size = __SHIFTOUT(reg, PCI_TPH_REQ_CAP_STTBLSIZ) + 1;
+ printf(" ST Table Size: %d\n", size);
+ }
reg = regs[o2i(extcapoff + PCI_TPH_REQ_CTL)];
printf(" TPH Requester Control register: 0x%08x\n", reg);
@@ -4700,19 +4714,19 @@
/* device-dependent header */
printf(" Device-dependent header:\n");
pci_conf_print_regs(regs, endoff, PCI_CONF_SIZE);
+#ifdef _KERNEL
printf("\n");
-#ifdef _KERNEL
if (printfn)
(*printfn)(pc, tag, regs);
else
printf(" Don't know how to pretty-print device-dependent header.\n");
- printf("\n");
#endif /* _KERNEL */
if (regs[o2i(PCI_EXTCAPLIST_BASE)] == 0xffffffff ||
regs[o2i(PCI_EXTCAPLIST_BASE)] == 0)
return;
+ printf("\n");
#ifdef _KERNEL
pci_conf_print_extcaplist(pc, tag, regs);
#else
diff -r 5eb20af97b37 -r 4f0caadfea4d sys/dev/pci/pcireg.h
--- a/sys/dev/pci/pcireg.h Tue Oct 30 09:26:05 2018 +0000
+++ b/sys/dev/pci/pcireg.h Tue Oct 30 09:32:32 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcireg.h,v 1.130.2.6 2018/09/23 17:40:37 martin Exp $ */
+/* $NetBSD: pcireg.h,v 1.130.2.7 2018/10/30 09:32:32 sborrill Exp $ */
/*
* Copyright (c) 1995, 1996, 1999, 2000
@@ -1186,8 +1186,8 @@
uint32_t pci_msix_vector_control;
};
#define PCI_MSIX_VECTCTL_MASK __BIT(0)
-#define PCI_MSIX_VECTCTL_STLO __BITS(23, 16)
-#define PCI_MSIX_VECTCTL_STUP __BITS(31, 24)
+#define PCI_MSIX_VECTCTL_STLO __BITS(23, 16) /* ST lower */
+#define PCI_MSIX_VECTCTL_STUP __BITS(31, 24) /* ST upper */
/* Max number of MSI-X vectors. See PCI-SIG specification. */
#define PCI_MSIX_MAX_VECTORS 2048
@@ -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