[RTEMS Project] #3062: When a PCI addreess range is empty PCI Library Programs Bridges with errouneous address range

RTEMS trac trac at rtems.org
Wed Jul 5 23:38:46 UTC 2017


#3062: When a PCI addreess range is empty PCI Library Programs Bridges with
errouneous address range
--------------------------+-----------------------
 Reporter:  Jeffrey Hill  |       Owner:  Ben Gras
     Type:  defect        |      Status:  assigned
 Priority:  normal        |   Milestone:
Component:  cpukit        |     Version:  4.11
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+-----------------------

Comment (by Jeffrey Hill):

 I modified code starting at line 740 as follows, and now DEBUG diagnostics
 are much easier to follow.
 {{{
 -
 -               /* Limit and Base */
 -               tmp = ((res->end-1) & 0xfff00000) | (res->start >> 16);
 -
 -               DBG("PCI[%x:%x:%x]: BRIDGE BAR 0x%x: 0x%08x\n",
 -                       PCI_DEV_EXPAND(pcidev),
 -                       0x20 + (res->bar-BRIDGE_RES_MEMIO)*4, tmp);
 -               PCI_CFG_W32(pcidev, 0x20+(res->bar-BRIDGE_RES_MEMIO)*4,
 tmp);
 +    /* Limit and Base */
 +    tmp = ((res->end-1) & 0xfff00000) | (res->start >> 16);
 +#ifdef DEBUG
 +    char * pName = "BOGOSITY";
 +    if ( res->bar == BRIDGE_RES_MEMIO ) {
 +      pName = "MEM IO";
 +    }
 +    else if ( res->bar == PCI_RES_MEM_PREFETCH ) {
 +      pName = "MEM PREFETCH";
 +    }
 +    DBG("PCI[%x:%x:%x]: BRIDGE %s BAR: 0x%08x-0x%08x\n",
 +      PCI_DEV_EXPAND(pcidev),
 +      pName,
 +      (tmp & 0xfff0 ) << 16u,
 +      (tmp & 0xfff00000) | 0x000fffff);
 +#endif
 +    PCI_CFG_W32(pcidev, 0x20+(res->bar-BRIDGE_RES_MEMIO)*4, tmp);
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/3062#comment:7>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list