static void
do_map_bus(int bus)
{
+ int domain = (filter.domain >= 0 ? filter.domain : 0);
int dev, func;
int verbose = pacc->debugging;
struct bus_info *bi = bus_info + bus;
struct device *d;
if (verbose)
- printf("Mapping bus %02x\n", bus);
+ printf("Mapping bus %04x:%02x\n", domain, bus);
for (dev = 0; dev < 32; dev++)
if (filter.slot < 0 || filter.slot == dev)
{
for (func = 0; func < func_limit; func++)
if (filter.func < 0 || filter.func == func)
{
- /* XXX: Bus mapping supports only domain 0 */
- struct pci_dev *p = pci_get_dev(pacc, 0, bus, dev, func);
+ struct pci_dev *p = pci_get_dev(pacc, domain, bus, dev, func);
u16 vendor = pci_read_word(p, PCI_VENDOR_ID);
if (vendor && vendor != 0xffff)
{
if (!func && (pci_read_byte(p, PCI_HEADER_TYPE) & 0x80))
func_limit = 8;
if (verbose)
- printf("Discovered device %02x:%02x.%d\n", bus, dev, func);
+ printf("Discovered device %04x:%02x:%02x.%d\n", domain, bus, dev, func);
bi->exists = 1;
if (d = scan_device(p))
{
Invoke bus mapping mode which performs a thorough scan of all PCI devices, including
those behind misconfigured bridges, etc. This option gives meaningful results only
with a direct hardware access mode, which usually requires root privileges.
-Please note that the bus mapper only scans PCI domain 0.
+By default, the bus mapper scans domain. You can use the
+.B -s
+option to select a different domain.
.TP
.B --version
Shows