This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EVMK2H: ARM behavior in monitor mode

Part Number: EVMK2H

Hi

i'm new to ARM processors and i was running some experiment on ARM cores of 66AK2H. at some point i want to see cache behavior of ARM while it's "cache is enabled" and its "MMU is disabled". i 've done this by adjusting GEL file provided by TI. in this GEL file i comment out two part:

1. part related to disabling cache

2. part related to entering non-secure mode

after this to access HCR register i switched to "MONITOR MODE" by calling to SMC command.

Here is the problem:

when i enter monitor mode, only commands that seems to run are "branch" and "return from branch" and if i try to do anything serious like reading CP15 and doing another things will result in "UNDEFINED" exception.

i'm using ccs 8.3 and ubuntu 14.04 64 bit

HERE i attach the code so you could try it yourself.

testArm.rar

  • The best way to analyze cache behavior on ARM is to use more advanced tools like Lauterbach emulator and TRace32 IDE that provides greater visualization and experimentation with cache and MMU . CCS provides a limited view using debug view using ARM Advanced tools view to indicated if the cache and MMU Is enabled or not but doesn`t indicate how the page tables have been setup and how the  memory regions have been setup.

    If you don`t have access to those tools then  I would recommend that you don`t try to use Monitor mode using GEL files and do this using code. GELs are provided for SOC/EVM primarily to only power up the modules, enabled clocks, configure PLLs, setting up external memory /DDR   and to wakeup cores and put them in clean state for debugging. Any usage beyond this in terms of configuring  using monitor mode and setting up of A15 needs to be done using A15 CSL APIs that are provided here:

    pdk_k2hk_4_0_x\packages\ti\csl\arch\a15

    PDK is a component that is part of Processor SDK RTOS and there is plenty of code in the core setup in the bootloader in the package that shows how monitor level functionality can be setup. For example refer to code in the file

    pdk_k2hk_4_0_9\packages\ti\boot\sbl\soc\k2h

    This file provides examples of enabling VFP, Neon in addition to cache and MMU setup for A15 that is configured before entering main as part of the init code which is written in ARM assembly.