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

some queries regarding MMU & TCM

Note: This was originally posted on 20th May 2009 at http://forums.arm.com

Hi All,

         I want to make use of MMU,TCM & I/D Cache features in ARM.But i got blocked :(  with the following doubts and not able to get clear information from the documents available in net.
 
    -> 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?
    -> Compared to ARM926EJ-S, in ARM1136J-S is there any improvement in MMU,TCM,I/D Cache  functionalities?

Thanks In Advance :) ,
satish
Parents
  • Note: This was originally posted on 20th May 2009 at http://forums.arm.com

    so,you mean to say,not to enter supervisor mode from user mode?
    Is MMU should be configured before entering application?

    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).

    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?

    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.

    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?

    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.
Reply
  • Note: This was originally posted on 20th May 2009 at http://forums.arm.com

    so,you mean to say,not to enter supervisor mode from user mode?
    Is MMU should be configured before entering application?

    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).

    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?

    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.

    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?

    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.
Children
No data