We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear experts,
I see a lot of code in opensource like
.macro disable_daif msr daifset, #0xf .endm and it doesn't apply ISB instruction after it. Though I read in ARM manual that:"context-changing operationsthat require the insertion of an ISB instruction toensure the effects of the operation are visible to instructions fetched after the ISB instruction are:• Completed cache and TLB maintenance instructions.• Changes to system control registers."AFAIU set new value to daifset is "Changes to system control registers." doesn't it?
.macro disable_daif msr daifset, #0xf .endm
Hi scopichmu,
Quoting the Arm v8 Architecture manual C5.1.3:
"Writes to PSTATE.{PAN, D, A, I, F} occur in program order without the need for additional synchronization. Changing PSTATE.SPSel to use SP_EL0 synchronizes any updates to SP_EL0 that have been written by an MSR to SP_EL0, without the need for additional synchronization."
Thank you!