Skip to content

Conversation

@rogurr
Copy link
Contributor

@rogurr rogurr commented Jan 16, 2026

Description

The current EDK II implementation performs an immediate callback when registering through LocateHandle using ByRegisterNotify and will provide each handle normally for protocols installed prior to the registration. The Patina code was written to start caching handles only after the registration is performed. This change will seed the cache with prior registered protocols at the registration to match the EDK II implementation.

During debug, found a location where locate_handle() was calling the underlying layer first for buffer size, but not handling the error paths. Updated that call to return an error if encountered.

  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

Performing a port of a private UEFI to use Patina which requires the LocateHandle call to have knowledge of previously installed protocols. Tested with my current code and tested with the added test functions.

Integration Instructions

N/A

@github-actions github-actions bot added the impact:testing Affects testing label Jan 16, 2026
@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rogurr rogurr added the type:bug Something isn't working label Jan 16, 2026
@rogurr rogurr marked this pull request as ready for review January 16, 2026 22:38
@rogurr rogurr requested review from Javagedes, kuqin12 and vineelko and removed request for makubacki January 16, 2026 23:14
Copy link
Contributor

@os-d os-d left a comment

Choose a reason for hiding this comment

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

Don't need to change for this PR, but for future reference, when we have multiple unrelated changes that make sense to go in the same PR, we mark the PR title as [REBASE & FF] <title> and then have the branch have nice clean, independently reviewable commits in it and when we go to merge it, we choose the rebase option instead of squash, so we keep the commit history clear for separate changes. Again, don't need to change this for this one, but for the future.

@rogurr rogurr enabled auto-merge (squash) January 21, 2026 20:07
@rogurr rogurr merged commit 99ee2e6 into OpenDevicePartnership:main Jan 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:testing Affects testing type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: EFI_BOOT_SERVICES.LocateHandle() SearchType ByRegisterNotify is missing handles prior to registration

3 participants