Hello,
I've tested the PCIe-Boot with a TMDXEVM6678LE and a AMC to PCIe-Adaptor-Card. Everything is fine, but the registered BARs are not as expected. I've patched the IBL with the workaround (for PLL locking...) and the BARs were configured in this way:
BAR0: 1M, 32 bit, non-prefetch
BAR1: 512K, 32 bit, prefetch
BAR2: 4M, 32 bit, prefetch
BAR3: 16M, 32 bit, prefetch
BAR4: 64K, 32 bit, prefetch
BAR5: 4K, 32 bit, prefetch
As I just want to use 4 BARs and the BAR0 only with a size of 4K or 8K, I just modified the IBL as shown below. Problem is that the BAR0 always has the size 1M regardless what I write into the BAR0-Mask register. Furthermore I've an unassigned memory for BAR4, see also below.
Furthermore I've checked the board by only powering the EVM and connecting to it with CCS. Reading the BARs from 0x21801010 (by writing 0xFFFFFFFF to them) the result was not the one expected to the code in the IBL. I've not found any other part in the IBL which is writing to the BAR registers.
Have anybody an idea what's going wrong here?
Best Regards,
Bernd
// Changed IBL
if (flag_6678) {
/* 6678 */
DEVICE_REG32_W ((PCIE_BASE_ADDR + PCIE_BAR0), 0x00000FFF); /* 4K */
DEVICE_REG32_W ((PCIE_BASE_ADDR + PCIE_BAR1), 0x0007FFFF); /* 512K */
DEVICE_REG32_W ((PCIE_BASE_ADDR + PCIE_BAR2), 0x003FFFFF); /* 4M */
DEVICE_REG32_W ((PCIE_BASE_ADDR + PCIE_BAR3), 0x00FFFFFF); /* 16M */
DEVICE_REG32_W ((PCIE_BASE_ADDR + PCIE_BAR4), 0x00000000); /* Empty Bar */
DEVICE_REG32_W ((PCIE_BASE_ADDR + PCIE_BAR5), 0x00000000); /* Empty Bar */
}
...
DEVICE_REG32_W ((PCIE_BASE_ADDR + PCIE_APP_CMD_STATUS), 0x0); /* dbi_cs2=0 */
DEVICE_REG32_W ((PCIE_BASE_ADDR + PCIE_STATUS_CMD), 0x00100146); /* ENABLE mem access */
DEVICE_REG32_W ((PCIE_BASE_ADDR + PCIE_DEV_STAT_CTRL), 0x0000281F); /* Error control */
DEVICE_REG32_W ((PCIE_BASE_ADDR + PCIE_ACCR), 0x000001E0); /* Error control */
DEVICE_REG32_W ((PCIE_BASE_ADDR + PCIE_BAR0), 0); /* non-prefetch, 32-bit, mem bar */
// Output of lspci -v
01:00.0 Multimedia controller: Texas Instruments Device b005 (rev 01)
Subsystem: Siemens Medical Systems, Ultrasound Group Device 0615
Flags: bus master, fast devsel, latency 0, IRQ 11
Memory at fba00000 (32-bit, non-prefetchable) [size=1M]
Memory at f9400000 (32-bit, prefetchable) [size=512K]
Memory at f9000000 (32-bit, prefetchable) [size=4M]
Memory at f8000000 (32-bit, prefetchable) [size=16M]
Memory at <unassigned> (32-bit, prefetchable)
Capabilities: [40] Power Management version 3
Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting <?>
// Results of the BAR registers
BAR0: 0xFFF0 000F
BAR1: 0xFFF8 000F
BAR2: 0xFFC0 000F
BAR3: 0xFF00 000F
BAR4: 0x0000 0008
BAR5: 0x0000 0000