Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bootloader_task
{ 
   done = false;
   g_dev_state = gf_dev_state;

   while (!done)
   {
      if (g_dev_state == STATE_UNSEALED)
      {
         rc = read_cmd(&cmd, param);
         if (rc == OK)
         { 
            if (cmd == CMD_RUN)
            {
               flash_write(&gf_dev_state, STATE_SEALED);
               done = true;
            }
            else if ((cmd == CMD_FACTORY_AUTH) && (param == passphrase))
            {
               g_dev_state = STATE_FACTORY;
            }
            else
            {
               process_cmd(g_factory_mode, cmd, 
            }
         }
         print_error(rc, cmd, param); 
      }
      else
      {
         done = true;
      }
   }

   jump_to_NS_entry();
}


  • Set up Trust Zone memories
  • Update firmware
  • Validating S and NS FW code before jumping to it
  • Generalized API that can be adapted to any physical communication (e.g., UART, SMBus, SPI, etc.)

...