~funderscoreblog cgit wikiget in touch

BL1 enables the SoC watchdog and sets it to ~30 seconds, where it resets after a while. BL2 has a function watchdog_disable(void) which effectively disables it:

   1 void watchdog_disable(void)
   2 {
   3                     /* Disable watchdog. */
   4   _DAT_c11098d0 = _DAT_c11098d0 & 0xfdfbffff;
   5   return;
   6 }

It is called by ddr_test(void) if ddrs.full_test equals 1:

   1   if (ddrs.ddr_full_test != 0) {
   2     watchdog_disable();
   3     uVar2 = memTestDevice((uint *)(ulong)ddrs.ddr_base_addr,(ulong)((uint)ddrs.ddr_size << 0x14));
   4     if ((int)uVar2 == 0) {
   5       serial_puts((byte *)s_Device_test_pass!_d900940c);
   6     }
   7     else {
   8       serial_puts((byte *)s_Device_test_failed!!!_d90093f5);
   9       reset_system();
  10     }
  11   }

And by bl2_load_image(void) when loading images:

   1   do {
   2     if (*(int *)(pbVar7 + -0x1c) == 0) {
   3       auVar12 = FUN_d90011f4();
   4       FUN_d9008de8(auVar12._0_8_,auVar12._8_8_,pbVar6);
   5       watchdog_disable();

So BL2 doesn't actually disable the watchdog right away, but only when loading images, in practise.