Skip to content

Conversation

@maheeraeron
Copy link
Contributor

@maheeraeron maheeraeron commented May 29, 2025

This PR adds EFI Diagnostics, which is a service used to parse UEFI diagnostics data from an in-memory buffer and send it to our tracing facilities.

The UEFI firmware will write the GPA of the advanced logger buffer to an Io port intercept called SET_EFI_DIAGNOSTICS_GPA.

The diagnostics service is responsible for reading guest memory at the specified GPA and parsing the data. This gets triggered when the UEFI firmware writes to an Io port intercept called PROCESS_EFI_DIAGNOSTICS.

The PROCESS_EFI_DIAGNOSTICS UefiCommand gets triggered by the following conditions:

  • UEFI encounters a failure (guest driven via PROCESS_EFI_DIAGNOSTICS)
  • UEFI fails to boot any device (guest driven via PROCESS_EFI_DIAGNOSTICS)
  • UEFI reaches exit boot services

The simplest way to test this is to run:

cargo run -- --uefi

See comments below for example output.

@maheeraeron maheeraeron requested a review from a team as a code owner May 29, 2025 20:35
@maheeraeron maheeraeron changed the title [WIP] EFI diagnostics rev2 test with ARM64 CI firmware_uefi: Add EFI Diagnostics May 29, 2025
@maheeraeron maheeraeron assigned jstarks and unassigned jstarks May 29, 2025
@maheeraeron maheeraeron requested review from jstarks and mebersol May 29, 2025 23:42
@maheeraeron
Copy link
Contributor Author

FYI-- This PR is a rev2. The other PR I abandoned since it branched off an older branch of main that had ARM issues-- it was easier to make a new PR off a different branch that squashed and cherry-picked the changes from the original

@mebersol mebersol added the backport_2505 Change should be backported to the release/2505 branch label Jun 1, 2025
@github-actions
Copy link

github-actions bot commented Jun 6, 2025

Copy link
Member

@chris-oo chris-oo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM but should we probably split the uefi firmware update to a different PR for ease of cherry pick?

@maheeraeron maheeraeron merged commit b2dbefd into microsoft:main Jun 10, 2025
28 checks passed
@maheeraeron maheeraeron deleted the user/maheeraeron/efi-diagnostics-rev2 branch June 10, 2025 00:48
@mebersol mebersol added backport_2505_approved backported_2505 PR that has been backported to release/2505 and removed backport_2505 Change should be backported to the release/2505 branch labels Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport_2505_approved backported_2505 PR that has been backported to release/2505

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants