Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

apop5
Copy link
Contributor

@apop5 apop5 commented Jul 30, 2024

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.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

Verified PXE boot was able to complete.

Integration Instructions

N/A

Copy link

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
Copy link
Member

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

@apop5 apop5 force-pushed the personal/apop/snpbeforeexit branch from ed5835c to 3f0c329 Compare July 31, 2024 01:17
Copy link

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

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.

Signed-off-by: Aaron Pop <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants