ARM Cortex A9 dsb isb after write ICCPMR

In the functions ulPortSetInterruptMask / portCLEAR_INTERRUPT_MASK is after the change of the ICCPMR used a dsb and isb.

Is there a reason, why this isn’t needed in the portRESTORE_CONTEXT, where the ICCPMR is restored?

Are you talking about here: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/V10.4.5/portable/GCC/ARM_CA9/portASM.S#L126 If so, I think it is because exiting the interrupt itself acts as a barrier. Let me know if you think there is an error.

Yes, this is excalty this possition.
But what do you mean with, the exist of the Interrupts acts as barrier?

By the ulPortSetInterruptMask / portCLEAR_INTERRUPT_MASK is it done in this way.
CPSR set ISR Disable Bit (I)
dsb
isb
ICCPMR
dsb
isb
CPSR clear ISR Disable Bit (I)
dsb
isb

So, its for me not clear, why it’s on one possition is needed and at the other not.

As per my comment in your other thread - not deep dived into this yet - but will do.

I was meaning that when enabling or disabling interrupts from a task it is essential that the update to the interrupt enable status takes effect immediately as the rest of the kernel logic assumes from that point on it is in a critical section. However within the interrupt it doesn’t need to take effect immediately (maybe, hypothesising at the moment until done the full analysis), but in any case the act of exiting the interrupt has an equivalent effect as the dsb isb sequence so you are guaranteed the interrupt status will have been updated in the hardware before running any further task code.

As per the other thread - in addition to looking at the above I want to ask what problem you are actually experiencing. Your posts here and in github look like you are trying to fix something, but without mentioning what you are trying to fix it is hard for us to make suggestions for you.