Zero is a valid address in I/O space, so display it and it's associated
size when IO is enabled in the PCI command register.
From arch/powerpc/kernel/pci-common.c:
/* Here, we are a bit different than memory as typically IO space
* starting at low addresses -is- valid. What we do instead [is] that
* we consider as unassigned anything that doesn't have IO enabled
* in the PCI command register, and that's it.
*/
Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
break;
if (sscanf(buf, "%llx %llx %llx", &start, &end, &flags) != 3)
a->error("Syntax error in %s", namebuf);
- if (start)
+ if (end > start)
size = end - start + 1;
else
size = 0;
{
pciaddr_t a = pos & PCI_BASE_ADDRESS_IO_MASK;
printf("I/O ports at ");
- if (a)
+ if (a || (cmd & PCI_COMMAND_IO))
printf(PCIADDR_PORT_FMT, a);
else if (flg & PCI_BASE_ADDRESS_IO_MASK)
printf("<ignored>");