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 4DBF6D80472 for ; Tue, 13 Aug 2024 03:59:20 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=HFNP4LnXYGjnUsJ3PYP5DIgrwsfwm90fHHv9ikMv41M=; 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=1723521559; v=1; b=N/ARj59kJv1QSmkAjkzzxC/gm/mRSfsJr+8hyC7GK5COYRh4KG7+aYiHXiodb1VS93939oPZ 0uMezr9dRhTQ8LZVpufE3dqBiXZ3bZoG3+Tm1Wcoex4Hto5RQenB19nt6FGpbAZIPfiFMj9NIS8 iCidLEFpl9LsFwkaNmAwQIHNR3DSgudSMOLz3budLEblxYr+8cD82W++BIe878vqfTULrCd7Bwx +GqKNkurqoh1L5mMB82mYShHg/7xEU713RqGD+ka98EWpD4YDpWQC3Ih8hTiKDhLnvWByj6u17C kWXGooNIeJiemG+iE19snD0K5j+lDrNLbhkAsmH1b0/og== X-Received: by 127.0.0.2 with SMTP id O8RiYY7687511xjkFlGdcGNa; Mon, 12 Aug 2024 20:59:18 -0700 X-Received: from SJ2PR03CU001.outbound.protection.outlook.com (SJ2PR03CU001.outbound.protection.outlook.com [52.101.43.96]) by mx.groups.io with SMTP id smtpd.web10.64683.1723521557912751154 for ; Mon, 12 Aug 2024 20:59:18 -0700 X-Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by MW4PR01MB6195.prod.exchangelabs.com (2603:10b6:303:7e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22; Tue, 13 Aug 2024 03:59:15 +0000 X-Received: from PH0PR01MB7287.prod.exchangelabs.com ([fe80::fc79:e629:93aa:8b8f]) by PH0PR01MB7287.prod.exchangelabs.com ([fe80::fc79:e629:93aa:8b8f%3]) with mapi id 15.20.7849.021; Tue, 13 Aug 2024 03:59:15 +0000 From: "Nhi Pham via groups.io" To: "Rebecca Cran OS" , "devel@edk2.groups.io" CC: "quic_llindhol@quicinc.com" , Chuong Tran OS , Tam Chi Nguyen OS Subject: Re: [edk2-devel] [edk2-platforms][PATCH 1/1] AmpereAltraPkg/FlashFvbDxe: Sync up NVRAM FV with NVRAM cached Thread-Topic: [edk2-platforms][PATCH 1/1] AmpereAltraPkg/FlashFvbDxe: Sync up NVRAM FV with NVRAM cached Thread-Index: AQHa6gpjlgchzbdZ5EeVd7iHwfSvPrIe5BmAgAWyG2c= Date: Tue, 13 Aug 2024 03:59:15 +0000 Message-ID: References: <20240809031236.1590316-1-nhi@os.amperecomputing.com> <21522bc3-a0d4-4996-80ca-1b41d3e38950@os.amperecomputing.com> In-Reply-To: <21522bc3-a0d4-4996-80ca-1b41d3e38950@os.amperecomputing.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Enabled=True;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_SiteId=3bc2b170-fd94-476d-b0ce-4229bdc904a7;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_SetDate=2024-08-13T03:59:11.118Z;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Name=Confidential;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_ContentBits=0;MSIP_Label_5b82cb1d-c2e0-4643-920a-bbe7b2d7cc47_Method=Standard; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR01MB7287:EE_|MW4PR01MB6195:EE_ x-ms-office365-filtering-correlation-id: 56f4763c-cf41-4a19-7f24-08dcbb4c4c57 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-ascii?Q?YCqOW+Y9pPraRYSmZklhXtPSeBLdB73st5R+xxpsYI8Ud6GEdhECMHiZ53D9?= =?us-ascii?Q?3fV1SMEXtPM/S481HuRkwSY0UwPXK1ykjSXNRojWoOEGCOVP7D2mZWDLpNSJ?= =?us-ascii?Q?r3eMmTlrv1O/PDPesXQcKsEqOL5lwWKI1ChKCIm5BEp4GRekDpG/FhUfcpYO?= =?us-ascii?Q?0zimOLXyz6gr3Mw+a+8BtFhujOHtnoQFJVmLjIPTHHv8LK4QOI+7qyC2crEk?= =?us-ascii?Q?uZxgCsalIUmL73asRKN0OjUYuSg9c1FeqNw+V3d4nvi3aimWBx4kt9FzApx9?= =?us-ascii?Q?2TD7tuSFWR4DqdX/p4pZpC4OI+P1ucpFFkKyFRuiJp97pDwSzZTXWQNAT+oK?= =?us-ascii?Q?yjiRb5RAyDdPko4pUHsEFjgztizNqPUpLeIyOpJDyQstQfhyGCOYrCxn5ZOL?= =?us-ascii?Q?TITKQZ2grP7AvZEONicroiPXxLfmH0TjfMZaKXpZurSOxS1CdYXwmiYIHbk5?= =?us-ascii?Q?ZIkzJ4l+7vnwhOHf3b5IRUsof6N77NBk03EynFFiubprVS5KVB66GmgziOzX?= =?us-ascii?Q?vWtDh+MqlQTGFO6aHsInVDbTw7s3P+kMgERzPh27WQrRzvyQByMdJq7Gt+n3?= =?us-ascii?Q?OxwcIBRhS0Kwdy3b59pWfJ/JbZam2n/hUX0c7hjMgpaoCnEBwHSBUw50IphY?= =?us-ascii?Q?lf7x7eEzIeF5oYrDGX6KK6WfrRqsZmGqFoatvjRzCZ+jsgd+ZXftF+2JHdZV?= =?us-ascii?Q?ez3nWq5vSfTncJMg2Pc/7kwLjzFPkFIYSrGEvMAhLbKK6i+A7n2hAbbdzwFP?= =?us-ascii?Q?w96k66/Uzb4Hi96KArN5M3+mLiNjyZpiMTPkkmKfNcCFK2FsEme09sZ9947g?= =?us-ascii?Q?/CCc0CAkFylOWBh58K1f6+wikzZqO/ys0TV/fhtETM0oY/mIJoczP9TdBLL7?= =?us-ascii?Q?qVFsqRrsSGZ1bkoWWJ37UqePouviEsANv0bR7o39HgM1N87mO1ER8fGL4Foi?= =?us-ascii?Q?ORq4ZXi0R4h7YNgQU5UZmIIe7+132rBiDkdwyzPzVkjXO+h6CP3gGGlJmm9i?= =?us-ascii?Q?qPEcCtiaovPY8HGSYkI5CF3TzmkJY0Vx/4yzBI4Wa6THekfykMBvG5Xg1kPk?= =?us-ascii?Q?OZeBbx5aiqjbUnqkUtv/ezWbKnGD2wLI+bH0lGq0O45xxc48W0c5H91aLMLR?= =?us-ascii?Q?pYSrqwRGWKdraxQ3T+tEo6IIOORCcOoRvZ+FTrtyIX+cnsZB0zYtMKGKgP0u?= =?us-ascii?Q?r+vIuYh23zDUXrfUuHN8IczzXlgWUQD5UO0VEKZ9SFMXNV0vQS3UAqCl/js8?= =?us-ascii?Q?ECcQHr7KkvoTwkhYVJD7wEZoEiPLd+KqesH92nD8PN9SLapJS94HE9FQwHnx?= =?us-ascii?Q?Z6Z7EJJgVid9cgPvIyCROGwqiO3XHl68XSvMVfQpCRhkacVNBlUQ/900ssOW?= =?us-ascii?Q?k0eHx4mEy8/1dk69jXwMGBGka01lj1BlvIMCTH205+36to9tYw=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5JG6IxSksukUcVq5LRzNGQbKh/8gN05ZAQf+lWAPFkLhF6HRv8dIbrxI0b/n?= =?us-ascii?Q?6Wonfl6r+94apCKtVLVsUw/mRjXpcALrVdwTAdtXiXSGARoJuNDPMO04laHn?= =?us-ascii?Q?s5u5BgbrsP17ZFqK763yxkCDRT4aYQSCUsZX8TKkaHOheZGFX66tMGxiZomc?= =?us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GJQ1vlDDVUGbuYA4?= =?us-ascii?Q?V9AJubTjO8+lov6j2FOTa2pwIzjUDr9tp9WzxZfaOi3PKLlY4eD8T0w4cyNp?= =?us-ascii?Q?2KSN7pP4PIRocVxDs9nCU2+NhG7KxOek7v479npj3R1meLNBTjVEu1J1YKRH?= =?us-ascii?Q?iZykiaNBriVNaFaOzY+uX8Y0TN+lDJhImPoHH84Jem2utqpcMnfMihCpKXJb?= =?us-ascii?Q?Ah87++Du1PPmH9Ddrpsfa6M5ze28s/nGAlJkpZvwpoqLM3cby5/ToO/0Y9pQ?= =?us-ascii?Q?FC1TZoJ6vKtoplehw+JI1ymuLhJeUv0hhq3bscV1bnH01zQfKry5fTpYUneX?= =?us-ascii?Q?YzujI7/y5IUq2qxnfENzZW9Dge2NNurp7AIreWgpHuKxwZaoyxFruw5QD92w?= =?us-ascii?Q?st0FamS+h8VzMqLEwZ33MHvcLJyMiCkmrUdOPlfj9X8XLL99VvhI0MCY5GvS?= =?us-ascii?Q?GAWBYfJwY0qIE2Jq5LY660emGoAPIRRpxE/jf+v9Pdm0iZzT4DekAv3Cag34?= =?us-ascii?Q?/iVDvTuwzwiwnnv9P8xsrD1G4XZaYL2Tb5rNyxIH4uclZhK8BEx2rdcDRIES?= =?us-ascii?Q?dA=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 56f4763c-cf41-4a19-7f24-08dcbb4c4c57 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Aug 2024 03:59:15.2301 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: PK/htaK5+X9IzLCvFvpcRcj3ticGYCbWJ28NKFBrT2eDq9SsChO9ZV3NNGaJOwFTe9vWLqJdcbvDqHdz0U+oYGbJFwaSTMXZZvlqokMBDuQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR01MB6195 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: Mon, 12 Aug 2024 20:59:18 -0700 Resent-From: nhi@os.amperecomputing.com Reply-To: devel@edk2.groups.io,nhi@os.amperecomputing.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: EdfEYGQOneIJPTTSogQ9mzigx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_PH0PR01MB7287E2D6BFA358B6EEACD92D96862PH0PR01MB7287prod_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b="N/ARj59k"; 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=pass (policy=none) header.from=groups.io --_000_PH0PR01MB7287E2D6BFA358B6EEACD92D96862PH0PR01MB7287prod_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed as 70d5c0e3af97..debfeb1f3052 Thanks, Nhi ________________________________ From: Rebecca Cran OS Sent: Friday, August 9, 2024 8:00 PM To: Nhi Pham OS ; devel@edk2.groups.io Cc: quic_llindhol@quicinc.com ; Chuong Tran OS <= chuong@os.amperecomputing.com>; Tam Chi Nguyen OS Subject: Re: [edk2-platforms][PATCH 1/1] AmpereAltraPkg/FlashFvbDxe: Sync u= p NVRAM FV with NVRAM cached Reviewed-by: Rebecca Cran On 8/8/2024 9:12 PM, Nhi Pham wrote: > From: Tam Chi Nguyen > > Currently, the NVRAM FV region is only updated once at FlashPei that make= s > the data in NVRAM FV outdated with data in NVRAM region in SPI-NOR. > It causes the duplication of the valid NV variables when the Variable > Reclaim process performs. Consequently, after rebooting, system goes to > an infinite loop at GetNextVariableName. > > It requires the data in NVRAM FV to be synced up with NVRAM cache in memo= ry > that is managed by VariableDxe. > > Signed-off-by: Nhi Pham > --- > Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.inf | 1 + > Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.c | 3 += ++ > 2 files changed, 4 insertions(+) > > diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDx= e.inf b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.inf > index 008fd2315ffe..5f537cf7df27 100644 > --- a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.inf > +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.inf > @@ -25,6 +25,7 @@ [Packages] > Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconPkg.dec > > [LibraryClasses] > + BaseMemoryLib > DebugLib > FlashLib > PcdLib > diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDx= e.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.c > index 009694703ddd..853c458e375f 100644 > --- a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.c > +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.c > @@ -6,6 +6,7 @@ > > **/ > > +#include > #include > #include > #include > @@ -361,6 +362,8 @@ FlashFvbDxeWrite ( > return EFI_DEVICE_ERROR; > } > > + CopyMem ((UINT8 *)(UINTN)mNvStorageBase + Lba * mFlashBlockSize + Offs= et, Buffer, *NumBytes); > + > return Status; > } > -=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 (#120323): https://edk2.groups.io/g/devel/message/120323 Mute This Topic: https://groups.io/mt/107802467/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_PH0PR01MB7287E2D6BFA358B6EEACD92D96862PH0PR01MB7287prod_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Pushed as 70d5c0e3af97..debfeb1f3052

Thanks,
Nhi

From: Rebecca Cran OS <r= ebecca@os.amperecomputing.com>
Sent: Friday, August 9, 2024 8:00 PM
To: Nhi Pham OS <nhi@os.amperecomputing.com>; devel@edk2.group= s.io <devel@edk2.groups.io>
Cc: quic_llindhol@quicinc.com <quic_llindhol@quicinc.com>; Chu= ong Tran OS <chuong@os.amperecomputing.com>; Tam Chi Nguyen OS <ta= mnguyenchi@os.amperecomputing.com>
Subject: Re: [edk2-platforms][PATCH 1/1] AmpereAltraPkg/FlashFvbDxe:= Sync up NVRAM FV with NVRAM cached
 
Reviewed-by: Rebecca Cran <rebecca@os.amperecom= puting.com>


On 8/8/2024 9:12 PM, Nhi Pham wrote:
> From: Tam Chi Nguyen <tamnguyenchi@os.amperecomputing.com>
>
> Currently, the NVRAM FV region is only updated once at FlashPei that m= akes
> the data in NVRAM FV outdated with data in NVRAM region in SPI-NOR. > It causes the duplication of the valid NV variables when the Variable<= br> > Reclaim process performs. Consequently, after rebooting, system goes t= o
> an infinite loop at GetNextVariableName.
>
> It requires the data in NVRAM FV to be synced up with NVRAM cache in m= emory
> that is managed by VariableDxe.
>
> Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
> ---
>   Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvb= Dxe.inf | 1 +
>   Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvb= Dxe.c   | 3 +++
>   2 files changed, 4 insertions(+)
>
> diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFv= bDxe.inf b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.in= f
> index 008fd2315ffe..5f537cf7df27 100644
> --- a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.in= f
> +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.in= f
> @@ -25,6 +25,7 @@ [Packages]
>     Silicon/Ampere/AmpereSiliconPkg/AmpereSiliconP= kg.dec
>  
>   [LibraryClasses]
> +  BaseMemoryLib
>     DebugLib
>     FlashLib
>     PcdLib
> diff --git a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFv= bDxe.c b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.c > index 009694703ddd..853c458e375f 100644
> --- a/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.c<= br> > +++ b/Silicon/Ampere/AmpereAltraPkg/Drivers/FlashFvbDxe/FlashFvbDxe.c<= br> > @@ -6,6 +6,7 @@
>  
>   **/
>  
> +#include <Library/BaseMemoryLib.h>
>   #include <Library/DebugLib.h>
>   #include <Library/FlashLib.h>
>   #include <Library/PcdLib.h>
> @@ -361,6 +362,8 @@ FlashFvbDxeWrite (
>       return EFI_DEVICE_ERROR;
>     }
>  
> +  CopyMem ((UINT8 *)(UINTN)mNvStorageBase + Lba * mFlashBlockSiz= e + Offset, Buffer, *NumBytes);
> +
>     return Status;
>   }
>  
_._,_._,_

Groups.io Links:

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

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

_._,_._,_
--_000_PH0PR01MB7287E2D6BFA358B6EEACD92D96862PH0PR01MB7287prod_--