Skip to content

Conversation

@eeshanl
Copy link
Contributor

@eeshanl eeshanl commented Oct 28, 2025

Description

MdeModulePkg: Add gEdkiiNonDiscoverableDeviceUniqueIdProtocolGuid for deterministic UniqueId support in NonDiscoverablePciDeviceDxe

With this new protocol, a platform can register a UniqueId to be used to identify the PciIo location. For example if a device registers with the NonDiscoverableDeviceRegistrationLib, they can also publish this new protocol on the same EFI_HANDLE as RegisterNonDiscoverableMmioDevice. NonDiscoverablePciDeviceDxe will consume this UniqueId if found and set it to the device's UniqueId. If not found, will backup to the prior method of assigning the UniqueId via a static counter. The platform must maintain all UniqueId's assigned are unique for every instance of the protocol.

For details on how to complete these options and their meaning refer to CONTRIBUTING.md.

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

How This Was Tested

Tested on physical device

Integration Instructions

When assigning a unique ID via this protocol, the platform should ensure that the ID is unique across all instances of this protocol across the platform.
The UniqueId must be in the range of:
MAX_NON_DISCOVERABLE_PCI_DEVICE_ID/2 <= UniqueId < MAX_NON_DISCOVERABLE_PCI_DEVICE_ID

… deterministic UniqueId support in NonDiscoverablePciDeviceDxe

With this new protocol, a platform can register a UniqueId to be used to identify the PciIo location.
For example if a device registers with the NonDiscoverableDeviceRegistrationLib, they can also publish this
new protocol on the same EFI_HANDLE as RegisterNonDiscoverableMmioDevice.
NonDiscoverablePciDeviceDxe will consume this UniqueId if found and set it to the device's UniqueId.
If not found, will backup to the prior method of assigning the UniqueId via a static counter.
The platform must maintain all UniqueId's assigned are unique for every instance of the protocol.
@eeshanl eeshanl self-assigned this Oct 28, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release/202502@966acaa). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...overablePciDeviceDxe/NonDiscoverablePciDeviceDxe.c 0.00% 12 Missing ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             release/202502    #1547   +/-   ##
=================================================
  Coverage                  ?    1.81%           
=================================================
  Files                     ?      979           
  Lines                     ?   337635           
  Branches                  ?     2830           
=================================================
  Hits                      ?     6113           
  Misses                    ?   331468           
  Partials                  ?       54           
Flag Coverage Δ
MdeModulePkg 1.55% <0.00%> (?)
NetworkPkg 0.55% <ø> (?)
PolicyServicePkg 30.42% <ø> (?)
UefiCpuPkg 4.86% <ø> (?)
UnitTestFrameworkPkg 11.40% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eeshanl eeshanl marked this pull request as ready for review October 28, 2025 00:38
@eeshanl eeshanl requested review from cfernald, kuqin12 and os-d October 28, 2025 00:38
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.

2 participants