+show_range(const char *prefix, u64 base, u64 limit, int bits, int disabled)
+{
+ printf("%s:", prefix);
+ if (base <= limit || verbose > 2)
+ printf(" %0*" PCI_U64_FMT_X "-%0*" PCI_U64_FMT_X, (bits+3)/4, base, (bits+3)/4, limit);
+ if (!disabled && base <= limit)
+ show_size(limit - base + 1);
+ else
+ printf(" [disabled]");
+ if (bits)
+ printf(" [%d-bit]", bits);
+ putchar('\n');
+}
+
+static u32
+ioflg_to_pciflg(pciaddr_t ioflg)
+{
+ u32 flg;
+
+ if (ioflg & PCI_IORESOURCE_IO)
+ flg = PCI_BASE_ADDRESS_SPACE_IO;
+ else if (!(ioflg & PCI_IORESOURCE_MEM))
+ flg = 0;
+ else
+ {
+ flg = PCI_BASE_ADDRESS_SPACE_MEMORY;
+ if (ioflg & PCI_IORESOURCE_MEM_64)
+ flg |= PCI_BASE_ADDRESS_MEM_TYPE_64;
+ else
+ flg |= PCI_BASE_ADDRESS_MEM_TYPE_32;
+ if (ioflg & PCI_IORESOURCE_PREFETCH)
+ flg |= PCI_BASE_ADDRESS_MEM_PREFETCH;
+ }
+
+ return flg;
+}
+
+static void
+show_bases(struct device *d, int cnt, int without_config_data)