0
votes

I am trying to understand the difference between these two modes of operation, (mostly in arm processors):

  1. MMU is disabled.
  2. MMU is enabled, but using one-to-one paging, i.e. virtual address is same as physical address.

From my understanding in both cases the memory is accessed as flat memory, one-to-one paging.

Is that correct ?

Thank you.

1
It's been a while since I've done this but I believe one of the advantages of using the MMU with one-to-one page mapping is that you can set cache bits on pages. I remember the platform I was working on, without the MMU on and setting cache bits, the code would run significantly slower.tangrs

1 Answers

1
votes

sure, you can map the virtual to physical however you like including one to one such that they are equal. There are still differences vs having the mmu off, each and every access has to go through the mmu and be looked up and converted (even if one to one), these tables themselves are in ram as well and that takes time, there is a little cache to help (TLB) but pretty small. Then there are the other settings in the mmu, cachable or not, protection which may require an additional lookups within the chip which may or may not take extra clock cycles.

So purely from an addressing perspective, sure the virtual address and physical address can be the same for the whole address space. there are some bits in the mmu table that replace some bits in the physical address and you can set those to match for some or all of the address space.