Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153401235
D36237.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
892 B
Referenced Files
None
Subscribers
None
D36237.diff
View Options
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -3170,6 +3170,21 @@
return (NULL);
}
+struct pci_map *
+pci_first_bar(device_t dev)
+{
+ struct pci_devinfo *dinfo;
+
+ dinfo = device_get_ivars(dev);
+ return (STAILQ_FIRST(&dinfo->cfg.maps));
+}
+
+struct pci_map *
+pci_next_bar(struct pci_map *pm)
+{
+ return (STAILQ_NEXT(pm, pm_link));
+}
+
int
pci_bar_enabled(device_t dev, struct pci_map *pm)
{
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -717,6 +717,8 @@
extern uint32_t pci_generation;
struct pci_map *pci_find_bar(device_t dev, int reg);
+struct pci_map *pci_first_bar(device_t dev);
+struct pci_map *pci_next_bar(struct pci_map *pm);
int pci_bar_enabled(device_t dev, struct pci_map *pm);
struct pcicfg_vpd *pci_fetch_vpd_list(device_t dev);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 21, 11:04 PM (8 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31892497
Default Alt Text
D36237.diff (892 B)
Attached To
Mode
D36237: pci: Add helper routines to iterate over a device's BARs.
Attached
Detach File
Event Timeline
Log In to Comment