IMX6Q: Multicore PCIe access

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX6Q: Multicore PCIe access

829 Views
etim
Contributor II

OK - I'm able to now answer a portion of my question.

Two threads on the same core will NOT cause an issue with accessing PCIe BAR as long as the BAR is mapped as "Device Memory." Device Memory is uncached and very similar to Strongly Ordered memory; it also guarantees atomic operation (interrupts will wait until the access operation is complete). See "ARM Cortex-A Series: Programmer's Guide v4.0", specifically "10: Memory Ordering". ldr/str/ldm/stm instructions fall under this atomic nature.

What I need NXP to answer is if two threads on different cores are doing ldr/str/ldm/stm to the PCIe BAR, what (if any) arbitrates the accesses in HW? Caches aren't involved (Dev Mem)... Is there something in the "MPCore Platform" or AXI/AHB? Obviously if the answer is "nothing" than SW is the mechanism.

@

I'm primarily concerned that if 2+ cores are performing a PCIe BAR read they can wreak havoc (eg. i2c read consists of write+read and if not atomic with competing threads you're almost guaranteed to read back incorrect data).

Thanks in advance!

Tim

 

0 Kudos
Reply
1 Reply

733 Views
Yuri
NXP Employee
NXP Employee

Hello,

 

  It is highly recommended to use exclusive access instructions (LDREX/STREX), which provide

a foundation for implementing semaphores in systems with Arm-based processors.

 

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dht0008a/ch01s02s01.html

 

  Systems that support exclusive operations include hardware state machines called exclusive

monitors to track the state of exclusive accesses in the system.

  Also, please look at ERR003733 (ARM: 751480 Conditional failed LDREXcc can set the exclusive monitor)

of the i.MX6 Errata.

 

https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf


Have a great day,
Yuri

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply