CGL shall provide support for detecting a repeating reboot cycle due to recurring failures and will go to an offline state if this occurs.

This feature is available in U-Boot if you enable the CONFIG_BOOTCOUNT_LIMIT
configuration option. The implementation uses the following environment variables:

bootcount:

This variable will be automatically created if it does not exist,
and it will be updated at each reset of the processor.
After a power-on reset, it will be initialized with 1, and each reboot
will increment the value by 1.

bootlimit:

If this variable exists, its contents are taken as the maximum
number of reboot cycles allowed.

altbootcmd:

If, after a reboot, the new value of bootcount
exceeds the value of bootlimit, then instead of the standard boot action
(executing the contents of bootcmd) an alternate boot action will be
performed, and the contents of altbootcmd will be executed.

If the variable bootlimit is not defined in the environment,
the Boot Count Limit feature is disabled.
If it is enabled, but altbootcmd is not defined, then U-Boot will drop
into interactive mode and remain there.

It is the responsibility of some application code (typically a Linux application)
to reset the variable bootcount, thus allowing for more boot cycles.

At the moment, the Boot Count Limit feature is available only for MPC8xx, MPC82xx and MPC5200 Power Architecture® processors.