Skip to content

Commit 59f2bac

Browse files
authored
[Arista] Reset switch chip in Aboot for QuicksilverP512 and QuicksilverP (#24470)
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md failure_prs.log skip_prs.log Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "fixes #xxxx", or "closes #xxxx" or "resolves #xxxx" Please provide the following information: --> #### Why I did it Mitigate for the recent issue that under some unknown initial conditions, the 7060X6-64PE-B device could get into reboot loop. It's been identified so far that the reboot loop is related to the some bad switch chip state. While still trying to figure out the initial trigger, we propose this mitigation that break the reboot loop. The same mitigation to 7060X6-64PE is also included in this change. ##### Work item tracking - Microsoft ADO **(number only)**: #### How I did it In boot0 script, if the environment is Aboot and the platform is 7060X6-64PE-B, reset the switch chip. #### How to verify it According to our test, this doesn't affect normal booting. <!-- If PR needs to be backported, then the PR must be tested against the base branch and the earliest backport release branch and provide tested image version on these two branches. For example, if the PR is requested for master, 202211 and 202012, then the requester needs to provide test results on master and 202012. --> #### Which release branch to backport (provide reason below if selected) <!-- - Note we only backport fixes to a release branch, *not* features! - Please also provide a reason for the backporting below. - e.g. - [x] 202006 --> - [ ] 202205 - [ ] 202211 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [x] 202505 #### Tested branch (Please provide the tested image version) <!-- - Please provide tested image version - e.g. - [x] 20201231.100 --> - [ ] <!-- image version 1 --> - [ ] <!-- image version 2 --> #### Description for the changelog <!-- Write a short (one line) summary that describes the changes in this pull request for inclusion in the changelog: --> <!-- Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU. --> #### Link to config_db schema for YANG module changes <!-- Provide a link to config_db schema for the table for which YANG model is defined Link should point to correct section on https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/doc/Configuration.md --> #### A picture of a cute animal (not mandatory but encouraged)
1 parent c4bbc99 commit 59f2bac

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

files/Aboot/boot0.j2

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,11 +901,36 @@ regular_install() {
901901
run_hooks post-install
902902
}
903903

904+
run_quirks() {
905+
# only run in Aboot
906+
if $in_aboot && [ -f "/etc/cmdline" ]; then
907+
if [ "$aboot_machine" = "arista_7060x6_64pe_b" ]; then
908+
info "Resetting switch chip for $aboot_machine"
909+
setpci -s 05:00.0 COMMAND=0002
910+
devmem 0x80084000 32 0xC
911+
sleep 1
912+
devmem 0x80084010 32 0x4
913+
sleep 1
914+
devmem 0x80084010 32 0x8
915+
fi
916+
if [ "$aboot_machine" = "arista_7060x6_64pe" ]; then
917+
info "Resetting switch chip for $aboot_machine"
918+
setpci -s 03:00.0 COMMAND=0002
919+
devmem 0xa5184000 32 0xC
920+
sleep 1
921+
devmem 0xa5184010 32 0x4
922+
sleep 1
923+
devmem 0xa5184010 32 0x8
924+
fi
925+
fi
926+
}
927+
904928
secureboot_boot() {
905929
# boot material is extracted and generated in RAM.
906930
# SONiC starts as a live OS.
907931
info "Preparing image for secureboot"
908932
prepare_image_secureboot
933+
run_quirks
909934
update_next_boot
910935
run_kexec
911936
}
@@ -914,6 +939,7 @@ regular_boot() {
914939
# boot uses the image installed on the flash
915940
write_regular_configs "$image_path"
916941
run_hooks pre-kexec
942+
run_quirks
917943
update_next_boot
918944
run_kexec
919945
}

0 commit comments

Comments
 (0)