AnsweredAssumed Answered

Lockbox Security Function exit to calling part?

Question asked by ydfang on Apr 4, 2011
Latest reply on Apr 5, 2011 by ydfang

I am trying the Lockbox examples with BF548?

 

According to the Hardware document on page 16-39

To return to the calling function, the authenticated message must execute
rtn; if execution level was not signaled to be lowered in the authentica-
tion firmware. Otherwise, if the execution level was lowered, the Secure
Function can return via rts;.

 

I chenge the code in the security function to this, but it can't return to the calling function in main.

Since it doesn't print the line 97 in lockbox_example.c.

 

section("overlay_live_1") void secure_function(void)
{
  /* Enable JTAG */
  *pSECURE_SYSSWT = ( *pSECURE_SYSSWT & ENABLE_JTAG_MASK );
  ssync();
 
  log_authentication_results();
 
  //led_blink();
   
#define SECURITY0Bit (0xfffe)
      *pSECURE_CONTROL &= SECURITY0Bit;
asm("rtn;");
  return;
 
}

 

Can anybody tell me where is wrong?

Outcomes