I have two T1042-based devices that each use two PCIe controllers in endpoint mode:
- uses the PCIe1 and PCIe3 controllers
- uses the PCIe1 and PCIe2 controllers
Both devices exhibit the same issue.
I have tried to take advantage of the advertised Expansion ROM feature on both of the PCIe controllers for each device (simultaneously and individually) with only limited success. I have found that address translation through the Expansion ROM BAR works as expected when used with the PCIe1 controller. However, attempting to do the same with PCIe2 or PCIe3 seems to suggest that address translation is somehow nonfunctional.
For example, configuring the PCIe2 or PCIe3 inbound expansion ROM ATMU window registers (PEXx_PEXEPROMITAR and PEXx_PEXEPROMIWAR) identically to PCIe1 results in:
- a correctly sized Expansion ROM BAR when viewed from the root complex
- the first read request to the Expansion ROM BAR locks up the PCIe controller from the root complex
I have tested mapping the Expansion ROM BAR to RAM and to parallel NOR flash. The configurations below work as expected with PCIe1, but not with PCIe2 or PCIe3.
Example configuration mapping to RAM
My device has 8 GiB of RAM mapped from physical address 0x0_00000000 to 0x1_ffffffff. I attempt to map 64 KiB at 0x1_fffc0000:
- PEXx_PEXEPROMITAR = 0x001fffc0
- PEXx_PEXEPROMIWAR = 0xa0f5500f
Example configuration mapping to NOR
My device has 256 MiB of NOR mapped from physical address 0xf_f0000000 to 0xf_ffffffff. I attempt to map 64 KiB at 0xf_f0060000:
- PEXx_PEXEPROMITAR = 0x00ff0060
- PEXx_PEXEPROMIWAR = 0x80f4400f