From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web10.20394.1683732008762365741 for ; Wed, 10 May 2023 08:20:08 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=BtEgcDE5; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: isaac.w.oram@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683732008; x=1715268008; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=+2eWwVBW9MweWQw3JrcEvhhhtJXhQ0Kr5P/AvZ9nbS4=; b=BtEgcDE5MGaVdAeKNfW4xYLIJupTrXFm+UWhCZfu4FzU9Vl9bkxG+sWE 8llOc/AdMPo33YWpeSJYAZkwbMf1Wlv1MrHcdPQOP+1t4GMBvXiKKuLyQ NtUfqlQpsUhAkdZ0TBYHwd2e68GYCflguSCc15Doj1YoX2ImH/A+fN3gW jUwimBD0XoQhMNFktAW+UX+38S2Bs6TZFvB2udwLe7CJdAJ6hzSTgaqSG d/WYKXDamFrldGwumn/R4dCSnspA1OtgZi9eRen6g0YLJc08bISaeo7vg GcKt0lQXGctIAou93djl5U1F9FmMEL6bva1L/J58RZrsN7vX913GBIYQV Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="339486811" X-IronPort-AV: E=Sophos;i="5.99,265,1677571200"; d="scan'208";a="339486811" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2023 08:20:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10706"; a="823576408" X-IronPort-AV: E=Sophos;i="5.99,265,1677571200"; d="scan'208";a="823576408" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga004.jf.intel.com with ESMTP; 10 May 2023 08:20:07 -0700 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.23; Wed, 10 May 2023 08:20:06 -0700 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.23 via Frontend Transport; Wed, 10 May 2023 08:20:06 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.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.23; Wed, 10 May 2023 08:20:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CZzwVOK06QaFDBS3DQAtjuLP1liXSzOLiIO5CAbqARtH8+iGU5ef+tK89zrgY1HiibSvPvAuivwbEiLiJNKWF7psR92KXA3Zs325oOUgdRcprsEra9+pZ2BYwNM1pS923426KCcuK1WTKnvDseubychjV0RBUpMwG06JoF2zufJrev7YyHfVAqa2rUTe9tkSFXTKPsxEmNKtVIPSDl4aaCghiJmSV3jlZMWHqFCs4RO8paP8/TlfHzXJWszG0xA17Mr20mKn2A1ku9Byk4jvhH0vvNJ7TPVl9xKPABG3kHwTcDwIh69UlFYYLVeLNAj2MXihCHL5wRFwTAQpRJ2Wsg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pSykNkxGmzkMtOt73hyOMkVecU2BkDsJJ6554yghcwU=; b=FInA6ADVXRkUPm8ls4zDU9f+Bnhn5rVr2i+XicZ/f8U7foKp0S5oL/7TM+lhfZ9pKkRFaAmrdG/TmcdcBPB9I8fpv1e5cBgCV4WM6NA7J4XHdYIaL1uOOPbscOaVU6Rk8eiydzOqq40lCxh36QhE5GZVCiSStHmCqJHIBi/H0OCZ+PDaaUVZawiPrEO0rakLetjH8x/aAG6GKW9VeQpXc2dPj51a4l9jcItbClvcoeFFhHoXz8+pnMgUg4GnTOLU19MAYs85X67+hwC1qp+er1xdmZAIhoS5fjzb9eNpXBBpKV2Hle8WQQfrSxWQ7QmO3LKAhXc1b+0NTW0Yrzu7TQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SA1PR11MB5801.namprd11.prod.outlook.com (2603:10b6:806:23d::13) by BL3PR11MB6435.namprd11.prod.outlook.com (2603:10b6:208:3bb::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.19; Wed, 10 May 2023 15:20:04 +0000 Received: from SA1PR11MB5801.namprd11.prod.outlook.com ([fe80::6979:a90f:e224:41c5]) by SA1PR11MB5801.namprd11.prod.outlook.com ([fe80::6979:a90f:e224:41c5%4]) with mapi id 15.20.6363.032; Wed, 10 May 2023 15:20:04 +0000 From: "Isaac Oram" To: "mikuback@linux.microsoft.com" , "devel@edk2.groups.io" CC: "Chiu, Chasel" , "Desimone, Nathaniel L" , "Gao, Liming" , "Dong, Eric" , "Gudla, Raghava" Subject: Re: [edk2-platforms][PATCH v4 1/1] MinPlatformPkg: Add FspNvsBuffer compression option Thread-Topic: [edk2-platforms][PATCH v4 1/1] MinPlatformPkg: Add FspNvsBuffer compression option Thread-Index: AQHZg1CDpDMyzpSxGU+gc7JIn6rUz69TnxVA Date: Wed, 10 May 2023 15:20:03 +0000 Message-ID: References: <20230510150217.1716-1-mikuback@linux.microsoft.com> In-Reply-To: <20230510150217.1716-1-mikuback@linux.microsoft.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SA1PR11MB5801:EE_|BL3PR11MB6435:EE_ x-ms-office365-filtering-correlation-id: 4ae5b21f-c31d-4ee5-bb17-08db516a07a8 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VqzIhl9rOJo3SPIeMlIgwD1XAYBd1cNC4lc3u3NjujrIEZo6eTJNbRNIY41NrZrZwc7T0T/H6TIVVh2cp1UbnPFOCnbXtAqxq4k0J0iCxvqPQxP35gsd5EV0HhVvlr7jNm0BQQT8lxPy6+hQBapa5TUXYv7r/qIrY42HdJuIdQaikEa9njh6f3Q8+K9wWQn31hIj7pQHyzZ22jwalGLjRoOlxf0CZiscJnw+dwOHVagTtZmjui7aYZzMfCJZYa9bDD9k6g8Rw+N7PPyR2h65ZMOGywcyhliNCGdB7us594Y0Aky6o5CIfBCdF/sd9aseQc+kmT7idB4BFI087Zn8h+xj3tpNqk6jHjzW7sb4ziNMbngXnu9lYXvHsPabRiNlHPSUkrhDQ64rgK5YA7V7mqeNYHWHIXm5uH/8vp5UXWiyxrVLfWjMsjGxcIfomQ0oj3vOvWal4Bgv0H5T+TQdY00E0ymKGJKtwWfB742ouYXSWyM2CoLmcfZPblv5mUATrFrXsGWbLxGfVu2Vzoe2oCOomDcuz3GAp8QwAUC+WI4vSgDrXjnajwUOgOpjTN1/f5/VIEHP8hhnkG1jxQaq9quoqOpB+PiexXLfCzG3ER5tLnorrYyvDs6xJAl6QTWa x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SA1PR11MB5801.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(39860400002)(136003)(376002)(366004)(346002)(396003)(451199021)(71200400001)(7696005)(4326008)(64756008)(76116006)(66476007)(66946007)(66446008)(110136005)(66556008)(54906003)(19627235002)(82960400001)(2906002)(38070700005)(38100700002)(41300700001)(86362001)(316002)(52536014)(33656002)(5660300002)(8676002)(122000001)(55016003)(8936002)(45080400002)(478600001)(186003)(6506007)(26005)(9686003)(53546011)(83380400001)(107886003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?EdvYdlFVCPNNjON+A2nxZcTp1SiTp2zh11ySHSm05YEUb0Ecwk3gLr0R1QPm?= =?us-ascii?Q?PcZ1Kq5ZP8t5YhCv6Kl3nPDlHH0+1VCaFw44xyGF9DqzRPIxZjTp9Xz8QitJ?= =?us-ascii?Q?VQXiwAmXgnsQv7ZWVrZTvDwpSTF04UjHoYymH818l3XWe3i1ivauK1JE7TUH?= =?us-ascii?Q?FiQxAgebk9qQ6fovZqHqHP/51zC8GPe9TAiqba9BdXLqcvOj7VU1tJ6ze6ki?= =?us-ascii?Q?AXaPMWK/HoQFVlKGCkxRnujLbvVP+YJDgfQNTkzGK1qwtAks5ugmaH/4Zx0z?= =?us-ascii?Q?27fwNA9eBt/HMrB6l4xfX0NarWlo5HyuGjiE33cKNJfjVOIwHgTSgPRgxDbm?= =?us-ascii?Q?J6bJtjjy+VrwpzlkPTFDxGVanHID4Ua+/3J0upRuOi75CbeZi+m1YlNE3CSX?= =?us-ascii?Q?Rr7gbLm6WctLYed9geGy2Ch6elHRoIqZYtSZBZdmvCE4oMHdI3OXWK2j+6y9?= =?us-ascii?Q?e4zIiSNHjogIWoDrw4l9Ga/7PWJpA73NCSxbKw0sJr23g9mLlA9+Jw9wkiMy?= =?us-ascii?Q?5QI3jwIGRNMdQADbPy6fQlUV3kdiK+KL9q1YeZa+8K61hSVyW1yVGSCuvABf?= =?us-ascii?Q?Wpoi/V9ddeu0o2IR2IJt3dcPhsqR+fogCWdRrJorKDMFRXUcg4I2V531RlrC?= =?us-ascii?Q?byyA4p1Cn8P5u0a+YpWEsJov2dqu21iZqy79aRUlO+gk1Rb7bEnkAL6n0RjN?= =?us-ascii?Q?x5R6VWBRs2Ar/yd5wGmICiUiXvS5bZr8f7PW/cVeTHtyQzFFO/SJ1Y6+7AHF?= =?us-ascii?Q?WeoYDUaruLm2ssO5PyVsFMmYcIea/F2ex3ogYC5zaIyI8svaXl9Rzky2YYfv?= =?us-ascii?Q?sgbTH7ttwpDWdHxF8SDMuEKxLkPwQbJekXzpWnxNlK6Vw8JOLLvSFLgvARsV?= =?us-ascii?Q?CtkINa1jbBq0G9BaEhGkx3iJP93JwYiLhLPvjPY55PBkHaoHAHhwBM6DyY+h?= =?us-ascii?Q?W1HAjNT3iN9x9YDIPp57JGsW2Jhq7/OU0tgjRMRBsAYFqD8XFsRI2BxQ6XG0?= =?us-ascii?Q?Mqu1F5W6lbz/1TL971TiwRP42HTI+xEG4puQvGcGv1MMHq1FLaxw/aAuByZV?= =?us-ascii?Q?CvHEWR8Ij7nvxEalAYvbzpBX4b5lBZW308eVSxAIzoqyZPj5z9AK3WIYb4U4?= =?us-ascii?Q?VwLku1YKbFeeHFrAyZCYyfvH0Onetbs6oIgSTG8Gc7nsrrDqeLZDea0anHjR?= =?us-ascii?Q?BviePZpSRb6Gi3ntf9CnBCjWu9yY1dVRql48V0y4BIUF6dsIjpuNHFx2gl5k?= =?us-ascii?Q?oZmVLXxdEU3JH4qoVHULCntNHPDZv/XHnc6YNjZz+nFweMMAe6fH1wcnf4g3?= =?us-ascii?Q?fDDGzu2oQUulBp8I1A10khdsVopw2wGz4FALgbmkx3iPxBEiCuMisddV5uoU?= =?us-ascii?Q?wmVMZtZK9nvz2wwpGZ2WXriIA4EjnXhquHZ4NYGKvVUOkqchLDkrFoOfNy8l?= =?us-ascii?Q?NLphGpgkXRrFeYKXEq9pJRCfDVoBTacAL4wAqMFYNpJNGwpNABwJ2KIeuLcR?= =?us-ascii?Q?SQyKs4ez67qHcrhh/xFimoZ1nTiSCUJVT/ds7ZpoU4Qm2slhEzXzWlW3nlQE?= =?us-ascii?Q?Gpelj15veVx/YGj/MmAOi9KtBqo9bHpVOcXsk7G3?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA1PR11MB5801.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ae5b21f-c31d-4ee5-bb17-08db516a07a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2023 15:20:03.9831 (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: L+zuUfS1FbaUF2iw8rJEya32BfYF/ezNot5yuhzSxdisj9ekChWGLLnJ63jOuHXe8HUA5o1BO/erK4bmHdUInA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6435 Return-Path: isaac.w.oram@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Isaac Oram -----Original Message----- From: mikuback@linux.microsoft.com =20 Sent: Wednesday, May 10, 2023 8:02 AM To: devel@edk2.groups.io Cc: Chiu, Chasel ; Desimone, Nathaniel L ; Oram, Isaac W ; Gao, Liming = ; Dong, Eric ; Gudla, Raghav= a Subject: [edk2-platforms][PATCH v4 1/1] MinPlatformPkg: Add FspNvsBuffer co= mpression option From: Michael Kubacki Adds a PCD called "PcdEnableCompressedFspNvsBuffer" that allows the "FspNvs= Buffer" UEFI variable data to be saved as compressed data. Especially due to the nature of the data saved in this variable, it compres= ses well. For example, it has been found to reduce ~63KB of data to ~13KB. = Boot time impact has been found to be negligible. The default value is FALSE to keep default behavior consistent. Decompression can be performed on the variable data using the standard Uefi= DecompressLib. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Isaac Oram Cc: Liming Gao Cc: Eric Dong Cc: Raghava Gudla Signed-off-by: Michael Kubacki --- Notes: v4: - Rebase onto 42a677e992d2 - Add CompressLib to MinPlatformPkg.dsc as well v3: - Rebase onto 7ac91ec277db - Add CompressLib instance to CoreCommonLib.dsc v2: Rebase onto 9769bf28d1fc Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig= .c | 62 ++++++++++++++++---- Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryConfig= .inf | 4 ++ Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc = | 1 + Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec = | 6 ++ Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc = | 1 + 5 files changed, 61 insertions(+), 13 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/Save= MemoryConfig.c b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/= SaveMemoryConfig.c index 0215e8eeddfb..95b8cef8b32b 100644 --- a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryC= onfig.c +++ b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemo +++ ryConfig.c @@ -3,6 +3,7 @@ exists, and saves the data to nvRAM. =20 Copyright (c) 2017 - 2022, Intel Corporation. All rights reserved.
+Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -10,6 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include +#include #include #include #include @@ -19,6 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #includ= e +#include #include #include =20 @@ -38,20 +41,26 @@ SaveMemoryConfigEntryPoint ( IN EFI_SYSTEM_TABLE *SystemTable ) { - EFI_STATUS Status; - EFI_HOB_GUID_TYPE *GuidHob; - VOID *HobData; - VOID *VariableData; - UINTN DataSize; - UINTN BufferSize; - BOOLEAN DataIsIdentical; + EFI_STATUS Status; + EFI_HOB_GUID_TYPE *GuidHob; + VOID *HobData; + VOID *VariableData; + UINTN DataSize; + UINTN BufferSize; + BOOLEAN DataIsIdentical; + VOID *CompressedData; + UINT64 CompressedSize; + UINTN CompressedAllocationPages; =20 - DataSize =3D 0; - BufferSize =3D 0; - VariableData =3D NULL; - GuidHob =3D NULL; - HobData =3D NULL; - DataIsIdentical =3D FALSE; + DataSize =3D 0; + BufferSize =3D 0; + VariableData =3D NULL; + GuidHob =3D NULL; + HobData =3D NULL; + DataIsIdentical =3D FALSE; + CompressedData =3D NULL; + CompressedSize =3D 0; + CompressedAllocationPages =3D 0; =20 // // Search for the Memory Configuration GUID HOB. If it is not present, = then @@ -73,6 +82,29 @@ SaveMemoryConfigEntryPoint ( } } =20 + if (PcdGetBool (PcdEnableCompressedFspNvsBuffer)) { + if (DataSize > 0) { + CompressedAllocationPages =3D EFI_SIZE_TO_PAGES (DataSize); + CompressedData =3D AllocatePages (CompressedAllocationPag= es); + if (CompressedData =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "[%a] - Failed to allocate compressed data bu= ffer.\n", __FUNCTION__)); + ASSERT_EFI_ERROR (EFI_OUT_OF_RESOURCES); + return EFI_OUT_OF_RESOURCES; + } + + CompressedSize =3D EFI_PAGES_TO_SIZE (CompressedAllocationPages); + Status =3D Compress (HobData, DataSize, CompressedData, &Com= pressedSize); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "[%a] - failed to compress data. Status =3D %= r\n", __FUNCTION__, Status)); + ASSERT_EFI_ERROR (Status); + return Status; + } + } + + HobData =3D CompressedData; + DataSize =3D (UINTN)CompressedSize; + } + if (HobData !=3D NULL) { DEBUG ((DEBUG_INFO, "FspNvsHob.NvsDataLength:%d\n", DataSize)); DEBUG ((DEBUG_INFO, "FspNvsHob.NvsDataPtr : 0x%x\n", HobData)); @@ -136,6 +168,10 @@ SaveMemoryConfigEntryPoint ( DEBUG((DEBUG_ERROR, "Memory S3 Data HOB was not found\n")); } =20 + if (CompressedData !=3D NULL) { + FreePages (CompressedData, CompressedAllocationPages); } + // // This driver does not produce any protocol services, so always unload = it. // diff --git a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/Save= MemoryConfig.inf b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfi= g/SaveMemoryConfig.inf index 61e85a658693..0f12deb131ca 100644 --- a/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemoryC= onfig.inf +++ b/Platform/Intel/MinPlatformPkg/FspWrapper/SaveMemoryConfig/SaveMemo +++ ryConfig.inf @@ -26,6 +26,7 @@ [LibraryClasses] LargeVariableReadLib LargeVariableWriteLib BaseLib + CompressLib =20 [Packages] MdePkg/MdePkg.dec @@ -45,6 +46,9 @@ [Guids] gFspNonVolatileStorageHob2Guid ## CONSUMES gFspNvsBufferVariableGuid ## PRODUCES =20 +[Pcd] + gMinPlatformPkgTokenSpaceGuid.PcdEnableCompressedFspNvsBuffer + [Depex] gEfiVariableArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid \ No newline at end of file diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc b/= Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc index 5ce21cf31e17..dfe7d836d32a 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc @@ -147,6 +147,7 @@ [LibraryClasses.common] BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.i= nf LargeVariableReadLib|MinPlatformPkg/Library/BaseLargeVariableLib/BaseLar= geVariableReadLib.inf LargeVariableWriteLib|MinPlatformPkg/Library/BaseLargeVariableLib/BaseLa= rgeVariableWriteLib.inf + CompressLib|MinPlatformPkg/Library/CompressLib/CompressLib.inf =20 # # CryptLib diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec b/Platform/In= tel/MinPlatformPkg/MinPlatformPkg.dec index 784abb828e76..45c75f8ec2c9 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec @@ -311,6 +311,12 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic,= PcdsDynamicEx] =20 gMinPlatformPkgTokenSpaceGuid.PcdPlatformMemoryCheckLevel|0|UINT32|0x300= 00009 =20 + ## Controls whether the FSP NVS buffer is saved as compressed data. + # Data compression can significantly reduce variable storage usage for F= SP NVS buffer data. + # Platforms that choose to compress the data will need to decompress=20 + the variable data upon # extraction. + =20 + gMinPlatformPkgTokenSpaceGuid.PcdEnableCompressedFspNvsBuffer|FALSE|BO + OLEAN|0x30000010 + ## This PCD is to control which device is the potential trusted console = input device.

# For example:
# USB Short Form: UsbHID(0xFFFF,0xFFFF,0x1,0x1)
diff --git a/Platfor= m/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/Intel/MinPlatformPkg/M= inPlatformPkg.dsc index 90127c16b59e..087fa48dd00a 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -101,6 +101,7 @@ [LibraryClasses.common.DXE_DRIVER] # # DXE phase common # + CompressLib|MinPlatformPkg/Library/CompressLib/CompressLib.inf FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/DxeFspWrapperPla= tformLib/DxeFspWrapperPlatformLib.inf TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/DxeTestP= ointCheckLib.inf TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointLib.in= f -- 2.40.1.windows.1