Skip to content

Add aspeed platform service to disable boot watchdog timer A (WDTA)#28573

Open
prajjwal-arista wants to merge 1 commit into
sonic-net:masterfrom
prajjwal-arista:aspeed-disable-boot-watchdog
Open

Add aspeed platform service to disable boot watchdog timer A (WDTA)#28573
prajjwal-arista wants to merge 1 commit into
sonic-net:masterfrom
prajjwal-arista:aspeed-disable-boot-watchdog

Conversation

@prajjwal-arista

@prajjwal-arista prajjwal-arista commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Why I did it

When ABR (Alternate Bootblock Recovery) is enabled, SONiC is expected to bootup and stop the WDTA.
This is required by the ABR mechanism to stop booting from resetting and booting from secondary boot source

HLD PR : sonic-net/SONiC#2470

Work item tracking
  • Microsoft ADO (number only): NA

How I did it

Added a service that starts early in the sequence, before local-fs.target, and disarms WDTA by clearing the enable bit in the WDTA control register.

NOTE - On device where ABR is not enabled the service shall not do anything.
Here we simply switch the enable bit to 0 on the WDTA control register, which shall not do anything on device with ABR enabled

How to verify it

On ABR enabled BMC aspeed 2700 devie, run the service and expect following logs:

admin@sonic:~$ sudo journalctl -u aspeed-disable-boot-watchdog.service -n 2 --no-pager
Apr 13 20:12:22 sonic aspeed-disable-boot-watchdog.sh[368]: aspeed-disable-boot-watchdog: WDTA ctrl: 0x00000003 -> 0x00000002

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • 202608

Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
Failure type:

Tested branch

  • master
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • 202608
  • N/A

Test result

The introduced service is successfully able to disable the WDTA on bootup in time, on ABR enabled dut -

admin@sonic:~$ sudo systemctl status aspeed-disable-boot-watchdog.service
● aspeed-disable-boot-watchdog.service - AST2720 ABR Boot Watchdog Disarm
     Loaded: loaded (/usr/lib/systemd/system/aspeed-disable-boot-watchdog.service; enabled; preset: enabled)
     Active: active (exited) since Mon 2026-04-13 20:12:21 UTC; 1min 0s ago
 Invocation: 6532cc9d0e36485784978b121973a16c
   Main PID: 368 (code=exited, status=0/SUCCESS)
   Mem peak: 4.3M
        CPU: 134ms

Apr 13 20:12:22 sonic aspeed-disable-boot-watchdog.sh[368]: aspeed-disable-boot-watchdog: WDTA ctrl: 0x00000003 -> 0x00000002
Notice: journal has been rotated since unit was started, output may be incomplete.
admin@sonic:~$
admin@sonic:~$ sudo journalctl -u aspeed-disable-boot-watchdog.service -n 2 --no-pager
Apr 13 20:12:22 sonic aspeed-disable-boot-watchdog.sh[368]: aspeed-disable-boot-watchdog: WDTA ctrl: 0x00000003 -> 0x00000002
admin@sonic:~$

On DUT where ABR is not enabled, the service simply tries to flip the WDTA ctrl bit , which doesn't do anything and doesn't create any problems. the system runs fine.

admin@sonic:~$ sudo systemctl status aspeed-disable-boot-watchdog.service
● aspeed-disable-boot-watchdog.service - AST2720 ABR Boot Watchdog Disarm
     Loaded: loaded (/usr/lib/systemd/system/aspeed-disable-boot-watchdog.servi>
     Active: active (exited) since Mon 2026-04-13 19:55:51 UTC; 4min 59s ago
 Invocation: dea86fcbfe74443eae53454a44fb55e2
   Main PID: 366 (code=exited, status=0/SUCCESS)
   Mem peak: 4.2M
        CPU: 139ms

Apr 13 19:55:53 sonic aspeed-disable-boot-watchdog.sh[366]: aspeed-disable-boot>
Notice: journal has been rotated since unit was started, output may be incomple>
admin@sonic:~$
admin@sonic:~$ sudo journalctl -u aspeed-disable-boot-watchdog.service -n 2 --no-pager
Apr 13 19:55:53 sonic aspeed-disable-boot-watchdog.sh[366]: aspeed-disable-boot-watchdog: WDTA ctrl: 0x00000010 -> 0x00000010

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

When ABR (Alternate Bootblock Recovery) is enabled, SONiC is expected to
bootup and stop the WDTA.
This service starts early in the sequence, before local-fs.target, and disarms
WDTA by clearing the enable bit in the WDTA control register.

Signed-off-by: Prajjwal Singh <prajjwal@arista.com>
@prajjwal-arista
prajjwal-arista requested a review from lguohan as a code owner July 22, 2026 11:28
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request for branch(es): 202608.
Added label(s) for branch(es) msft-202608.

---Powered by SONiC BuildBot

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request label(s) for branch(es): msft-202608, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202608: <test result>) in the Test result section as well in your PR description.

---Powered by SONiC BuildBot

@vivekverma-arista

Copy link
Copy Markdown
Contributor

Refer HLD for background: sonic-net/SONiC#2470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants