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 E5373D81195 for ; Fri, 17 May 2024 12:09:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=vfnm8fyHQxYBIQD7rM6KfZlA3CwZiaW8gm15kA3+xhc=; 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=1715947785; v=1; b=xnnW11+uPTH6dQlVhpPQnCvk1yW4zBwuBg8q0bXuogBB1hrJFf3hwvyf+y62mcv35lGVTGQL MQAwFnxMub9Ysuy3wjKUxcDnrHiaTJOj5PvTuLzAD5o4Pc1ie7Cp6M8LvJdu+JNdHiIL3/IaIqM kMAd7cLkhFibtHnISg4v6P4fDGCwq++qN5bank1lMNVcgtpymvo3dE6JuSh3z4SvZvRE3DS5+qs n9sYkNbZLOPBzutb0y+EqWudPpAgf/MZB2x37qSD9B7siNo+M4A+IPN+B4dnA9/fnwLS9SPsVLh Gp1pYLnkF7Xm2z3BYbpTBmbu5kTyF1AZKiKTDBlWc7TEw== X-Received: by 127.0.0.2 with SMTP id AzFiYY7687511xBeBJBhZH8z; Fri, 17 May 2024 05:09:45 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mx.groups.io with SMTP id smtpd.web11.39014.1715947784171829445 for ; Fri, 17 May 2024 05:09:44 -0700 X-CSE-ConnectionGUID: XjnqCZiFSbO1akwlS/ukAg== X-CSE-MsgGUID: qI5jMzmkQdmA6ZYiOOgKBw== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="12062425" X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208,217";a="12062425" X-Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 05:09:44 -0700 X-CSE-ConnectionGUID: De4AsoFNRMmxb+DKp42YcA== X-CSE-MsgGUID: MMSRCHKZQO6rQEHuNmlvOQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208,217";a="31706528" X-Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 17 May 2024 05:09:43 -0700 X-Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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:09:43 -0700 X-Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) 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; Fri, 17 May 2024 05:09:42 -0700 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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:09:42 -0700 X-Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) by edgegateway.intel.com (192.55.55.68) 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:09:42 -0700 X-Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by SA0PR11MB4655.namprd11.prod.outlook.com (2603:10b6:806:9d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.30; Fri, 17 May 2024 12:09:40 +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:09:40 +0000 From: "Ni, Ray" To: "Tan, Dun" , "devel@edk2.groups.io" CC: Liming Gao , Kun Qin , Sean Brogan Subject: Re: [edk2-devel] [PATCH 7/9] MdeModulePkg:Consume gEdkiiVariableRuntimeCacheInfoHobGuid Thread-Topic: [PATCH 7/9] MdeModulePkg:Consume gEdkiiVariableRuntimeCacheInfoHobGuid Thread-Index: AQHaqD+4wfakm1/BA0W6naTE392Kl7GbVWhM Date: Fri, 17 May 2024 12:09:40 +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_|SA0PR11MB4655:EE_ x-ms-office365-filtering-correlation-id: 819442ed-18fc-4367-17a5-08dc766a3aea x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-ascii?Q?h/BSR+yOG2mhY1P71mF0QpQBug/psTqoVWgA9n/w8dAhO+0sNHeEfwotlkCz?= =?us-ascii?Q?7t6sKH/BGhYn8N8mPNzjCepRgkv3VkvjZpO5QXhqGuJfEVbuxzvKzIHR/5B6?= =?us-ascii?Q?6iuTlcuASbsIR95E1Om9YHEMIAcb3WIVEsZ/8RK0REYIUSd5DuY9sgg7FC3/?= =?us-ascii?Q?9W9sejv/LsZ0l+hM0/rCP0eI+tOWEC3C6DupPDOjKwaR2rIEmDPHI4AgbAHV?= =?us-ascii?Q?ybIQPCqGHb/jvLDnqmphwzQEdxFf8Ul/iFlysTwZpLQ/wIOufBGMcgnRaO36?= =?us-ascii?Q?ic9rChl0a+QYgID/qJ0AuSPv2ikAsVWoTg5lv+JFx/qs2IYEZmEC4JQf1Kz5?= =?us-ascii?Q?y4SBbu5Lay7AprtkGtYrRMAywHI2ul+aXzbmyDURYat/FGm1FhSPcaUlb1bW?= =?us-ascii?Q?Ol+ELKmSCYwjVEFWGBFsitKd0nqsIJz7wS0VCWymES/l4kJHpGaNBxpe4vc7?= =?us-ascii?Q?GgwR0NWB3GMkcFOfT4qgT9tbGICNN2AzL+QSwzWzm54RR9S1f9eBfYFNDZ8S?= =?us-ascii?Q?ThA/CCQ5rBS8lMaxZqid+1o8zeVOwn5QgSQ68zAdyKhdhXUYZ2OZBNpCri9z?= =?us-ascii?Q?RL6WMQrYXWl+EEENtNTfL+hTwy/0zg2QznkeKSRW/ZuQU9/a+kOsWVVQBI50?= =?us-ascii?Q?fCFKKC2orAkY4ALLTmAym0YixsBbP+/c+N4Yp+1UU3fECWcT4lWkvDHf7Jyx?= =?us-ascii?Q?nJB5myOLw1O/FcM1KlnkX56JN1PHGx4M2mStqq9JUOVMv9Bdk5Ir5MAcaae3?= =?us-ascii?Q?F3q2A/TXZtDAGQQCSBZy+kpmjbh1ezGEzgPD9IM5KJaEtm5zSacKx2IFViWP?= =?us-ascii?Q?hJYKUD3ukpzsVSBiciqxRF+4ZSEAT/EwHOvlrjBxInU6xKtv4PSZSLdOFpZU?= =?us-ascii?Q?dWVUk8Js3sUlo0/ldFtqrjQy+YRCVr0486YXRAI7qK6l8XfxykCY+ZE56x+P?= =?us-ascii?Q?1EL05fUArRFp5BIJJeyTHyfWHQlZ74PVD7O/iz+nqJW2SgBSngOgQpmGHU1e?= =?us-ascii?Q?hyEnechf89kbmh+v/CZ05XcMnkKO/vH85H9xOvBqjZaoe7ylrJ6U/qMUrpmX?= =?us-ascii?Q?+2oQKf2dJA3RQedEBXTXZnXk6WWlke0KDbHlaItcRWVrzouSC+zWftX49t28?= =?us-ascii?Q?dcL86MUbjuOY2pq07mA8gA+KRJdamJQmp1BzmI5EkiekF71GnyuLqg5WLYmM?= =?us-ascii?Q?THcrgBiRmaCzWmr2VhCPJD5+P/q5QZ6mnkItkWAxDvZSULkni2r77MV2no5f?= =?us-ascii?Q?mLyztpkSKP+KrjZqODQqZPnD61JgBWb1z2CgVKP6IJmA3W4XQQffDeZQnnl1?= =?us-ascii?Q?1lAB+qxqsUfzj/5JPvlHZdtjnPscjWRDKa9x3gW1aOKKGQ=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4LfW2tX3IGPw7QOGqBKnqLCzsBr65UJ2cC3DeQUXrE8VnzDYZMF/8b5xONPB?= =?us-ascii?Q?yxJm8at/7JT1yMVjSxgnu6fq5aDaSxIBF4J+XG0aAahnVeebD1q//FGQ/z4D?= =?us-ascii?Q?y9lYF3HAfDTy2nTliclXIvMnUsmYmgcaLGCQZflve6LLsaL5opkOl7+sWNZc?= =?us-ascii?Q?ACJHxi+xx53yeDz5I4r4Gs0rnVzcRhQPypDpBQcabxgY0i5JgT0SkIjo/gwE?= =?us-ascii?Q?w9dzcrAtvxzz0R890sGx+zGGdE2qwlXyWpyYZlAZMT5tudxL9z1A/Mu7zwuU?= =?us-ascii?Q?4ZVIVieRg148AHOMjmj4qR2zVklAyrq8njzr1nGaYSajuJmbTbjUjBKPB19k?= =?us-ascii?Q?a9YBSXHkeNeCgMiEso7RZ/joiJJP/SZGUoaHwomc9lUqlFEmIb5WZwCsnT6N?= =?us-ascii?Q?wr6G8HkJwEimJPo8f4T9SMwTm6fvGuj91cJm5BokwI/s0gKojPBeOPUpuSv2?= =?us-ascii?Q?kyMf+UHrsFwK+tsN+CUTeVKDuGziqNfa6bzm3iKNRyXF/8Q7JNyf00Wd5grf?= =?us-ascii?Q?iQImRWwdRvm98jqToXGHH28Mwi0PZ51pHmLbJmJGH38spvDRbq8wFjRvuEht?= =?us-ascii?Q?gkzfKR28FSguME+8B9YcggY8itEbQSXBk/2DQID6hYndFBMocdWnDPQbBXCH?= =?us-ascii?Q?/FCcx5FufC5E8+cgg+A+uJX+janv2TcHeltz/xjwM6Pah17XcPZYduwwgaW0?= =?us-ascii?Q?TW4lTbnN7KyucmRm+AAcVsDz3e3Qs/BSN+1H6K3TlmNC3IJtG0fbAHfky9wT?= =?us-ascii?Q?viJnyDcv3jvQT40ho5CFl2woQnf8Eu64fIGtKUsJgagHLhN6ahq5Cm/vwieP?= =?us-ascii?Q?AgckkJ9aNYhkJbr4sgfhI6Lj/ehzGQ1Srf+ewnq/JM6YnN2ukJaT7MXnhQ2N?= =?us-ascii?Q?mlQnwEz3z/X0O+YhdEPZMP5vXQmVUzEBg6w8vdEZtXe4X1kYgCklIKuicgR8?= =?us-ascii?Q?C0MSNF5LkKrBiR4IApnL1CS2FRSHFal7OjN7mjrNedB8SFhKhKK9T9599lC3?= =?us-ascii?Q?SVSyI5t9dzDw5XbdKR8I73PHCCCtPIVVLG1cT+J0g5HVE8RqnpqYl8Mx/WCE?= =?us-ascii?Q?YgqVK9mOzJAbGnzv0bM+WU4RlzAv4Udb9IzpeDyUgsZfnO9ywdWuNdfzIN1s?= =?us-ascii?Q?C1HWEr0wCu6sLCQgmDwbH48udwyPUFUZSlWN6OwAMa+gNolCGZabFL1k+SGI?= =?us-ascii?Q?1OAwxIHuFQ4adPEkFyRsO/uMDTWqHa6f9daNKJ1BIBpobj8v9tuc2VpK8Ch2?= =?us-ascii?Q?3IfMWw1uq2JjMBZ7FGAzdGZLd6TTHqBAOEIymxPSaMhmcNynL0TFlNgghKvH?= =?us-ascii?Q?aRxrZb0/y7ozYWRMMW7EUHzsEorbtlxZtR/v7rWig2zP8iBnXmutwPe4Uyfw?= =?us-ascii?Q?BlmysOvj0XUHVFyccWfrJjRu36Z5Nnlh7jAXDwgsM44ZNekwU22IY0rPkO00?= =?us-ascii?Q?OucKWKhL+cLprMguHuht3LqiupMM+b8RJWxfuU5SKuirHS4G7cVxvwdmgJTc?= =?us-ascii?Q?f7XzgeKCVT6aSx5rjF/jE0GLWZW/R4sQMRs9CPE67Kyry1YbxdQxg4tpbgfM?= =?us-ascii?Q?sbXz0cBZK3507KbXb2w=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: 819442ed-18fc-4367-17a5-08dc766a3aea X-MS-Exchange-CrossTenant-originalarrivaltime: 17 May 2024 12:09:40.6416 (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: 6YhB5lAIgTXru9Yj26PtFNRQrBxd5XRFQ9BqYuCjeKapCsSEuRd2bPmsrtR7hqo+zT2gjepsFZBoNh2PcrFxQQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4655 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:09:44 -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: V3amcFEufZwrDKz0W11Uivfsx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MN6PR11MB82444CFEA40F6DF2B76AB6BC8CEE2MN6PR11MB8244namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=xnnW11+u; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) --_000_MN6PR11MB82444CFEA40F6DF2B76AB6BC8CEE2MN6PR11MB8244namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni 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 (#119046): https://edk2.groups.io/g/devel/message/119046 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_MN6PR11MB82444CFEA40F6DF2B76AB6BC8CEE2MN6PR11MB8244namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Ray Ni <ray.ni@intel.com>

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 (#119046) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_MN6PR11MB82444CFEA40F6DF2B76AB6BC8CEE2MN6PR11MB8244namp_--