AnsweredAssumed Answered


Question asked by Amna Tehreem on Feb 14, 2018
Latest reply on Feb 15, 2018 by Amna Tehreem



I am trying to read RC BAR0 register of PCI express in imx6.


According to the manual:

  • In case of memory BAR, the last 4 bits are read-only and give the BAR type.
  • In case of I/O BAR, last 2 bits are read-only. Last bit shows the BAR type, second last bit is 0 and bit 2 is the least significant bit of base address.


Before writing 0xFFFFFFFF to the BAR0 register, it reads as 0x0000000C and after writing 0xFFFFFFFF to it, it reads as 0xFFF0000F which is confusing for me because according to my understanding, the last bits shouldn't be writable.


In the Linux driver, I have seen that BAR0 is being set before the link up with the value 0x00000004. I have tried it but again I get the same value(0xFFF0000F ) when I read it back after writing it with 0xFFFFFFFF.


The manual also says that the BAR registers are configurable that the BAR mask register determines the number of writable bits in the BAR. I have searched the manual, there are BAR mask registers for EP mode but there isn't any such register for RC mode. 


Any help would be truely appreciated.