From nobody Sat Apr 20 02:24:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+92161+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+92161+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1659686401; cv=none; d=zohomail.com; s=zohoarc; b=WRLKMxZc1HjbhljHlNwevl2KuIidYrjIHcMvaBbIHsZC95vo3paCozu7UU2Bmrg3fmCk5JBsd26NZ/wMvAUMYLVcfVfYOqnaxgPEAqTGIJWHZpwI7ZFgYl4HvBXNaIfzHsxY0BFOlW/RqtvFlP5GTphLiwqdtZfjH9W0xIpNcC0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659686401; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=xCi9U4U5QNbuKsRgx0PqzKIDV/YNCO3kGPqQw83+AcA=; b=HpsAsHXyo1nE8EhimPsFHyFqCDx1CDp5HfmWeU8DRi0S6oKzAR80qs4wtgvb6hYYAn0qx3zH/lILz4dvHx0yXp4XE3HsXmYP2nKjOtXi4eJC5Jpymi360haVoV4Qnf02wnh+Qm4xPUfEbO0oZ9U5702oSqlw/itvf2BqGEcIrVc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+92161+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1659686400875373.159670139839; Fri, 5 Aug 2022 01:00:00 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id rSkCYY1788612xLkc1zAnjTY; Fri, 05 Aug 2022 01:00:00 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.2737.1659667210224857457 for ; Thu, 04 Aug 2022 19:40:10 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10429"; a="376403443" X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="376403443" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2022 19:40:09 -0700 X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="579332798" X-Received: from shsi505.ccr.corp.intel.com ([10.239.146.206]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2022 19:40:08 -0700 From: First Last To: devel@edk2.groups.io Cc: Yanbo Huang , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-devel] [PATCH] MdePkg/UefiDevicePathLib: reback the DevicePathUtilitiesStandaloneMm Date: Fri, 5 Aug 2022 10:39:54 +0800 Message-Id: <20220805023954.42785-1-first.last@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,first.last@intel.com X-Gm-Message-State: XM7FCbqEYagZvm6UxNjYyafYx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1659686400; bh=20DicWh1Sz2Oe5WXUSGiYFG+ywFbGX3pHdF9vfJsF9c=; h=Cc:Date:From:Reply-To:Subject:To; b=W9hvje8iEH/Luhwh67D4td9Tjm58qyZ32CwOREKLmvu4E0Ez/vl6Uc41d3j5ZcnROIz OnE8juiGGnwOf5rg+e9Qh0RaI0818rkpWTc3daorIpJw9270WEOu6aGkpTSImbABjvblY 65VlbBO9tydyGksROs1mUD+k4OXgC52dY6U= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1659686402043100001 Content-Type: text/plain; charset="utf-8" From: Yanbo Huang reback the DevicePathUtilitiesStandaloneMm to unblock the downstream sync Signed-off-by: Yanbo Huang CC: Michael D Kinney CC: Liming Gao CC: Zhiguang Liu --- .../DevicePathUtilitiesStandaloneMm.c | 39 ++++++++++ .../UefiDevicePathLibStandaloneMm.inf | 75 +++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesSta= ndaloneMm.c create mode 100644 MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibStand= aloneMm.inf diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesStandalone= Mm.c b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesStandaloneMm.c new file mode 100644 index 0000000000..096f835b90 --- /dev/null +++ b/MdePkg/Library/UefiDevicePathLib/DevicePathUtilitiesStandaloneMm.c @@ -0,0 +1,39 @@ +/** @file + Device Path services. The thing to remember is device paths are built ou= t of + nodes. The device path is terminated by an end node that is length + sizeof(EFI_DEVICE_PATH_PROTOCOL). That would be why there is sizeof(EFI_= DEVICE_PATH_PROTOCOL) + all over this file. + + The only place where multi-instance device paths are supported is in + environment varibles. Multi-instance device paths should never be placed + on a Handle. + + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) Microsoft Corporation. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include "UefiDevicePathLib.h" + +/** + Retrieves the device path protocol from a handle. + + This function returns the device path protocol from the handle specified= by Handle. + If Handle is NULL or Handle does not contain a device path protocol, the= n NULL + is returned. + + @param Handle The handle from which to retrieve the= device + path protocol. + + @return The device path protocol from the handle specified by Handle. + +**/ +EFI_DEVICE_PATH_PROTOCOL * +EFIAPI +DevicePathFromHandle ( + IN EFI_HANDLE Handle + ) +{ + return NULL; +} diff --git a/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibStandaloneMm= .inf b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibStandaloneMm.inf new file mode 100644 index 0000000000..23fedf38b7 --- /dev/null +++ b/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibStandaloneMm.inf @@ -0,0 +1,75 @@ +## @file +# Instance of Device Path Library based on Memory Allocation Library. +# +# Device Path Library that layers on top of the Memory Allocation Library. +# +# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) Microsoft Corporation. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D UefiDevicePathLib + MODULE_UNI_FILE =3D UefiDevicePathLib.uni + FILE_GUID =3D D8E58437-44D3-4154-B7A7-EB794923EF12 + MODULE_TYPE =3D MM_STANDALONE + PI_SPECIFICATION_VERSION =3D 0x00010032 + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D DevicePathLib | MM_STANDALONE MM_CORE= _STANDALONE + + +# +# VALID_ARCHITECTURES =3D IA32 X64 EBC +# + +[Sources] + DevicePathUtilities.c + DevicePathUtilitiesStandaloneMm.c + DevicePathToText.c + DevicePathFromText.c + UefiDevicePathLib.c + UefiDevicePathLib.h + +[Packages] + MdePkg/MdePkg.dec + +[LibraryClasses] + BaseLib + MemoryAllocationLib + DebugLib + BaseMemoryLib + PcdLib + PrintLib + +[Guids] + ## SOMETIMES_CONSUMES ## GUID + gEfiVTUTF8Guid + ## SOMETIMES_CONSUMES ## GUID + gEfiVT100Guid + ## SOMETIMES_CONSUMES ## GUID + gEfiVT100PlusGuid + ## SOMETIMES_CONSUMES ## GUID + gEfiPcAnsiGuid + ## SOMETIMES_CONSUMES ## GUID + gEfiUartDevicePathGuid + ## SOMETIMES_CONSUMES ## GUID + gEfiSasDevicePathGuid + ## SOMETIMES_CONSUMES ## GUID + gEfiVirtualDiskGuid + ## SOMETIMES_CONSUMES ## GUID + gEfiVirtualCdGuid + ## SOMETIMES_CONSUMES ## GUID + gEfiPersistentVirtualDiskGuid + ## SOMETIMES_CONSUMES ## GUID + gEfiPersistentVirtualCdGuid + +[Protocols] + gEfiDevicePathProtocolGuid ## SOMETIMES_CONSUMES + gEfiDebugPortProtocolGuid ## UNDEFINED + +[Pcd] + gEfiMdePkgTokenSpaceGuid.PcdMaximumDevicePathNodeCount ## SOMETIMES_C= ONSUMES --=20 2.31.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92161): https://edk2.groups.io/g/devel/message/92161 Mute This Topic: https://groups.io/mt/92829889/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-