This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A8: Keeping Cache-enabled and MMU-disabled

Hi all,

A Question about the A8 processor.

If I enable the L1 and L2 caches, I see a performance boost even if the MMU is disabled. I was under the impression that the MMU is required to be enabled to use the Cache. I also do not see any errors or mismatches. My project works the same way whether cache is disabled or enabled(better performance in the second case), leading me to believe that there are no problems with using the cache without enabling the MMU. Is this the expected behavior?

Additionally, I am also defining the page directory to mark the uncacheable memory. This also seems to work when I do not enable the MMU. Can I ignore the MMU and use the cache safely?

I read this post but I am still not clear on what to expect from a software point of view.

For further context, I am using the BBB device for a a project which requires good performance, when I stumbled on this. This does not require virtual memory. It needs uncacheable memory for some device drivers which use DMA. Every other piece of memory can be cached and all processes share the same address space. 

Cheers!

Parents
  • The MMU is primarily used to perform address translation. If the MMU is disabled, that effectively means that there is no translation happening. If you want to perform address translation (using sections or supersections), you have to use the MMU. The MMU registers tell the hardware how to perform the translation and what to do an address/data has been fetched.
    Keep in mind that there is Address Cache, Data Cache and a Unified cache. Typically, L1 cache is just used as an address cache, may not specifically need a translation table and it might be enabled as a default behavior. Hence, even if MMU is disabled, L1 Cache is still being used providing the performance boost.

Reply
  • The MMU is primarily used to perform address translation. If the MMU is disabled, that effectively means that there is no translation happening. If you want to perform address translation (using sections or supersections), you have to use the MMU. The MMU registers tell the hardware how to perform the translation and what to do an address/data has been fetched.
    Keep in mind that there is Address Cache, Data Cache and a Unified cache. Typically, L1 cache is just used as an address cache, may not specifically need a translation table and it might be enabled as a default behavior. Hence, even if MMU is disabled, L1 Cache is still being used providing the performance boost.

Children