Figure 1. Linux Self-Subsystem Restart
- Linux
- Set shutdown scope to subsystem.
- Linux
- Execute reboot command.
- TF-A
- Get
system_restartPSCI call in primary core. - TF-A
- Raise SGI to power down all active secondary cores.
- TF-A
- Send self-suspend request for all the cores to PLM.
- PLM
- Enable PSM power down interrupt for APU.
- TF-A
- Put all secondary cores in WFI state.
- PSM
- Get WFI interrupt for all secondary cores.
- PSM
- Send APU power down event to PLM.
- PLM
- Send direct power down request to PSM.
- PSM
- Execute direct power down sequence to power down APU cores.
- TF-A
- Check if idle callback received from PLM, if not received then request has come from Linux, so send subsystem restart request to PLM.
- TF-A
- Send subsystem restart request to PLM and wait until subsystem restart request is completed.
- PLM
- Check if idle callback registered.
- PLM
- Request runtime HB_MON device if added to start timer.
- PLM
- Change subsystem state to pending restart and change primary core state to pending power down.
- TF-A
- Send self-suspend request for primary core.
- PLM
- Enable PSM power down interrupt for APU.
- TF-A
- Put all secondary cores in WFI state.
- PSM
- Get direct power down interrupt for primary core.
- PSM
- Send APU power down event to PLM.
- PLM
- Check for subsystem restart flag and send direct power down request to PSM for powering down APU.
- PLM
- Release all devices along with HB_MON device which stops the timer.
- PLM
- Reload subsystem image.
- PLM
- Send direct power up request to PSM for powering up APU.