ARM MMU operation in various operating modes

Go To StackoverFlow.com

4

I will put my understandings related to the topic before i ask my question,

  1. Linux Kernel mode corresponds to ARM supervisor mode.
  2. Linux User mode corresponds to ARM User Mode.
  3. In Kernel Mode (MMU enabled) , Linux uses relative address instead of physical address. ie , physical address = relative address - PAGE_OFFSET + PHYS_OFFSET
  4. In User Mode (MMU enabled) , Linux uses virtual address instead of physical address. ie , physical address = MMU Translation(Virtual Address) using pte , pmd , pgd

Questions:

  1. Is MMU enabled in supervisor mode(for kernel address).

  2. If it is enabled , then does this means that the same MMU functions in a different way in translating Supervisor mode and User mode.

  3. If MMU functions in a different way in different mode , please give me pointers on how mmu function is various modes.

Thanks in advance.

2012-04-03 19:50
by Prabagaran


1

1: Yes. Enabling the MMU enables it for all modes (although it needs to be done separately for Secure/Non-secure states, but that is beyond the scope of Linux).

2: Yes, in that it can have different access permissions for privileged (kernel) and user modes. A somewhat outdated, but conceptually useful table demonstrating this can be found in the ARM1176 technical reference manual. http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0333h/Caceaije.html

3: The MMU functions the same in all modes. OK, for completeness: there is a concept called "domains", which can be used by the kernel to bypass access permission checking completely. This is deprecated in the latest processors though, and no longer used for the ARM11 and Cortex-A processors.

2012-04-07 14:33
by unixsmurf
Ads