[RTEMS Project] #3062: When a PCI addreess range is empty PCI Library Programs Bridges with errouneous address range
RTEMS trac
trac at rtems.org
Tue Jul 11 22:08:29 UTC 2017
#3062: When a PCI addreess range is empty PCI Library Programs Bridges with
errouneous address range
--------------------------+-------------------------------
Reporter: Jeffrey Hill | Owner: Daniel Hellstrom
Type: defect | Status: assigned
Priority: normal | Milestone:
Component: cpukit | Version: 4.11
Severity: normal | Resolution:
Keywords: |
--------------------------+-------------------------------
Comment (by Jeffrey Hill):
At line 309 the memory and IO spaces are initially disabled when the
device or bridge is located.
{{{
PCI_CFG_W16(pcidev, PCIR_COMMAND, 0);
}}}
At Line 342 the bridge's 64 bit memory and memory IO space base addresses
are cleared to zero when the bridge device is initially located
{{{
PCI_CFG_W32(pcidev, 0x28, 0);
PCI_CFG_W32(pcidev, 0x2C, 0);
}}}
However, I don't see that registers 0x1c, 0x20, and 0x24 are receiving
initialization in pci_find_devs, and therefore they will need to be set
later
And therefore my suggested change below isn’t going to perform the
necessary initialization for the unused address spaces in a bridge.
{{{
@@ -703,47 +707,49 @@ static void pci_set_bar(struct pci_dev *dev, int
residx)
if ((res->flags == 0) || (res->flags & PCI_RES_FAIL))
return;
+ if ( res->end <= res->start )
+ return;
+
}}}
I will need to watch it run again and verify that res->end and res->start
are actually being used when there values are both zero, as I fear
--
Ticket URL: <http://devel.rtems.org/ticket/3062#comment:11>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list