tianocore / edk2

EDK II
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II
Other
4.64k stars 2.51k forks source link

NetworkPkg/SnpDxe: Shutdown SnpDxe on BeforeExitBootServices Event. #6010

Open apop5 opened 3 months ago

apop5 commented 3 months ago

Description

SnpDxe registers for an ExitBootServices callback and runs the PXE_OPCODE_SHUTDOWN and PXE_OPCODE_STOP commands for any network controllers that the driver is attached to.

Register the SnpDxe callback for gEfiEventBeforeExitBootServicesGuid instead of gEfiEventExitBootServicesGuid to ensure the correct ordering:

  1. ExitBootServices event
  2. Network card shutdown sequence is completed

Also, close the event to prevent rerunning the shutdown if multiple ExitBootServices events need to be called by the OS.

How This Was Tested

Verified PXE boot was able to complete.

Integration Instructions

N/A

github-actions[bot] commented 3 months ago

WARNING: Cannot add reviewers: A user specified as a reviewer for this PR is not a collaborator of the edk2 repository. Please add them as a collaborator to the repository and re-request the review.

Users requested: ajfish, leiflindholm, mdkinney, SaloniKasbekar, Zclarkwilliams

makubacki commented 3 months ago

WARNING: Cannot add reviewers: A user specified as a reviewer for this PR is not a collaborator of the edk2 repository. Please add them as a collaborator to the repository and re-request the review.

Users requested: ajfish, leiflindholm, mdkinney, SaloniKasbekar, Zclarkwilliams

@mdkinney

github-actions[bot] commented 3 months ago

WARNING: Cannot add reviewers: A user specified as a reviewer for this PR is not a collaborator of the edk2 repository. Please add them as a collaborator to the repository and re-request the review.

Users requested: ajfish, leiflindholm, mdkinney, SaloniKasbekar, Zclarkwilliams