This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Barrier after access to memory mapped register?

Hi,

Iam wondering if it makes sense to have a memory barrier after access to a memory mapped register. I looking at a driver, unfortunately not open source, that has a memory barrier after a read from the interrupt status register of the peripheral when processing the interrupt. I understand the use of the barrier when accessing main RAM, but does it make sense for registers?

CPU: A53 aarch64

Thanks

Parents Reply Children
  • Hi Bastian,

    Strongly ordered (SO) memory accesses have ordering requirements against accesses to other SO or Device address locations, but not against other "Normal" memory accesses. See table 2 in the following link:

    infocenter.arm.com/.../BIHJIIIC.html

    This document is for Cortex-M but the same memory ordering concept present in Cortex-A and Cortex-R.

    regards,

    Joseph

    Update: I forgot to mention that in Armv7-M, there was a change in the memory ordering requirement.

    In revision C of the Armv7-M Architecture Reference Manual, SO accesses do have ordering restrictions with Normal memory accesses.

    In revision D of the Armv7-M Architecture Reference Manual, this is changed to align with other Arm processor designs.

  • Thanks Joseph, I missed the "strongly" vs. "normal" point.