Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

void scc_set_sw_alarm ( void   ) 

Signal a software alarm to the SCC. This will take the SCC and other PISA parts out of Secure mode and into Security Failure mode. The SCC will stay in failed mode until a reboot.

For internal use only.

If the SCC is not already in fail state, simply write the SMN_COMMAND_SET_SOFTWARE_ALARM bit in SMN_COMMAND_REG. Since there is no reason to wait for the interrupt to bounce back, simply act as though one did.

Definition at line 776 of file scc2_driver.c.

References scc_availability, scc_init(), scc_perform_callbacks(), SCC_STATUS_FAILED, SCC_STATUS_INITIAL, SCC_STATUS_OK, scc_update_state(), SCC_WRITE_REGISTER, SMN_COMMAND, SMN_COMMAND_REG, and SMN_COMMAND_SET_SOFTWARE_ALARM.

{

      if (scc_availability == SCC_STATUS_INITIAL) {
            scc_init();
      }

      /* Update scc_availability based on current SMN status.  This might
       * perform callbacks.
       */
      (void)scc_update_state();

      /* if everything is OK, make it fail */
      if (scc_availability == SCC_STATUS_OK) {

            /* sound the alarm (and disable SMN interrupts */
            SCC_WRITE_REGISTER(SMN_COMMAND_REG,
                           SMN_COMMAND_SET_SOFTWARE_ALARM);

            scc_availability = SCC_STATUS_FAILED;     /* Remember what we've done */

            /* In case SMN interrupt is not available, tell the world */
            scc_perform_callbacks();
      }

      return;
}                       /* scc_set_sw_alarm */


Generated by  Doxygen 1.6.0   Back to index