This patch adds support for PEIMs in UefiDevicePathLib. Although this library 
and DEVICE_PATH_PROTOCOL
itself was initially intended for DXE the use case of unlocking opal-locked 
storage devices during S3
resume makes it useful in PEI.

As it is the change will break the users who will need to change the name of 
the infs. This can be avoided at the cost of
a dedicated inf file just for PEI or by keeping the name 
UefiDevicePathLibStandaloneMm without adding Pei phase indication.

This change is a preparation for a more robust support for PCIe enumeration in 
PEI. More details on DevicePath use cases in PEI can
be found in this discussion:
https://edk2.groups.io/g/rfc/topic/proposal_to_add_support_for/86658203?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,86658203,previd=1640220793375011242,nextid=1626916856753718458&previd=1640220793375011242&nextid=1626916856753718458

Tests:
- Change has been tested by building a PEI PciHostBridgeLib instance which uses 
AppendDevicePathNode function. That PciHostBridgeLib was
  then used in PEIM that enumerates PCI devices and that PEIM was able to get 
the root bridge information along with the correct root
  bridge device path.

Changes in v2:
- Reverted file name changes, PEIM is added to UefiDevicePathLibStandaloneMm.inf

Change in v3:
- Converted UefiDevicePathLibStandaloneMm.inf to UefiDevicePathLibBase.inf Base 
lib can be used in every environment but
  but some functionalities in FileDevicePath will not work due to lack of 
access to EFI_HANDLE in SEC/PEI/SMM.

Cc: Michael D Kinney <michael.d.kin...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang....@intel.com>

Mateusz Albecki (1):
  MdePkg/UefiDevicePathLib: Add support for PEIMs

 MdePkg/Library/UefiDevicePathLib/DevicePathUtilities.c      | 6 ++++++
 ...athUtilitiesStandaloneMm.c => DevicePathUtilitiesBase.c} | 0
 ...icePathLibStandaloneMm.inf => UefiDevicePathLibBase.inf} | 6 +++---
 MdePkg/MdePkg.dsc                                           | 2 +-
 4 files changed, 10 insertions(+), 4 deletions(-)
 rename MdePkg/Library/UefiDevicePathLib/{DevicePathUtilitiesStandaloneMm.c => 
DevicePathUtilitiesBase.c} (100%)
 rename MdePkg/Library/UefiDevicePathLib/{UefiDevicePathLibStandaloneMm.inf => 
UefiDevicePathLibBase.inf} (87%)

-- 
2.28.0.windows.1

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial 
Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | 
Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i 
moze zawierac informacje poufne. W razie przypadkowego otrzymania tej 
wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; 
jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole 
use of the intended recipient(s). If you are not the intended recipient, please 
contact the sender and delete all copies; any review or distribution by others 
is strictly prohibited.



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#90983): https://edk2.groups.io/g/devel/message/90983
Mute This Topic: https://groups.io/mt/92110120/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to