From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id DA70A7803CE for ; Fri, 17 May 2024 12:17:15 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Bhu1ldJLinFKGjB+9aPYcH+RijNAUw8oOnX61Qceljs=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1715948234; v=1; b=slbvjLLFmEgLWzEEKJWEsH9lVFk965eBG4VPoSlIyuoOlQzwjj94LfUMDHeFuwa1DJSW7HZo yKysQ9Fc+T9KV8++uy7jjWoGflFCwj93CbU1PN5B5cItp97XRVHNDbbzGpPHP7SvOdrFL/9fAKN BOkmbIx57SlO3qHcX3Fr4Y6F7hLMWmmKuiVhangqhM+tTGtY/+ykMQUM6PGlrw9MI9YZoPJzOmp dSk50nvKxxgl7nDUcX61TMTRe7dzXu3hrHcT7Sosx2OSyfo79Rk0vGk2nPi29nE4T0RYAhFxKlQ ibakOP9ziSxCdcb8cED6nrzOYAb1Oka950W1x/jD69rSw== X-Received: by 127.0.0.2 with SMTP id Zv6mYY7687511xgyJwx8pBL0; Fri, 17 May 2024 05:17:14 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mx.groups.io with SMTP id smtpd.web10.38512.1715948233157433859 for ; Fri, 17 May 2024 05:17:13 -0700 X-CSE-ConnectionGUID: /1ygnNKXRNu00I1htqTjwg== X-CSE-MsgGUID: RlrKE6koSSeb846Cle54+g== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="15950387" X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208,217";a="15950387" X-Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 05:17:13 -0700 X-CSE-ConnectionGUID: aUx7SKXESLawNQG+hekfVg== X-CSE-MsgGUID: Ymhq+OFUSCmq1VoUvhOMuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208,217";a="31790360" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmviesa009.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 May 2024 05:17:12 -0700 X-Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 17 May 2024 05:17:12 -0700 X-Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 17 May 2024 05:17:12 -0700 X-Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.169) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 17 May 2024 05:17:12 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by PH8PR11MB7117.namprd11.prod.outlook.com (2603:10b6:510:217::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28; Fri, 17 May 2024 12:17:10 +0000 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::41a4:c775:32e6:76a8]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::41a4:c775:32e6:76a8%4]) with mapi id 15.20.7587.028; Fri, 17 May 2024 12:17:10 +0000 From: "Ni, Ray" To: "Tan, Dun" , "devel@edk2.groups.io" CC: Liming Gao Subject: Re: [edk2-devel] [PATCH 7/9] MdeModulePkg:Consume gEdkiiVariableRuntimeCacheInfoHobGuid Thread-Topic: [PATCH 7/9] MdeModulePkg:Consume gEdkiiVariableRuntimeCacheInfoHobGuid Thread-Index: AQHaqD+4wfakm1/BA0W6naTE392Kl7GbV0o3 Date: Fri, 17 May 2024 12:17:10 +0000 Message-ID: References: <20240517094917.513-1-dun.tan@intel.com> <20240517094917.513-8-dun.tan@intel.com> In-Reply-To: <20240517094917.513-8-dun.tan@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|PH8PR11MB7117:EE_ x-ms-office365-filtering-correlation-id: c56fab64-d7f1-41a9-1e0e-08dc766b46d3 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-ascii?Q?A0iiEulJ24GzicCnG343iioAiQM0BPSPfl1Ev7rgZev8BCTAKf2ZY/VYmY6j?= =?us-ascii?Q?e6PwQs+JiwCNNN/D9hr3ayMGiqroxmV1zAt/AG3e5E1gVqnvLU7HROGFIwBc?= =?us-ascii?Q?Tk3vkHsbpK3LNJWhP8WxW3A2z5f97PjRcEIEBK1pUmM3VZaLs9bqrIUH7cH5?= =?us-ascii?Q?vjJwZME8AWWz4qRForoJbJfJeKctFtY/qU3FdjMflm6zTAlnmj+k2fLuOenj?= =?us-ascii?Q?wt2NfOf6YMUvqTQCxckdG/wu6ttIroknf7TZvzWDunmZVmkQw0gdT/WpZdFq?= =?us-ascii?Q?HQFe13+/XAVujAQWoXeLNHJ5qQX0uD5A3DMybQLSSrVdzeagLPTPN0rzPgLH?= =?us-ascii?Q?k04DxbcPC3TOTlKH6R9ouksuS00q5GcynC7t0HHHaq1wDf65ERWhmnervvAH?= =?us-ascii?Q?I8EBm6TmyNzzpn44DrM8pzjMFlFOauU7atwf7YEQlp9Yw3ughhD8nWCtDtZZ?= =?us-ascii?Q?r6PF+DhOoiAiA5WInS9ug0hWnCFPjJjyphC47su1wwhxLIAg+6bP/RDxxZtM?= =?us-ascii?Q?tLt4OsJa97Z3fM8QcvFeZoDLy4drMtXmRoZetB3xCbdp/zC3l5ntIlZgjkXs?= =?us-ascii?Q?vP5hK0VGBUBP58DPWBypW8fqp6hrLP5EfKdsdey35/0ch7XxyLiFjYMAyUjn?= =?us-ascii?Q?oPGu4k+KgAjkQqSYOFBqnwKnYnkNH++4dRWPUKNZfSET5dhsi0d1w5mG2FcP?= =?us-ascii?Q?mhnLfldMX00J5uUEhD+1KjkM2/P1uZSAiS0rbe3YvdsHhQ2vje1qDzXYOXC6?= =?us-ascii?Q?9Ma/5OB7t37HSmT5yRo+sfTdDZr5WWj1hpAWd0yZBoRgwfH50IPCWdR4jf3X?= =?us-ascii?Q?+DlmRhewb0+AXc0usSq+ALX7/ExfpHDW2gvN9QBi/409bLvPEmm2DENLwHBp?= =?us-ascii?Q?UPX/0zj4fkV71FUu63hmXhPmayzTitcz4DK32ztaf45hRjQpN3u4ulr+AwxU?= =?us-ascii?Q?972DoOn7Za8qVVV42qmqJ+d6lkokBcTrMW7bDBH07yWZxNiKdNC51uHdr8sr?= =?us-ascii?Q?JSg1VFjN4KLX5AG+BWT2koFWKhnPAvkgY/5w30fCUP72lVjeqitwQZfAOq0h?= =?us-ascii?Q?VnNUP6WIVyXVx0L3QihSoQwNQY3Zea/ZUGBZ7BlwSqGLl6abvnnoG2nH7zn1?= =?us-ascii?Q?FqBIzjrbVuGaiVpb5RGa/tVfZSMJp/wP1U4s0MPHtVJ+CniTfyROgfYxiITz?= =?us-ascii?Q?7ecJhk8qhcO8g9ehXCq6daGH7gV0bW00Ge4H5eqregmlCvclttL6DVpNN4iI?= =?us-ascii?Q?p/fwyaI8vdnti3SEWjcNsCrli8q+LroDN6ZVGs/GxVk9ea+PCPhV4FkGPlsq?= =?us-ascii?Q?CkLBwAcgRvBSMMTHNcDLBlLojd8mEof3+AlOjW9aMN1R8A=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?HXI9RNWMBdhVUu2pc2X7G1fCaV5LKhAYt4Vmfg1KhC2Pfu34HlmJSO5rplaI?= =?us-ascii?Q?LxG8+km7ZlgGu9Xsdf/2V0jFEigbuQqiZmXerlkYcTWfiO3SG/oMyrapeKhJ?= =?us-ascii?Q?6CxaI4jl5LOhMaGZBiGbz+vJXwMfGRJ053AdlHs3rSeW34eqQAqF8WP73rYB?= =?us-ascii?Q?0QtscAxsbWstfqMgdmLJYSX/wFjHyyAzNIWC07RCxgSKf6GRvLk0VGtXXBWC?= =?us-ascii?Q?FtOOwKUUNIzEhI3D9woIDgFkMCFtcpdOVEN0orj0y2oejipCd+wPJDnY9Q98?= =?us-ascii?Q?C9Un13q6qxGFEKyNRGgn0BDnNmrSwrSlxP5dobj9W3cgns6hQ5WKTmBIA5BM?= =?us-ascii?Q?VUaCir9+Na/VO9ghVx2YSy+P/DVG6HxvVfXLKdbTUBy5ax48etmUeKNEDRbY?= =?us-ascii?Q?ixZOScKj1CksSz0iBXeLVMR9XWLCbULMR+nIFJG5neYh8monoqyKLoTYX5zI?= =?us-ascii?Q?dI2Mu9e8cspPpCVPqM8XbjrTlzRekSB46UTA3RLVGK4OxTgAAkWZjaeofrQj?= =?us-ascii?Q?N88AX+n5xPedjF7dGAzK+4aNwxqdHNKg2gfZmp9zkT+fUGG4095AXbYAydwl?= =?us-ascii?Q?qxQBXTCUv3DbOx0tD+DaviagDgWKp2S9cMtgPaQoQ9LkfKcJYRWyGQ0qLCRE?= =?us-ascii?Q?CkqvT7mn6ZbXZAkuZHxsAB0fzo3t6OCaBjDu944WxKpbVvdGXSYm33i8M74B?= =?us-ascii?Q?+7albslTjG/bM05DszdRX93lHWE94N2yWY/Tp9yDrVM5Eb+OXhqdsfpOChWb?= =?us-ascii?Q?m9P7aV0cSaCjIWr+q0spBc1FT064kI6nMY/r3h/gRBeNcHDZ6U7NJDzXefFM?= =?us-ascii?Q?kcCqg1i322zFnFeoU/5qTOTotcv9KAAc8OS48sQH3O0jgcez8CnsrGbHHYrJ?= =?us-ascii?Q?e3Z20YWISZKkUqNVTyeJnr+BrPbbzSgMIVEEXeJKAXRW4AqXAE+4c7DDB+U6?= =?us-ascii?Q?NdaWws0h5AMoQsTitAFyDzBt/BZRQX4gKLW2kIT3PaOtqiOzWynpzp9+y50D?= =?us-ascii?Q?5zKhag88w+8dDStFRyqIGWA6SbETMTNgp8fOFE2FoMW0ep2HkjPmkkr1YXy/?= =?us-ascii?Q?wTyJlYQuHbb2hP0GfJRBoWpqpc9tlafax5fIaf/dk6H2zWG1ZONkxAa1NYwk?= =?us-ascii?Q?WXFRFB/87ljVEfNbxeiJyL1POYyqupmHJKY0/UHfDPP32OKbHihiBnqHn+gF?= =?us-ascii?Q?IWbuOO1lNwlvHYMJkdAl8bnbNuX9IpXzGqBRsk5xIMGlcg6QuHo4PxRJL69U?= =?us-ascii?Q?qOtmUV6hv8PmpmvPZIvRPszJZceUIxq38CcvJmiEwuDTKdf+gZMwxJnaX5IZ?= =?us-ascii?Q?M8a9ZxGP8r8Z9ui7Psah8+jgHkjw0z1HhmTbIBajOZWRHfKzG9Zrsg+aSD3q?= =?us-ascii?Q?THHwFM+qO0Ysn92porVGPfGEEr2h+/Bm0uHPlVK73zrRv2J8THv0ZPd0Oiz5?= =?us-ascii?Q?pUaQe6tQO97gXk5Lh/5l3fgZ7c2ZOy7o8l7aN37IGwunmf2j41cP7Dv/vzu/?= =?us-ascii?Q?26JMMm2G4V5o/4BY0DNiPJ6zetrVhQw121gNwIHrYn7x2T131MB3Q7bkJVdT?= =?us-ascii?Q?aulFxWlVlmXPwczQOLU=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c56fab64-d7f1-41a9-1e0e-08dc766b46d3 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2024 12:17:10.1142 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zCcYcAl7HanIch0YRn4gh+NGvmmxIEqEm9jXq9SDDVN+8OSTLT+TXy3fb+xgwAOWqs6+Fmw5hZfEqdyS3NeBoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB7117 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Fri, 17 May 2024 05:17:13 -0700 Resent-From: ray.ni@intel.com Reply-To: devel@edk2.groups.io,ray.ni@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Orlr2526JWgwFDlwEPsny94ox7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB8244C2E80605CDF7FB5923448CEE2MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=slbvjLLF; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_MN6PR11MB8244C2E80605CDF7FB5923448CEE2MN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Dun, All the 6 new pointers that are accessed at runtime should be converted thr= ough ConvertPointer(). Please ignore my previous Reviewed-by. Thanks, Ray ________________________________ From: Tan, Dun Sent: Friday, May 17, 2024 17:49 To: devel@edk2.groups.io Cc: Ni, Ray ; Liming Gao Subject: [PATCH 7/9] MdeModulePkg:Consume gEdkiiVariableRuntimeCacheInfoHob= Guid Consume gEdkiiVariableRuntimeCacheInfoHobGuid in VariableSmmRuntimeDxe driver to initialize the following variable cache related buffer: *mVariableRuntimeHobCacheBuffer *mVariableRuntimeNvCacheBuffer *mVariableRuntimeVolatileCacheBuffer *mVariableRuntimeCachePendingUpdate *mVariableRuntimeCacheReadLock *mHobFlushComplete The code to to allocate and unblock the buffer for different type cache in VariableSmmRuntimeDxe is also removed in this commit. Signed-off-by: Dun Tan Cc: Ray Ni Cc: Liming Gao Cc: Jiaxin Wu --- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c | 120= +++++++++++++++++++++++++++++++++++++++++++++++++-------------------------= ---------------------------------------------- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf | 5= +++-- 2 files changed, 52 insertions(+), 73 deletions(-) diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeD= xe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c index 8b42ae7d72..68a249c5ac 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c @@ -35,10 +35,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include -#include +#include #include #include +#include #include "PrivilegePolymorphic.h" #include "VariableParsing.h" @@ -56,10 +57,10 @@ VARIABLE_STORE_HEADER *mVariableRuntimeVolati= leCacheBuffer =3D NULL; UINTN mVariableBufferSize; UINTN mVariableRuntimeHobCacheBufferSize; UINTN mVariableBufferPayloadSize; -BOOLEAN mVariableRuntimeCachePendingUpdate; -BOOLEAN mVariableRuntimeCacheReadLock; +BOOLEAN *mVariableRuntimeCachePendingUpdate; +BOOLEAN *mVariableRuntimeCacheReadLock; BOOLEAN mVariableAuthFormat; -BOOLEAN mHobFlushComplete; +BOOLEAN *mHobFlushComplete; EFI_LOCK mVariableServicesLock; EDKII_VARIABLE_LOCK_PROTOCOL mVariableLock; EDKII_VAR_CHECK_PROTOCOL mVarCheck; @@ -180,27 +181,6 @@ InitVariableCache ( *TotalVariableCacheSize =3D ALIGN_VALUE (*TotalVariableCacheSize, sizeof= (UINT32)); - // - // Allocate NV Storage Cache and initialize it to all 1's (like an erase= d FV) - // - *VariableCacheBuffer =3D (VARIABLE_STORE_HEADER *)AllocateRuntimePages = ( - EFI_SIZE_TO_PAGES (*T= otalVariableCacheSize) - ); - if (*VariableCacheBuffer =3D=3D NULL) { - return EFI_OUT_OF_RESOURCES; - } - - // - // Request to unblock the newly allocated cache region to be accessible = from inside MM - // - Status =3D MmUnblockMemoryRequest ( - (EFI_PHYSICAL_ADDRESS)(UINTN)*VariableCacheBuffer, - EFI_SIZE_TO_PAGES (*TotalVariableCacheSize) - ); - if ((Status !=3D EFI_UNSUPPORTED) && EFI_ERROR (Status)) { - return Status; - } - VariableCacheStorePtr =3D *VariableCacheBuffer; SetMem32 ((VOID *)VariableCacheStorePtr, *TotalVariableCacheSize, (UINT3= 2)0xFFFFFFFF); @@ -568,16 +548,16 @@ CheckForRuntimeCacheSync ( VOID ) { - if (mVariableRuntimeCachePendingUpdate) { + if (*mVariableRuntimeCachePendingUpdate) { SyncRuntimeCache (); } - ASSERT (!mVariableRuntimeCachePendingUpdate); + ASSERT (!(*mVariableRuntimeCachePendingUpdate)); // // The HOB variable data may have finished being flushed in the runtime = cache sync update // - if (mHobFlushComplete && (mVariableRuntimeHobCacheBuffer !=3D NULL)) { + if ((*mHobFlushComplete) && (mVariableRuntimeHobCacheBuffer !=3D NULL)) = { if (!EfiAtRuntime ()) { FreePages (mVariableRuntimeHobCacheBuffer, EFI_SIZE_TO_PAGES (mVaria= bleRuntimeHobCacheBufferSize)); } @@ -633,12 +613,12 @@ FindVariableInRuntimeCache ( // a GetVariable () or GetNextVariable () call from being issued until a= prior call has returned. The runtime // cache read lock should always be free when entering this function. // - ASSERT (!mVariableRuntimeCacheReadLock); + ASSERT (!(*mVariableRuntimeCacheReadLock)); - mVariableRuntimeCacheReadLock =3D TRUE; + *mVariableRuntimeCacheReadLock =3D TRUE; CheckForRuntimeCacheSync (); - if (!mVariableRuntimeCachePendingUpdate) { + if (!(*mVariableRuntimeCachePendingUpdate)) { // // 0: Volatile, 1: HOB, 2: Non-Volatile. // The index and attributes mapping must be kept in this order as Find= Variable @@ -698,7 +678,7 @@ Done: } } - mVariableRuntimeCacheReadLock =3D FALSE; + *mVariableRuntimeCacheReadLock =3D FALSE; return Status; } @@ -921,12 +901,12 @@ GetNextVariableNameInRuntimeCache ( // a GetVariable () or GetNextVariable () call from being issued until a= prior call has returned. The runtime // cache read lock should always be free when entering this function. // - ASSERT (!mVariableRuntimeCacheReadLock); + ASSERT (!(*mVariableRuntimeCacheReadLock)); CheckForRuntimeCacheSync (); - mVariableRuntimeCacheReadLock =3D TRUE; - if (!mVariableRuntimeCachePendingUpdate) { + *mVariableRuntimeCacheReadLock =3D TRUE; + if (!(*mVariableRuntimeCachePendingUpdate)) { // // 0: Volatile, 1: HOB, 2: Non-Volatile. // The index and attributes mapping must be kept in this order as Find= Variable @@ -958,7 +938,7 @@ GetNextVariableNameInRuntimeCache ( } } - mVariableRuntimeCacheReadLock =3D FALSE; + *mVariableRuntimeCacheReadLock =3D FALSE; return Status; } @@ -1622,37 +1602,9 @@ SendRuntimeVariableCacheContextToSmm ( SmmRuntimeVarCacheContext->RuntimeHobCache =3D mVariableRuntimeHobC= acheBuffer; SmmRuntimeVarCacheContext->RuntimeVolatileCache =3D mVariableRuntimeVola= tileCacheBuffer; SmmRuntimeVarCacheContext->RuntimeNvCache =3D mVariableRuntimeNvCa= cheBuffer; - SmmRuntimeVarCacheContext->PendingUpdate =3D &mVariableRuntimeCac= hePendingUpdate; - SmmRuntimeVarCacheContext->ReadLock =3D &mVariableRuntimeCac= heReadLock; - SmmRuntimeVarCacheContext->HobFlushComplete =3D &mHobFlushComplete; - - // - // Request to unblock this region to be accessible from inside MM enviro= nment - // These fields "should" be all on the same page, but just to be on the = safe side... - // - Status =3D MmUnblockMemoryRequest ( - (EFI_PHYSICAL_ADDRESS)ALIGN_VALUE ((UINTN)SmmRuntimeVarCacheC= ontext->PendingUpdate - EFI_PAGE_SIZE + 1, EFI_PAGE_SIZE), - EFI_SIZE_TO_PAGES (sizeof (mVariableRuntimeCachePendingUpdate= )) - ); - if ((Status !=3D EFI_UNSUPPORTED) && EFI_ERROR (Status)) { - goto Done; - } - - Status =3D MmUnblockMemoryRequest ( - (EFI_PHYSICAL_ADDRESS)ALIGN_VALUE ((UINTN)SmmRuntimeVarCacheC= ontext->ReadLock - EFI_PAGE_SIZE + 1, EFI_PAGE_SIZE), - EFI_SIZE_TO_PAGES (sizeof (mVariableRuntimeCacheReadLock)) - ); - if ((Status !=3D EFI_UNSUPPORTED) && EFI_ERROR (Status)) { - goto Done; - } - - Status =3D MmUnblockMemoryRequest ( - (EFI_PHYSICAL_ADDRESS)ALIGN_VALUE ((UINTN)SmmRuntimeVarCacheC= ontext->HobFlushComplete - EFI_PAGE_SIZE + 1, EFI_PAGE_SIZE), - EFI_SIZE_TO_PAGES (sizeof (mHobFlushComplete)) - ); - if ((Status !=3D EFI_UNSUPPORTED) && EFI_ERROR (Status)) { - goto Done; - } + SmmRuntimeVarCacheContext->PendingUpdate =3D mVariableRuntimeCach= ePendingUpdate; + SmmRuntimeVarCacheContext->ReadLock =3D mVariableRuntimeCach= eReadLock; + SmmRuntimeVarCacheContext->HobFlushComplete =3D mHobFlushComplete; // // Send data to SMM. @@ -1688,9 +1640,14 @@ SmmVariableReady ( IN VOID *Context ) { - EFI_STATUS Status; - UINTN RuntimeNvCacheSize; - UINTN RuntimeVolatileCacheSize; + EFI_STATUS Status; + UINTN RuntimeNvCacheSize; + UINTN RuntimeVolatileCacheSize; + UINTN AllocatedHobCacheSize; + UINTN AllocatedNvCacheSize; + UINTN AllocatedVolatileCacheSize; + EFI_HOB_GUID_TYPE *GuidHob; + VARIABLE_RUNTIME_CACHE_INFO *VariableRuntimeCacheHob; Status =3D gBS->LocateProtocol (&gEfiSmmVariableProtocolGuid, NULL, (VOI= D **)&mSmmVariable); if (EFI_ERROR (Status)) { @@ -1717,7 +1674,7 @@ SmmVariableReady ( if (FeaturePcdGet (PcdEnableVariableRuntimeCache)) { DEBUG ((DEBUG_INFO, "Variable driver runtime cache is enabled.\n")); // - // Allocate runtime variable cache memory buffers. + // Get needed runtime cache buffer size and check if auth variables ar= e to be used from SMM // Status =3D GetRuntimeCacheInfo ( &mVariableRuntimeHobCacheBufferSize, @@ -1726,6 +1683,27 @@ SmmVariableReady ( &mVariableAuthFormat ); if (!EFI_ERROR (Status)) { + GuidHob =3D GetFirstGuidHob (&gEdkiiVariableRuntimeCacheInfoHobGuid)= ; + ASSERT (GuidHob !=3D NULL); + VariableRuntimeCacheHob =3D GET_GUID_HOB_DATA (GuidHob); + AllocatedHobCacheSize =3D EFI_PAGES_TO_SIZE (VariableRuntimeCac= heHob->RuntimeHobCachePages); + AllocatedNvCacheSize =3D EFI_PAGES_TO_SIZE (VariableRuntimeCac= heHob->RuntimeNvCachePages); + AllocatedVolatileCacheSize =3D EFI_PAGES_TO_SIZE (VariableRuntimeCac= heHob->RuntimeVolatileCachePages); + + ASSERT ( + (AllocatedHobCacheSize >=3D mVariableRuntimeHobCacheBufferSize) && + (AllocatedNvCacheSize >=3D RuntimeNvCacheSize) && + (AllocatedVolatileCacheSize >=3D RuntimeVolatileCacheSize) + ); + + mVariableRuntimeHobCacheBuffer =3D (VARIABLE_STORE_HEADER *)(UI= NTN)VariableRuntimeCacheHob->RuntimeHobCacheBuffer; + mVariableRuntimeNvCacheBuffer =3D (VARIABLE_STORE_HEADER *)(UI= NTN)VariableRuntimeCacheHob->RuntimeNvCacheBuffer; + mVariableRuntimeVolatileCacheBuffer =3D (VARIABLE_STORE_HEADER *)(UI= NTN)VariableRuntimeCacheHob->RuntimeVolatileCacheBuffer; + mVariableRuntimeCachePendingUpdate =3D &VariableRuntimeCacheHob->Ca= cheInfoFlag->PendingUpdate; + mVariableRuntimeCacheReadLock =3D &VariableRuntimeCacheHob->Ca= cheInfoFlag->ReadLock; + mHobFlushComplete =3D &VariableRuntimeCacheHob->Ca= cheInfoFlag->HobFlushComplete; + mVariableRuntimeHobCacheBufferSize =3D AllocatedHobCacheSize; + Status =3D InitVariableCache (&mVariableRuntimeHobCacheBuffer, &mVar= iableRuntimeHobCacheBufferSize); if (!EFI_ERROR (Status)) { Status =3D InitVariableCache (&mVariableRuntimeNvCacheBuffer, &Run= timeNvCacheSize); diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeD= xe.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.i= nf index e1085653fe..2d16f28674 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf @@ -13,7 +13,7 @@ # may not be modified without authorization. If platform fails to protect= these resources, # the authentication service provided in this driver will be broken, and = the behavior is undefined. # -# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2010 - 2024, Intel Corporation. All rights reserved.
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -60,7 +60,7 @@ TpmMeasurementLib SafeIntLib PcdLib - MmUnblockMemoryLib + HobLib [Protocols] gEfiVariableWriteArchProtocolGuid ## PRODUCES @@ -113,6 +113,7 @@ gVarCheckPolicyLibMmiHandlerGuid gEfiEndOfDxeEventGroupGuid gEfiDeviceSignatureDatabaseGuid + gEdkiiVariableRuntimeCacheInfoHobGuid [Depex] gEfiMmCommunication2ProtocolGuid -- 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 (#119047): https://edk2.groups.io/g/devel/message/119047 Mute This Topic: https://groups.io/mt/106150805/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_MN6PR11MB8244C2E80605CDF7FB5923448CEE2MN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Dun,
All the 6 new pointers that are accessed at runtime should be converted thr= ough ConvertPointer().
Please ignore my previous Reviewed-by.

Thanks,
Ray

From: Tan, Dun <dun.tan@= intel.com>
Sent: Friday, May 17, 2024 17:49
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Ni, Ray <ray.ni@intel.com>; Liming Gao <gaoliming@byoso= ft.com.cn>
Subject: [PATCH 7/9] MdeModulePkg:Consume gEdkiiVariableRuntimeCache= InfoHobGuid
 
Consume gEdkiiVariableRuntimeCacheInfoHobGuid in
VariableSmmRuntimeDxe driver to initialize the following

variable cache related buffer:
  *mVariableRuntimeHobCacheBuffer
  *mVariableRuntimeNvCacheBuffer
  *mVariableRuntimeVolatileCacheBuffer
  *mVariableRuntimeCachePendingUpdate
  *mVariableRuntimeCacheReadLock
  *mHobFlushComplete

The code to to allocate
and unblock the buffer for
different type cache in VariableSmmRuntimeDxe is also
removed in this commit.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
---
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c&nb= sp;  | 120 +++++++++++++++++++++++++++++++++++++++++++++++++----------= -------------------------------------------------------------
 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf = |   5 +++--
 2 files changed, 52 insertions(+), 73 deletions(-)

diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeD= xe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c index 8b42ae7d72..68a249c5ac 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c @@ -35,10 +35,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/DebugLib.h>
 #include <Library/UefiLib.h>
 #include <Library/BaseLib.h>
-#include <Library/MmUnblockMemoryLib.h>
+#include <Library/HobLib.h>
 
 #include <Guid/EventGroup.h>
 #include <Guid/SmmVariableCommon.h>
+#include <Guid/VariableRuntimeCacheInfo.h>
 
 #include "PrivilegePolymorphic.h"
 #include "VariableParsing.h"
@@ -56,10 +57,10 @@ VARIABLE_STORE_HEADER     &nbs= p;     *mVariableRuntimeVolatileCacheBuffer =3D NULL;  UINTN          &nbs= p;            &= nbsp;   mVariableBufferSize;
 UINTN          &nbs= p;            &= nbsp;   mVariableRuntimeHobCacheBufferSize;
 UINTN          &nbs= p;            &= nbsp;   mVariableBufferPayloadSize;
-BOOLEAN           &= nbsp;           &nbs= p; mVariableRuntimeCachePendingUpdate;
-BOOLEAN           &= nbsp;           &nbs= p; mVariableRuntimeCacheReadLock;
+BOOLEAN           &= nbsp;           &nbs= p; *mVariableRuntimeCachePendingUpdate;
+BOOLEAN           &= nbsp;           &nbs= p; *mVariableRuntimeCacheReadLock;
 BOOLEAN          &n= bsp;            = ;  mVariableAuthFormat;
-BOOLEAN           &= nbsp;           &nbs= p; mHobFlushComplete;
+BOOLEAN           &= nbsp;           &nbs= p; *mHobFlushComplete;
 EFI_LOCK          &= nbsp;           &nbs= p; mVariableServicesLock;
 EDKII_VARIABLE_LOCK_PROTOCOL    mVariableLock;
 EDKII_VAR_CHECK_PROTOCOL        mV= arCheck;
@@ -180,27 +181,6 @@ InitVariableCache (
 
   *TotalVariableCacheSize =3D ALIGN_VALUE (*TotalVariableCacheSi= ze, sizeof (UINT32));
 
-  //
-  // Allocate NV Storage Cache and initialize it to all 1's (like an = erased FV)
-  //
-  *VariableCacheBuffer =3D  (VARIABLE_STORE_HEADER *)AllocateRun= timePages (
-            &n= bsp;            = ;            &n= bsp;            = ;   EFI_SIZE_TO_PAGES (*TotalVariableCacheSize)
-            &n= bsp;            = ;            &n= bsp;            = ;   );
-  if (*VariableCacheBuffer =3D=3D NULL) {
-    return EFI_OUT_OF_RESOURCES;
-  }
-
-  //
-  // Request to unblock the newly allocated cache region to be access= ible from inside MM
-  //
-  Status =3D MmUnblockMemoryRequest (
-             (= EFI_PHYSICAL_ADDRESS)(UINTN)*VariableCacheBuffer,
-             E= FI_SIZE_TO_PAGES (*TotalVariableCacheSize)
-             )= ;
-  if ((Status !=3D EFI_UNSUPPORTED) && EFI_ERROR (Status)) {<= br> -    return Status;
-  }
-
   VariableCacheStorePtr =3D *VariableCacheBuffer;
   SetMem32 ((VOID *)VariableCacheStorePtr, *TotalVariableCacheSi= ze, (UINT32)0xFFFFFFFF);
 
@@ -568,16 +548,16 @@ CheckForRuntimeCacheSync (
   VOID
   )
 {
-  if (mVariableRuntimeCachePendingUpdate) {
+  if (*mVariableRuntimeCachePendingUpdate) {
     SyncRuntimeCache ();
   }
 
-  ASSERT (!mVariableRuntimeCachePendingUpdate);
+  ASSERT (!(*mVariableRuntimeCachePendingUpdate));
 
   //
   // The HOB variable data may have finished being flushed in th= e runtime cache sync update
   //
-  if (mHobFlushComplete && (mVariableRuntimeHobCacheBuffer != =3D NULL)) {
+  if ((*mHobFlushComplete) && (mVariableRuntimeHobCacheBuffer= !=3D NULL)) {
     if (!EfiAtRuntime ()) {
       FreePages (mVariableRuntimeHobCacheBuf= fer, EFI_SIZE_TO_PAGES (mVariableRuntimeHobCacheBufferSize));
     }
@@ -633,12 +613,12 @@ FindVariableInRuntimeCache (
   // a GetVariable () or GetNextVariable () call from being issu= ed until a prior call has returned. The runtime
   // cache read lock should always be free when entering this fu= nction.
   //
-  ASSERT (!mVariableRuntimeCacheReadLock);
+  ASSERT (!(*mVariableRuntimeCacheReadLock));
 
-  mVariableRuntimeCacheReadLock =3D TRUE;
+  *mVariableRuntimeCacheReadLock =3D TRUE;
   CheckForRuntimeCacheSync ();
 
-  if (!mVariableRuntimeCachePendingUpdate) {
+  if (!(*mVariableRuntimeCachePendingUpdate)) {
     //
     // 0: Volatile, 1: HOB, 2: Non-Volatile.
     // The index and attributes mapping must be kept i= n this order as FindVariable
@@ -698,7 +678,7 @@ Done:
     }
   }
 
-  mVariableRuntimeCacheReadLock =3D FALSE;
+  *mVariableRuntimeCacheReadLock =3D FALSE;
 
   return Status;
 }
@@ -921,12 +901,12 @@ GetNextVariableNameInRuntimeCache (
   // a GetVariable () or GetNextVariable () call from being issu= ed until a prior call has returned. The runtime
   // cache read lock should always be free when entering this fu= nction.
   //
-  ASSERT (!mVariableRuntimeCacheReadLock);
+  ASSERT (!(*mVariableRuntimeCacheReadLock));
 
   CheckForRuntimeCacheSync ();
 
-  mVariableRuntimeCacheReadLock =3D TRUE;
-  if (!mVariableRuntimeCachePendingUpdate) {
+  *mVariableRuntimeCacheReadLock =3D TRUE;
+  if (!(*mVariableRuntimeCachePendingUpdate)) {
     //
     // 0: Volatile, 1: HOB, 2: Non-Volatile.
     // The index and attributes mapping must be kept i= n this order as FindVariable
@@ -958,7 +938,7 @@ GetNextVariableNameInRuntimeCache (
     }
   }
 
-  mVariableRuntimeCacheReadLock =3D FALSE;
+  *mVariableRuntimeCacheReadLock =3D FALSE;
 
   return Status;
 }
@@ -1622,37 +1602,9 @@ SendRuntimeVariableCacheContextToSmm (
   SmmRuntimeVarCacheContext->RuntimeHobCache   = ;   =3D mVariableRuntimeHobCacheBuffer;
   SmmRuntimeVarCacheContext->RuntimeVolatileCache =3D mVariab= leRuntimeVolatileCacheBuffer;
   SmmRuntimeVarCacheContext->RuntimeNvCache   =     =3D mVariableRuntimeNvCacheBuffer;
-  SmmRuntimeVarCacheContext->PendingUpdate    =     =3D &mVariableRuntimeCachePendingUpdate;
-  SmmRuntimeVarCacheContext->ReadLock     = ;        =3D &mVariableRuntimeCacheR= eadLock;
-  SmmRuntimeVarCacheContext->HobFlushComplete   &nb= sp; =3D &mHobFlushComplete;
-
-  //
-  // Request to unblock this region to be accessible from inside MM e= nvironment
-  // These fields "should" be all on the same page, but jus= t to be on the safe side...
-  //
-  Status =3D MmUnblockMemoryRequest (
-             (= EFI_PHYSICAL_ADDRESS)ALIGN_VALUE ((UINTN)SmmRuntimeVarCacheContext->Pend= ingUpdate - EFI_PAGE_SIZE + 1, EFI_PAGE_SIZE),
-             E= FI_SIZE_TO_PAGES (sizeof (mVariableRuntimeCachePendingUpdate))
-             )= ;
-  if ((Status !=3D EFI_UNSUPPORTED) && EFI_ERROR (Status)) {<= br> -    goto Done;
-  }
-
-  Status =3D MmUnblockMemoryRequest (
-             (= EFI_PHYSICAL_ADDRESS)ALIGN_VALUE ((UINTN)SmmRuntimeVarCacheContext->Read= Lock - EFI_PAGE_SIZE + 1, EFI_PAGE_SIZE),
-             E= FI_SIZE_TO_PAGES (sizeof (mVariableRuntimeCacheReadLock))
-             )= ;
-  if ((Status !=3D EFI_UNSUPPORTED) && EFI_ERROR (Status)) {<= br> -    goto Done;
-  }
-
-  Status =3D MmUnblockMemoryRequest (
-             (= EFI_PHYSICAL_ADDRESS)ALIGN_VALUE ((UINTN)SmmRuntimeVarCacheContext->HobF= lushComplete - EFI_PAGE_SIZE + 1, EFI_PAGE_SIZE),
-             E= FI_SIZE_TO_PAGES (sizeof (mHobFlushComplete))
-             )= ;
-  if ((Status !=3D EFI_UNSUPPORTED) && EFI_ERROR (Status)) {<= br> -    goto Done;
-  }
+  SmmRuntimeVarCacheContext->PendingUpdate    =     =3D mVariableRuntimeCachePendingUpdate;
+  SmmRuntimeVarCacheContext->ReadLock     = ;        =3D mVariableRuntimeCacheReadLo= ck;
+  SmmRuntimeVarCacheContext->HobFlushComplete   &nb= sp; =3D mHobFlushComplete;
 
   //
   // Send data to SMM.
@@ -1688,9 +1640,14 @@ SmmVariableReady (
   IN  VOID       *Context
   )
 {
-  EFI_STATUS  Status;
-  UINTN       RuntimeNvCacheSize;
-  UINTN       RuntimeVolatileCacheSize;=
+  EFI_STATUS         &nb= sp;         Status;
+  UINTN          &n= bsp;            = ; RuntimeNvCacheSize;
+  UINTN          &n= bsp;            = ; RuntimeVolatileCacheSize;
+  UINTN          &n= bsp;            = ; AllocatedHobCacheSize;
+  UINTN          &n= bsp;            = ; AllocatedNvCacheSize;
+  UINTN          &n= bsp;            = ; AllocatedVolatileCacheSize;
+  EFI_HOB_GUID_TYPE        &n= bsp;   *GuidHob;
+  VARIABLE_RUNTIME_CACHE_INFO  *VariableRuntimeCacheHob;
 
   Status =3D gBS->LocateProtocol (&gEfiSmmVariableProtoco= lGuid, NULL, (VOID **)&mSmmVariable);
   if (EFI_ERROR (Status)) {
@@ -1717,7 +1674,7 @@ SmmVariableReady (
   if (FeaturePcdGet (PcdEnableVariableRuntimeCache)) {
     DEBUG ((DEBUG_INFO, "Variable driver runtime = cache is enabled.\n"));
     //
-    // Allocate runtime variable cache memory buffers.
+    // Get needed runtime cache buffer size and check if au= th variables are to be used from SMM
     //
     Status =3D  GetRuntimeCacheInfo (
            &nb= sp;    &mVariableRuntimeHobCacheBufferSize,
@@ -1726,6 +1683,27 @@ SmmVariableReady (
            &nb= sp;    &mVariableAuthFormat
            &nb= sp;    );
     if (!EFI_ERROR (Status)) {
+      GuidHob =3D GetFirstGuidHob (&gEdkiiVar= iableRuntimeCacheInfoHobGuid);
+      ASSERT (GuidHob !=3D NULL);
+      VariableRuntimeCacheHob    = =3D GET_GUID_HOB_DATA (GuidHob);
+      AllocatedHobCacheSize   &nbs= p;  =3D EFI_PAGES_TO_SIZE (VariableRuntimeCacheHob->RuntimeHobCache= Pages);
+      AllocatedNvCacheSize    = ;   =3D EFI_PAGES_TO_SIZE (VariableRuntimeCacheHob->RuntimeNvC= achePages);
+      AllocatedVolatileCacheSize =3D EFI_PAGES_TO= _SIZE (VariableRuntimeCacheHob->RuntimeVolatileCachePages);
+
+      ASSERT (
+        (AllocatedHobCacheSize >=3D = mVariableRuntimeHobCacheBufferSize) &&
+        (AllocatedNvCacheSize >=3D R= untimeNvCacheSize) &&
+        (AllocatedVolatileCacheSize >= ;=3D RuntimeVolatileCacheSize)
+        );
+
+      mVariableRuntimeHobCacheBuffer  &= nbsp;   =3D (VARIABLE_STORE_HEADER *)(UINTN)VariableRuntimeCacheH= ob->RuntimeHobCacheBuffer;
+      mVariableRuntimeNvCacheBuffer  &n= bsp;    =3D (VARIABLE_STORE_HEADER *)(UINTN)VariableRuntimeC= acheHob->RuntimeNvCacheBuffer;
+      mVariableRuntimeVolatileCacheBuffer =3D (VA= RIABLE_STORE_HEADER *)(UINTN)VariableRuntimeCacheHob->RuntimeVolatileCac= heBuffer;
+      mVariableRuntimeCachePendingUpdate  = =3D &VariableRuntimeCacheHob->CacheInfoFlag->PendingUpdate;
+      mVariableRuntimeCacheReadLock  &n= bsp;    =3D &VariableRuntimeCacheHob->CacheInfoFlag-&= gt;ReadLock;
+      mHobFlushComplete    &n= bsp;            = ;  =3D &VariableRuntimeCacheHob->CacheInfoFlag->HobFlushComp= lete;
+      mVariableRuntimeHobCacheBufferSize  = =3D AllocatedHobCacheSize;
+
       Status =3D InitVariableCache (&mVa= riableRuntimeHobCacheBuffer, &mVariableRuntimeHobCacheBufferSize);
       if (!EFI_ERROR (Status)) {
         Status =3D InitVariableCac= he (&mVariableRuntimeNvCacheBuffer, &RuntimeNvCacheSize);
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeD= xe.inf b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.i= nf
index e1085653fe..2d16f28674 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf<= br> +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf<= br> @@ -13,7 +13,7 @@
 #  may not be modified without authorization. If platform fails = to protect these resources,
 #  the authentication service provided in this driver will be br= oken, and the behavior is undefined.
 #
-# Copyright (c) 2010 - 2019, Intel Corporation. All rights reserved.<BR= >
+# Copyright (c) 2010 - 2024, Intel Corporation. All rights reserved.<BR= >
 # Copyright (c) Microsoft Corporation.<BR>
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -60,7 +60,7 @@
   TpmMeasurementLib
   SafeIntLib
   PcdLib
-  MmUnblockMemoryLib
+  HobLib
 
 [Protocols]
   gEfiVariableWriteArchProtocolGuid     = ;        ## PRODUCES
@@ -113,6 +113,7 @@
   gVarCheckPolicyLibMmiHandlerGuid
   gEfiEndOfDxeEventGroupGuid
   gEfiDeviceSignatureDatabaseGuid
+  gEdkiiVariableRuntimeCacheInfoHobGuid
 
 [Depex]
   gEfiMmCommunication2ProtocolGuid
--
2.31.1.windows.1

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#119047) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB8244C2E80605CDF7FB5923448CEE2MN6PR11MB8244namp_--