From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web08.6088.1641903257983334260 for ; Tue, 11 Jan 2022 04:14:18 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=fpo7Rttw; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: mateusz.albecki@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641903257; x=1673439257; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=1gdsMVEpEHdXGdTBGNWcerseSgNavCbuWN//aiOW6Ys=; b=fpo7RttwIfOo1aGLBgiONcoAmVTQmJdctkzPFl99a58TorIL2q38HnAf ReUfbmlXQEEwACX7hGkt3SrbcLCG3QyYg0i/sC8w525Anqzq579H47REa qED9B2Xx0NOU4WFXuP6OBQ1cMK5P0GQm2DQEE7qd5vxmO6bMS7riDp7iN JmHggyUx/QOggOfLyHPhMZ8lu++PO+AUX06pSd+B4gKc+iCYdQDbB3frh bCRgBHtzS1JYtXPAC9VrJscS7cEIc97499jwtfVl9lo/U3bM0OiKOju3z Dicn9ffme5kJjyBvME2yAqx//fqmgj8xgyvwdMENPJzUZmNn0pdwh4TNv Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10223"; a="243669805" X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="243669805" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 04:14:13 -0800 X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="515074305" Received: from malbecki-mobl.ger.corp.intel.com ([10.249.154.106]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 04:14:10 -0800 From: "Albecki, Mateusz" To: devel@edk2.groups.io Cc: Mateusz Albecki , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [PATCH 0/1] MdePkg/UefiDevicePathLib: Add support for PEIMs Date: Tue, 11 Jan 2022 13:13:57 +0100 Message-Id: <20220111121358.2629-1-mateusz.albecki@intel.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This patch adds support for PEIMs in UefiDevicePathLib. Although this libra= ry 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 o= f the infs. This can be avoided at the cost of a dedicated inf file just for PEI or by keeping the name UefiDevicePathLibS= tandaloneMm without adding Pei phase indication. 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 g= et the root bridge information along with the correct root bridge device path. 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= =3D,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,86658203,previd=3D1640220793= 375011242,nextid=3D1626916856753718458&previd=3D1640220793375011242&nextid= =3D1626916856753718458 Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Mateusz Albecki (1): MdePkg/UefiDevicePathLib: Add support for PEIMs .../DevicePathUtilitiesPei.c | 40 +++++++++++++++++++ ...c =3D> DevicePathUtilitiesPeiStandaloneMm.c} | 0 .../UefiDevicePathLib/UefiDevicePathLib.inf | 2 +- ...f =3D> UefiDevicePathLibPeiStandaloneMm.inf} | 4 +- MdePkg/MdePkg.dsc | 2 +- 5 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesPei= .c rename MdePkg/Library/UefiDevicePathLib/{DevicePathUtilitiesStandaloneMm.c= =3D> DevicePathUtilitiesPeiStandaloneMm.c} (100%) rename MdePkg/Library/UefiDevicePathLib/{UefiDevicePathLibStandaloneMm.inf= =3D> UefiDevicePathLibPeiStandaloneMm.inf} (93%) -- = 2.28.0.windows.1 --------------------------------------------------------------------- Intel Technology Poland sp. z o.o. ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydz= ial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-31= 6 | 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 wi= adomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiek= olwiek przegladanie lub rozpowszechnianie jest zabronione. This e-mail and any attachments may contain confidential material for the s= ole use of the intended recipient(s). If you are not the intended recipient= , please contact the sender and delete all copies; any review or distributi= on by others is strictly prohibited.