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.
You don't _need_ an OS to configure the MMU, but the processors that have an MMU are generally applications processors and will usually run an OS of some kind.
Think about the implications of giving user-mode applications the ability to enter supervisor mode!
You _can_ execute a SWI instruction to enter supervisor mode, but the call will be handled by the processor's SWI handler. In an environment with an OS, this is typically used for system calls.If you are running on an OS, it should configure the MMU and caches for you. If you have specific requirements (such as the ability to execute the contents of some memory or flush the caches), the OS may provide you with a library function to do that, but there is no generic way to do that from user space and the OS may not allow you to do it.If you are not running on an OS, you will want to turn on the MMU anyway, even if it has a flat memory map, as the I cache cannot be enabled without it. However, if you are not running on an OS you can have privileged access to whatever part of the processor you want.
Yes, but the operations will need to be performed by some privileged code. You will need OS support, usually in the form of a driver. If there is no driver available for your system, you will need to write one.
The OS will configure it for you early in its boot process. It will adjust it often whilst it is running, but if you're writing a typical application you won't need to know about what it is doing.However, if you're hoping to use DMA, you will need to know the physical address of your memory, but typically only drivers can do that (depending on the OS).Any mode other than user mode is considered privileged, so in theory you can configure the MMU from any other mode. However, system mode is probably the most suitable mode for normal OS execution.
Yes, there will be an overhead. If your memory block is 128B long, I'd use memcpy. If your memory block is 40MB, DMA will be faster. However, there are many factors involved so it really depends on what you're doing and how you're doing it. If in doubt (and you have the time), try doing both and running some benchmarks.
-> Is compact OS(like WINCE/Linux) needed to configure MMU in ARM ?
-> From my application(user mode),can i enter supervisor mode using SWI to configure MMU, TCM,I/D cache?
-> In ARM1136J-S,can we use DMA in application, else DMA is used only by the processor to transfer data from external memory to TCM?
so,you mean to say,not to enter supervisor mode from user mode?Is MMU should be configured before entering application?
As you said Supervisor mode will be used by OS(if any),so if i am not running any OS then which priviliged mode i should use to configure MMU?how can i switch from user mode to priviliged mode and vice versa?
Suppose if DMA is implemented with a driver,then it will add some overhead to application.So,in this case, is DMA implementation faster enough than memcpy?