PCI configuration registers(BARs)

mike zheng mail4mz at gmail.com
Sat Dec 1 05:33:46 EST 2007


Hi All,

I set PCI configuration registers(BARs) of a PCI adapter as following in Uboot:


  base address 0 =              0xf4000001
  base address 1 =              0xf4000041
  base address 2 =              0xf4000081
  base address 3 =              0xa0000000
  base address 4 =              0xa0020000
  base address 5 =              0x00000000

However when I start Linux2.4 kernel, the same adapter's PCI
configuration registers have following values:
BaseAddr[0]=0x3ffffc0
BaseAddr[1]=0x3ffffb0
BaseAddr[2]=0x3ffff00
    After ioremap BaseAddr[3]=0xa1002000
BaseAddr[3]=0xa1002000
    After ioremap BaseAddr[4]=0xa1004000
BaseAddr[4]=0xa1004000
BaseAddr[5]=0x0

This is a working system on MPC8548, everything including PCI adapter
works fine. My question is why the values are different in Uboot and
Linux? The value under Uboot is reasonable, since the PCI outbound
window is set up as 0xA0000000 and 0XF4000000. In addition, the value
seems falling into the outbound window after the ioremap() is called
on BAR3 and BAR4. The ioremap() will failed if I try to convert BAR0,
BAR1, BAR2.

Thanks in advance,

Mike



More information about the Linuxppc-dev mailing list