What is different between AF & AP? I understand AP = permission access as read/write/readonly/no access but what is AF?
I want to setup up some device memory to no access (no read/write). I want to make sure get data abort exception if it is access. Should I set both AP =0 and AF = 0?
Or AP=0 and AF=1 (access flag). why?
The AF is there to "record" an access. Not to allow or disallow an access. It is for the software (OS) to know if a certain memory area has been accessed and is kind of dirty.
So for example, if I don't have a device(registers) at address 0x20000000 to 0x30000000 in our SOC. Should I set AF=0 or AF=1. I like to make sure we get data abort if someone try to access in any mode.
Simply do only map memory which you want to use. Any other access generates a data abort.
AF is used for the OS. With AF == 0 you will get a data abort. Then the OS will know that the user process wants to use this memory, and takes action, like loading the data from external memory. Or doing a copy on write.
Thanks again. I don't find good document that describe memory attributes. I also have question on Indx(MAIR_ELn) too. Do you any good reference doc?
You seem to talk about ARMv8-A. So check out:
DEN0024A - ARMv8 Programmer GuideDDI0478C_A - ARMv8 Reference Manualand