Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107418963
D44290.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D44290.diff
View Options
diff --git a/usr.sbin/pciconf/pciconf.8 b/usr.sbin/pciconf/pciconf.8
--- a/usr.sbin/pciconf/pciconf.8
+++ b/usr.sbin/pciconf/pciconf.8
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd June 14, 2018
+.Dd March 17, 2024
.Dt PCICONF 8
.Os
.Sh NAME
@@ -31,7 +31,7 @@
.Nd diagnostic utility for the PCI bus
.Sh SYNOPSIS
.Nm
-.Fl l Oo Fl BbceVv Oc Op Ar device
+.Fl l Oo Fl BbcetVv Oc Op Ar device
.Nm
.Fl a Ar device
.Nm
@@ -225,6 +225,12 @@
and the Advanced Error Reporting status registers.
.Pp
If the
+.Fl t
+option is supplied,
+.Nm
+will list available topology information for each device.
+.Pp
+If the
.Fl v
option is supplied,
.Nm
diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c
--- a/usr.sbin/pciconf/pciconf.c
+++ b/usr.sbin/pciconf/pciconf.c
@@ -71,7 +71,8 @@
static void list_bridge(int fd, struct pci_conf *p);
static void list_bars(int fd, struct pci_conf *p);
static void list_devs(const char *name, int verbose, int bars, int bridge,
- int caps, int errors, int vpd, int listmode);
+ int caps, int errors, int topology, int vpd, int listmode);
+static void list_topology(struct pci_conf *p);
static void list_verbose(struct pci_conf *p);
static void list_vpd(int fd, struct pci_conf *p);
static const char *guess_class(struct pci_conf *p);
@@ -90,7 +91,7 @@
{
fprintf(stderr, "%s",
- "usage: pciconf -l [-BbcevV] [device]\n"
+ "usage: pciconf -l [-BbcetvV] [device]\n"
" pciconf -a device\n"
" pciconf -r [-b | -h] device addr[:addr2]\n"
" pciconf -w [-b | -h] device addr value\n"
@@ -104,13 +105,13 @@
{
int c, width;
int listmode, readmode, writemode, attachedmode, dumpbarmode;
- int bars, bridge, caps, errors, verbose, vpd;
+ int bars, bridge, caps, errors, topology, verbose, vpd;
listmode = readmode = writemode = attachedmode = dumpbarmode = 0;
- bars = bridge = caps = errors = verbose = vpd= 0;
+ bars = bridge = caps = errors = topology = verbose = vpd= 0;
width = 4;
- while ((c = getopt(argc, argv, "aBbcDehlrwVv")) != -1) {
+ while ((c = getopt(argc, argv, "aBbcDehlrtwVv")) != -1) {
switch(c) {
case 'a':
attachedmode = 1;
@@ -149,6 +150,10 @@
readmode = 1;
break;
+ case 't':
+ topology = 1;
+ break;
+
case 'w':
writemode = 1;
break;
@@ -180,7 +185,7 @@
if (listmode) {
list_devs(optind + 1 == argc ? argv[optind] : NULL, verbose,
- bars, bridge, caps, errors, vpd, listmode);
+ bars, bridge, caps, errors, topology, vpd, listmode);
} else if (attachedmode) {
chkattached(argv[optind]);
} else if (readmode) {
@@ -202,7 +207,7 @@
static void
list_devs(const char *name, int verbose, int bars, int bridge, int caps,
- int errors, int vpd, int listmode)
+ int errors, int topology, int vpd, int listmode)
{
int fd;
struct pci_conf_io pc;
@@ -296,6 +301,8 @@
list_caps(fd, p, caps);
if (errors)
list_errors(fd, p);
+ if (topology)
+ list_topology(p);
if (vpd)
list_vpd(fd, p);
}
@@ -552,6 +559,12 @@
bar.pbi_enabled ? "enabled" : "disabled");
}
+static void
+list_topology(struct pci_conf *p)
+{
+ printf(" NUMA node = %hd\n", p->pd_numa_domain);
+}
+
static void
list_verbose(struct pci_conf *p)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 14, 9:37 PM (5 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15801375
Default Alt Text
D44290.diff (3 KB)
Attached To
Mode
D44290: pciconf: Report topology information
Attached
Detach File
Event Timeline
Log In to Comment