用的PCIE采集卡,在X86平台下驱动正常,换成IMX6U后驱动异常,能识别到PCIE设备,能读取PCIE配置空间,把BAR地址映射到虚拟地址后,读取虚拟地址内容全为0.
有没有大佬来指点几下呀,谢谢啦!
BAR0: Reg 0x01100000, Map mem, Adrs 0x01100000, Size 256, vaddr 0xC0B69000, Access RO
BAR1: Reg 0x00001001, Map I/O, Adrs 0x00001000, Size 256, vaddr 0x0, Access RO
BAR2: Reg 0x01100100, Map mem, Adrs 0x01100100, Size 256, vaddr 0xC0B71100, Access RW
BAR3: Reg 0x00000000, Map N/A, Adrs 0x00000000, Size 0, vaddr 0x0, Access RO
BAR4: Reg 0x00000000, Map N/A, Adrs 0x00000000, Size 0, vaddr 0x0, Access RO
BAR5: Reg 0x00000000, Map N/A, Adrs 0x00000000, Size 0, vaddr 0x0, Access RO
这是调试打印的BAR信息,Adrs 是物理地址,vaddr 是ioremap后的虚拟地址,readl(虚拟地址)全为0.
|