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.

66AK2G12: Cannot use "smc" instruction in the code. If we use that then the code is reaching into some indeterminate state

Part Number: 66AK2G12

We are using K2G ICE board. After running of the initial SBL code, we are trying to use the "smc" instruction from our custom program. (For simplicity let us assume that we have written a new "app" file, where we are trying to use the "smc" instruction.) But, we are not able to use the "smc" instruction.

We have tried to debug and analyze the situation and found the following,

  • After the execution of the smc instruction, the CPU jumps to an invalid condition
  • The content of the ARM CPSR register is changed to 0x200001d6, from which we cannot determine anything
  • The content of the SPSR register is also cannot be accessed
  • From ARM CP15 TRM, we have found
  • We have checked the content of CP15's ID_PFR1 register's "Security extension" bits and we found that is 1. This suggests security extension is supported by this chip.
  • However the content of ID_SAR4.SMC_instrs = 0xc which should be 1 for supporting "SMC" instruction.
  • It is nothing mentioned in the ARM TRM, what does 0xc means'

From our understanding, we think "smc" is not supported in this chip, could you please confirm?

And if supported, then how we can enable that?

Thank you in advance.

  • Please refer to use of Monitor function as shown in  SBL code for using SMC operations. check the files Refer to the files sbl_soc.c and sbl_init.c in the folder pdk_k2g_1_0_1x\packages\ti\boot\sbl\soc\k2g

    To execute SMC instructions the code needs to be in supervisor mode and the only way to do this on K2G is to use the Monitor function in ROM or to write your own boot monitor that is installed as we provide in our Linux SDK.

    Hope this helps.

    Regards,

    Rahul