From nobody Sat Apr 20 04:53:50 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+92138+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+92138+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1659667341; cv=none; d=zohomail.com; s=zohoarc; b=OCxwYEtIaB+t+RjNmDOhBf3UXlyxyjzWm5OCKbImLUkhepN7lq2kZdTXi5cT8EhXfviUk/GflNVDBaWu+21sS/Q7eb1Q2WVtPZA/smPKuqdpwMTYq+G3MkkcftWbXNjUdjpEFQJdFpHNoS6rvCo/9en0D1b3AyimQ69KgWhe++g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659667341; 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=BQMn2iu7bvze8kHCKfew68UqUmErAK0K9Q3kFbCye6k=; b=Ziq2Q//tm4x3JhuTorRpp1cfo7pmO/jtbxZdObCjXgOvT3m2w70+fRr3YPgUEko6gGQ3PddJbNzd63M6HQ6LwDoR3BRlL5qvomMP1pSfjZapur7s1GGDVlMYauijnETDJimUnR0CyJ6DSSyyHOX0aI7zq6zCzeQeGm4E4PzN+GY= 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+92138+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 1659667341442191.1904851890498; Thu, 4 Aug 2022 19:42:21 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id TIJ4YY1788612xV1frRbJBM5; Thu, 04 Aug 2022 19:42:21 -0700 X-Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web08.2664.1659667340100306694 for ; Thu, 04 Aug 2022 19:42:20 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10429"; a="269878121" X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="269878121" X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2022 19:42:19 -0700 X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="579333290" 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:42:17 -0700 From: "Huang, Yanbo" 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:42:05 +0800 Message-Id: <20220805024205.42844-1-yanbo.huang@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,yanbo.huang@intel.com X-Gm-Message-State: 89V9B0Rb19wUjybFdPD4pdvnx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1659667341; bh=bMYYkVfTZ2BpFRCDOqAiQ/ZxL87pU9MO/aOGcyHWzOU=; h=Cc:Date:From:Reply-To:Subject:To; b=cXrs0+q8b1KtTIX+/jd2qOGb/1nFzi5i1kbHM8fw8etHwy9DOGTLv/U3Weftw9NlCvf 8w+iAQawluZOjfAIhexJ0rHIk6gftB+MObzcmLhtlEqJKblwGroLH2aPh7bjM8xWsphAq 37K8vZD3bpSi9bmLEll62XPBjjwgjojLZdM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1659667343374100003 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 (#92138): https://edk2.groups.io/g/devel/message/92138 Mute This Topic: https://groups.io/mt/92828228/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-