From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.92.20.86]) by mx.groups.io with SMTP id smtpd.web11.10109.1614589093017654728 for ; Mon, 01 Mar 2021 00:58:13 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=DWjDMy36; spf=pass (domain: outlook.com, ip: 40.92.20.86, mailfrom: kun.q@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j/+o1DgVr2Frv4AFRUA1lSIPoHnzxK1gu8it+KnJMpk/aCOL9/kc7vy037Cm0NOePojO9uwrlRDezU21waXHhQOfLyQXzp25Zmz36jp8Bu+jlGuzA+DJVQFsDaLquFrBuooNEqxY185kqNO5giQ9CKnlO1XsLvTI/tZCdaFn5iSzGEn6rsOw1TdO2sn6GpC90apMgTUej9FgK+S/hXgoWk5xVPgCcFq1NrExXrFZ++zaM+Ht1FFZL7L/R0olKnwfWYhSUqTt31lhoz/giP5pInLayFAs2t+kkN20c2d9Cyb5CTb1NmYgF+oL8a8NLOq2VGfNIuVA04fJZlefeP4PkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a9L9Al1qOQBxodsxozS8fLztK1QWRiuvTlVEWrVP5+M=; b=UhLuxGz6TWXnGNEW7waah08cBCpPiT5Ga8A1/6c8Xqy5jfeh3HopKko9bzrkADaGjR3rmetlQT1orkCu6qanBKc38IdaWv+7kRb5u9ofcHOBTyK5/z3KVPpLyAfmmxzqQSRHA7Vbc9UXjaMFurQXOwkh8xWPBsp2mJojgyg7yRpxV7vGpwACVXUOsEUeWCbPJue6Zh2HO3vleZ2n/dwBx5RAWyihG8wHZopBEWchNEAt1C9AW/lLu5SxVlKMn8mGO0EsL+lifzyYrqmwD0gyMp1cdxrL4n0BTy0N1hL2c/nm3XXYcOrY3wPMXUGZOoyO0GCTDd8LxLuB2gpH2i6+UQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a9L9Al1qOQBxodsxozS8fLztK1QWRiuvTlVEWrVP5+M=; b=DWjDMy36TTztyACvRHiDNZA5PSLUciJ5F/amjWxPcNW6Gmd+GEZDnRP2cxQ/C+WMpwx8EEeVWPe1Fn9Gz3Ei+W8gk4uyUBPZv7UcfnVk7mVFX00EaWFup8SFE06HR3Br4rnBTCsxSbUtf20ogwEBSid+ovaci/sX8jNSzyd1FXwqFSsZ9OJXsFljZo/1tXxPxOcW++cw/ZN+JC9Y85rrc91OQfHYe+7u84q6oxbDFmBhqkv9KOWyFZfrMy/UoTflHf8JhsDuGtxqeCKEtVlss2vKqb8VqhjTnV6H/AcfXun5GJHW+uX/nzqEQtsAfqfSRMPhpCDBtLi/EjY2whGiGA== Received: from DM6NAM11FT032.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::47) by DM6NAM11HT227.eop-nam11.prod.protection.outlook.com (2a01:111:e400:fc4d::180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19; Mon, 1 Mar 2021 08:58:11 +0000 Received: from MWHPR06MB3102.namprd06.prod.outlook.com (2a01:111:e400:fc4d::47) by DM6NAM11FT032.mail.protection.outlook.com (2a01:111:e400:fc4d::349) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3890.19 via Frontend Transport; Mon, 1 Mar 2021 08:58:11 +0000 Received: from MWHPR06MB3102.namprd06.prod.outlook.com ([fe80::d4ee:1260:6f53:3f7b]) by MWHPR06MB3102.namprd06.prod.outlook.com ([fe80::d4ee:1260:6f53:3f7b%7]) with mapi id 15.20.3890.028; Mon, 1 Mar 2021 08:58:11 +0000 From: "Kun Qin" To: "Wu, Hao A" , "devel@edk2.groups.io" CC: "Kinney, Michael D" , Liming Gao , "Liu, Zhiguang" , "Yao, Jiewen" Subject: Re: [PATCH v3 1/7] MdePkg: MmUnblockMemoryLib: Added definition and null instance Thread-Topic: [PATCH v3 1/7] MdePkg: MmUnblockMemoryLib: Added definition and null instance Thread-Index: AQHXDJITTaEWrD6w1EqhOwHv545grKpuZX2AgABzMSA= Date: Mon, 1 Mar 2021 08:58:11 +0000 Message-ID: References: <20210226225158.1378-1-kun.q@outlook.com> , In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:CD5AA8D23926A518E9563EB393841B678D89600F48D7ED28FC66B1EA118617FE;UpperCasedChecksum:F76D39D3A373D7B1EF969EEC78C77D17F124C9C2631DD215BC4740AF040DE781;SizeAsReceived:7232;Count:44 x-tmn: [P9Jk5zx+KmBIK/X8/FU+u4gdBKLm1BkE] x-ms-publictraffictype: Email x-incomingheadercount: 44 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: b4ab55db-8857-4aaa-908a-08d8dc902422 x-ms-traffictypediagnostic: DM6NAM11HT227: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Y1XeiXrrPmNpFk5wDW1niEjLBBv43jRcqfhF8tQyIN/hKoS30wGXEUW+flF0E0khcS4+FE9O/qNU7Dx+9OIOcNfZwN0tSv52lzzUj1A28bRBHGArkJYCVpzkzWtiFiaRIIIgTxTjpRsSayuYv/B+Z6E8WRnmIziu0rOdTzIIHaP5PAKUwcPiKKZNf3rJcPdSGZvFezR4j8qm+6Ep+uH9+G6lQlt6G1aqULiK67WJzewGOqWaVh27ofuDFBnNj2qyeFLZs4Q0EiKtHg4qyEL6SJW04EtbcEvduRrDxMlEIjlGOqyQMMLqmWq2qUULVMKGf4LxzIrqwRZt0I5qiUc8UZmb+g5fEEFP4gYnr70unov4VUSAuy2z2odajXy6UfWBf5GSiva7DVR0xp1wrfzKYVp2yOFTmkz6BlI59/QRfhc= x-ms-exchange-antispam-messagedata: MkHs8vzLqwE1XMLIl8eCl8QLMZh/MeC2bQz+wWWctAJNDl0LteHAdMCQwTn9Z7/kNIayqlp8UchavCYSdPg9WJHeTcMYmbWzUH5I/+ijXNOuRXXD5qhDjuNCoPSEgvG3AD/h+DmARqrJyKoWYWMaHQ== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT032.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: b4ab55db-8857-4aaa-908a-08d8dc902422 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2021 08:58:11.1831 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM11HT227 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MWHPR06MB3102E5E79BDAF461894CEB37F39A9MWHPR06MB3102namp_" --_000_MWHPR06MB3102E5E79BDAF461894CEB37F39A9MWHPR06MB3102namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Hao, Thanks for the reminder. I will add UNI file for this library in v4. Regards, Kun From: Wu, Hao A Sent: Sunday, February 28, 2021 18:05 To: Kun Qin; devel@edk2.groups.io Cc: Kinney, Michael D; Liming Gao; Liu, Zhiguang; Y= ao, Jiewen Subject: RE: [PATCH v3 1/7] MdePkg: MmUnblockMemoryLib: Added definition an= d null instance > -----Original Message----- > From: Kun Qin > Sent: Saturday, February 27, 2021 6:52 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Liming Gao > ; Liu, Zhiguang ; Wu, > Hao A ; Yao, Jiewen > Subject: [PATCH v3 1/7] MdePkg: MmUnblockMemoryLib: Added definition > and null instance > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3168 > > This interface definition provides an abstraction layer for applicable dr= ivers to > request certain memory blocks to be mapped/unblocked for accessibility > inside MM environment. > > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Hao A Wu > Cc: Jiewen Yao > > Signed-off-by: Kun Qin > --- > > Notes: > v3: > - Move interface to MdePkg [Hao, Liming, Jiewen] > - Remove Dxe prefix [Jiewen] > > v2: > - Resend with practical usage. No change [Hao] > > MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c | 40 > ++++++++++++++++++++ > MdePkg/Include/Library/MmUnblockMemoryLib.h | 40 > ++++++++++++++++++++ > MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf | > 29 ++++++++++++++ Hello Kun, Could you help to add a UNI file for this library instance? Best Regards, Hao Wu > MdePkg/MdePkg.dec | 5 +++ > MdePkg/MdePkg.dsc | 1 + > 5 files changed, 115 insertions(+) > > diff --git > a/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c > b/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c > new file mode 100644 > index 000000000000..ed9a45587b64 > --- /dev/null > +++ > b/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c > @@ -0,0 +1,40 @@ > +/** @file > + Null instance of MM Unblock Page Library. > + > + This library provides an abstraction layer of requesting certain page > + access to be unblocked by MM environment if applicable. > + > + Copyright (c) Microsoft Corporation. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#include > + > +/** > + This API provides a way to unblock certain data pages to be accessible > inside MM environment. > + > + @param UnblockAddress The address of buffer caller requests = to > unblock, the address > + has to be page aligned. > + @param NumberOfPages The number of pages requested to be > unblocked from MM > + environment. > + > + @return EFI_SUCCESS The request goes through successfully. > + @return EFI_NOT_AVAILABLE_YET The requested functionality is not > produced yet. > + @return EFI_UNSUPPORTED The requested functionality is not > supported on current platform. > + @return EFI_SECURITY_VIOLATION The requested address failed to pass > security check for > + unblocking. > + @return EFI_INVALID_PARAMETER Input address either NULL pointer or > not page aligned. > + @return EFI_ACCESS_DENIED The request is rejected due to system > has passed certain boot > + phase. > + > +**/ > +EFI_STATUS > +EFIAPI > +MmUnblockMemoryRequest ( > + IN EFI_PHYSICAL_ADDRESS UnblockAddress, > + IN UINT64 NumberOfPages > + ) > +{ > + return EFI_UNSUPPORTED; > +} > diff --git a/MdePkg/Include/Library/MmUnblockMemoryLib.h > b/MdePkg/Include/Library/MmUnblockMemoryLib.h > new file mode 100644 > index 000000000000..adff8ddc8063 > --- /dev/null > +++ b/MdePkg/Include/Library/MmUnblockMemoryLib.h > @@ -0,0 +1,40 @@ > +/** @file > + MM Unblock Memory Library Interface. > + > + This library provides an abstraction layer of requesting certain page > + access to be unblocked by MM environment if applicable. > + > + Copyright (c) Microsoft Corporation. > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef MM_UNBLOCK_MEMORY_LIB_H_ > +#define MM_UNBLOCK_MEMORY_LIB_H_ > + > +/** > + This API provides a way to unblock certain data pages to be accessible > inside MM environment. > + > + @param UnblockAddress The address of buffer caller requests = to > unblock, the address > + has to be page aligned. > + @param NumberOfPages The number of pages requested to be > unblocked from MM > + environment. > + > + @return EFI_SUCCESS The request goes through successfully. > + @return EFI_NOT_AVAILABLE_YET The requested functionality is not > produced yet. > + @return EFI_UNSUPPORTED The requested functionality is not > supported on current platform. > + @return EFI_SECURITY_VIOLATION The requested address failed to pass > security check for > + unblocking. > + @return EFI_INVALID_PARAMETER Input address either NULL pointer or > not page aligned. > + @return EFI_ACCESS_DENIED The request is rejected due to system > has passed certain boot > + phase. > + > +**/ > +EFI_STATUS > +EFIAPI > +MmUnblockMemoryRequest ( > + IN EFI_PHYSICAL_ADDRESS UnblockAddress, > + IN UINT64 NumberOfPages > +); > + > +#endif // MM_UNBLOCK_MEMORY_LIB_H_ > diff --git > a/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf > b/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf > new file mode 100644 > index 000000000000..4c1f3d1c8e87 > --- /dev/null > +++ > b/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf > @@ -0,0 +1,29 @@ > +## @file > +# Null instance of MM Unblock Page Library. > +# > +# This library provides an abstraction layer of requesting certain > +page access to be unblocked # by MM environment if applicable. > +# > +# Copyright (c) Microsoft Corporation. > +# SPDX-License-Identifier: BSD-2-Clause-Patent # # ## > + > +[Defines] > + INF_VERSION =3D 0x0001001B > + BASE_NAME =3D MmUnblockMemoryLibNull > + FILE_GUID =3D 9E890F68-5C95-4C31-95DD-59E6286F85E= A > + MODULE_TYPE =3D BASE > + VERSION_STRING =3D 1.0 > + LIBRARY_CLASS =3D MmUnblockMemoryLib > + > +# > +# VALID_ARCHITECTURES =3D IA32 X64 > +# > + > +[Sources] > + MmUnblockMemoryLibNull.c > + > +[Packages] > + MdePkg/MdePkg.dec > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index > 3928db65d188..32a9e009c813 100644 > --- a/MdePkg/MdePkg.dec > +++ b/MdePkg/MdePkg.dec > @@ -257,6 +257,11 @@ [LibraryClasses] > # > UnitTestHostBaseLib|Test/UnitTest/Include/Library/UnitTestHostBaseLib.= h > > + ## @libraryclass This library provides an interface for DXE drivers = to > request MM environment > + # to map/unblock a memory region for accessibility inside MM. > + # > + MmUnblockMemoryLib|Include/Library/MmUnblockMemoryLib.h > + > [LibraryClasses.IA32, LibraryClasses.X64] > ## @libraryclass Abstracts both S/W SMI generation and detection. > ## > diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index > ce009086815f..79629e3f93ba 100644 > --- a/MdePkg/MdePkg.dsc > +++ b/MdePkg/MdePkg.dsc > @@ -168,6 +168,7 @@ [Components.IA32, Components.X64] > MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf > MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerProfileLibNull.inf > MdePkg/Library/MmServicesTableLib/MmServicesTableLib.inf > + MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf > > [Components.EBC] > MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf > -- > 2.30.0.windows.1 --_000_MWHPR06MB3102E5E79BDAF461894CEB37F39A9MWHPR06MB3102namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Hao,

 

Thanks for the reminder. I will add UNI file for thi= s library in v4.

 

Regards,

Kun

 

From: Wu, Hao A
Sent: Sunday, February 28, 2021 18:05
To: Kun Qin; devel@edk2.groups.io
Cc: Kinney, Michael D<= /a>; Liming Gao; Liu, Zhiguang= ; Yao, Jiewen
Subject: RE: [PATCH v3 1/7] MdePkg: MmUnblockMemoryLib: Added defini= tion and null instance

 

> -----Original Me= ssage-----
> From: Kun Qin <kun.q@outlook.com>
> Sent: Saturday, February 27, 2021 6:52 AM
> To: devel@edk2.groups.io
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Liming Gao > <gaoliming@byosoft.com.cn>; Liu, Zhiguang <zhiguang.liu@intel= .com>; Wu,
> Hao A <hao.a.wu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com= >
> Subject: [PATCH v3 1/7] MdePkg: MmUnblockMemoryLib: Added definition > and null instance
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3168
>
> This interface definition provides an abstraction layer for applicable= drivers to
> request certain memory blocks to be mapped/unblocked for accessibility=
> inside MM environment.
>
> Cc: Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
>
> Signed-off-by: Kun Qin <kun.q@outlook.com>
> ---
>
> Notes:
>     v3:
>     - Move interface to MdePkg [Hao, Liming, Jiewe= n]
>     - Remove Dxe prefix [Jiewen]
>
>     v2:
>     - Resend with practical usage. No change [Hao]=
>
>  MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c =   | 40
> ++++++++++++++++++++
>  MdePkg/Include/Library/MmUnblockMemoryLib.h   &nb= sp;            =   | 40
> ++++++++++++++++++++
>  MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf | > 29 ++++++++++++++


Hello Kun,

Could you help to add a UNI file for this library instance?

Best Regards,
Hao Wu


>  MdePkg/MdePkg.dec        = ;            &n= bsp;            = ;           |  5 +++=
>  MdePkg/MdePkg.dsc        = ;            &n= bsp;            = ;           |  1 + >  5 files changed, 115 insertions(+)
>
> diff --git
> a/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c
> b/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c
> new file mode 100644
> index 000000000000..ed9a45587b64
> --- /dev/null
> +++
> b/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.c
> @@ -0,0 +1,40 @@
> +/** @file
> +  Null instance of MM Unblock Page Library.
> +
> +  This library provides an abstraction layer of requesting certa= in page
> + access to be unblocked  by MM environment if applicable.
> +
> +  Copyright (c) Microsoft Corporation.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include <Uefi.h>
> +
> +/**
> +  This API provides a way to unblock certain data pages to be ac= cessible
> inside MM environment.
> +
> +  @param  UnblockAddress      = ;    The address of buffer caller requests to
> unblock, the address
> +           &nb= sp;            =           has to be page align= ed.
> +  @param  NumberOfPages      =      The number of pages requested to be
> unblocked from MM
> +           &nb= sp;            =           environment.
> +
> +  @return EFI_SUCCESS       &= nbsp;     The request goes through successfully.
> +  @return EFI_NOT_AVAILABLE_YET   The requested functi= onality is not
> produced yet.
> +  @return EFI_UNSUPPORTED      &nb= sp;  The requested functionality is not
> supported on current platform.
> +  @return EFI_SECURITY_VIOLATION  The requested address fai= led to pass
> security check for
> +           &nb= sp;            =           unblocking.
> +  @return EFI_INVALID_PARAMETER   Input address either= NULL pointer or
> not page aligned.
> +  @return EFI_ACCESS_DENIED       = The request is rejected due to system
> has passed certain boot
> +           &nb= sp;            =           phase.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +MmUnblockMemoryRequest (
> +  IN EFI_PHYSICAL_ADDRESS   UnblockAddress,
> +  IN UINT64         = ;        NumberOfPages
> +  )
> +{
> +  return EFI_UNSUPPORTED;
> +}
> diff --git a/MdePkg/Include/Library/MmUnblockMemoryLib.h
> b/MdePkg/Include/Library/MmUnblockMemoryLib.h
> new file mode 100644
> index 000000000000..adff8ddc8063
> --- /dev/null
> +++ b/MdePkg/Include/Library/MmUnblockMemoryLib.h
> @@ -0,0 +1,40 @@
> +/** @file
> +  MM Unblock Memory Library Interface.
> +
> +  This library provides an abstraction layer of requesting certa= in page
> + access to be unblocked  by MM environment if applicable.
> +
> +  Copyright (c) Microsoft Corporation.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef MM_UNBLOCK_MEMORY_LIB_H_
> +#define MM_UNBLOCK_MEMORY_LIB_H_
> +
> +/**
> +  This API provides a way to unblock certain data pages to be ac= cessible
> inside MM environment.
> +
> +  @param  UnblockAddress      = ;    The address of buffer caller requests to
> unblock, the address
> +           &nb= sp;            =           has to be page align= ed.
> +  @param  NumberOfPages      =      The number of pages requested to be
> unblocked from MM
> +           &nb= sp;            =           environment.
> +
> +  @return EFI_SUCCESS       &= nbsp;     The request goes through successfully.
> +  @return EFI_NOT_AVAILABLE_YET   The requested functi= onality is not
> produced yet.
> +  @return EFI_UNSUPPORTED      &nb= sp;  The requested functionality is not
> supported on current platform.
> +  @return EFI_SECURITY_VIOLATION  The requested address fai= led to pass
> security check for
> +           &nb= sp;            =           unblocking.
> +  @return EFI_INVALID_PARAMETER   Input address either= NULL pointer or
> not page aligned.
> +  @return EFI_ACCESS_DENIED       = The request is rejected due to system
> has passed certain boot
> +           &nb= sp;            =           phase.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +MmUnblockMemoryRequest (
> +  IN EFI_PHYSICAL_ADDRESS   UnblockAddress,
> +  IN UINT64         = ;        NumberOfPages
> +);
> +
> +#endif // MM_UNBLOCK_MEMORY_LIB_H_
> diff --git
> a/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
> b/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
> new file mode 100644
> index 000000000000..4c1f3d1c8e87
> --- /dev/null
> +++
> b/MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf
> @@ -0,0 +1,29 @@
> +## @file
> +#  Null instance of MM Unblock Page Library.
> +#
> +#  This library provides an abstraction layer of requesting cert= ain
> +page access to be unblocked #  by MM environment if applicable.<= br> > +#
> +#  Copyright (c) Microsoft Corporation.
> +#  SPDX-License-Identifier: BSD-2-Clause-Patent # # ##
> +
> +[Defines]
> +  INF_VERSION        &nb= sp;           =3D 0x00010= 01B
> +  BASE_NAME         = ;             = =3D MmUnblockMemoryLibNull
> +  FILE_GUID         = ;             = =3D 9E890F68-5C95-4C31-95DD-59E6286F85EA
> +  MODULE_TYPE        &nb= sp;           =3D BASE > +  VERSION_STRING        =          =3D 1.0
> +  LIBRARY_CLASS        &= nbsp;         =3D MmUnblockMemoryLi= b
> +
> +#
> +#  VALID_ARCHITECTURES       =     =3D IA32 X64
> +#
> +
> +[Sources]
> +  MmUnblockMemoryLibNull.c
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index
> 3928db65d188..32a9e009c813 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -257,6 +257,11 @@ [LibraryClasses]
>    #
>    UnitTestHostBaseLib|Test/UnitTest/Include/Library/Un= itTestHostBaseLib.h
>
> +  ##  @libraryclass  This library provides an interfac= e for DXE drivers to
> request MM environment
> +  #   to map/unblock a memory region for accessibility= inside MM.
> +  #
> +  MmUnblockMemoryLib|Include/Library/MmUnblockMemoryLib.h
> +
>  [LibraryClasses.IA32, LibraryClasses.X64]
>    ##  @libraryclass  Abstracts both S/W SMI = generation and detection.
>    ##
> diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc index
> ce009086815f..79629e3f93ba 100644
> --- a/MdePkg/MdePkg.dsc
> +++ b/MdePkg/MdePkg.dsc
> @@ -168,6 +168,7 @@ [Components.IA32, Components.X64]
>    MdePkg/Library/SmmPciExpressLib/SmmPciExpressLib.inf=
>    MdePkg/Library/SmiHandlerProfileLibNull/SmiHandlerPr= ofileLibNull.inf
>    MdePkg/Library/MmServicesTableLib/MmServicesTableLib= .inf
> +  MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibNull.inf >
>  [Components.EBC]
>    MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic= .inf
> --
> 2.30.0.windows.1

 

--_000_MWHPR06MB3102E5E79BDAF461894CEB37F39A9MWHPR06MB3102namp_--