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 027AFD81164 for ; Fri, 9 Aug 2024 13:00:32 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=w32rqtkQIo/ZaT4P8UtmkzKrAUr675gx2cSbBS2IjFs=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From:In-Reply-To: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:Content-Transfer-Encoding; s=20240206; t=1723208432; v=1; b=gWumU+cd3h+JqE5DauOGQ9jBH4ksKXWSzHD3VcI2TkkluwAWQGWQSAK1sWoOIxslCPYPECZf pcINoF6F9FeaVXsVgyPa4cRn2hpaOKXgJef53ayn61MPSIbNre2u91dh9UpUnI/reqgiT1iYntQ 55ATgI5ABkjqisVRZ8P6SThxIuS1VIFGzlN9GRSKeTypi9r0XqbPKJ8G2t/1uwYK9EYntj7d7VV 5uhZ9cOs7SK1r45b9Wz13KeP7me+bVb4WcZ/mc5gCgFFmqADTjpZLlOtWmuN/QSrpOvYRD1wjMC za6FNiegI35bcKMbcClnG4d0xSmbJ+zUOem+0mzZF/UuQ== X-Received: by 127.0.0.2 with SMTP id p9AvYY7687511xZbI0EbvMfl; Fri, 09 Aug 2024 06:00:31 -0700 X-Received: from CH1PR05CU001.outbound.protection.outlook.com (CH1PR05CU001.outbound.protection.outlook.com [52.101.193.93]) by mx.groups.io with SMTP id smtpd.web11.83355.1723208430765645416 for ; Fri, 09 Aug 2024 06:00:30 -0700 X-Received: from LV3PR01MB8464.prod.exchangelabs.com (2603:10b6:408:1a3::7) by SA1PR01MB8376.prod.exchangelabs.com (2603:10b6:806:37b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22; Fri, 9 Aug 2024 13:00:26 +0000 X-Received: from LV3PR01MB8464.prod.exchangelabs.com ([fe80::74dd:8ddd:b9c2:8d2d]) by LV3PR01MB8464.prod.exchangelabs.com ([fe80::74dd:8ddd:b9c2:8d2d%3]) with mapi id 15.20.7849.014; Fri, 9 Aug 2024 13:00:25 +0000 Message-ID: <21522bc3-a0d4-4996-80ca-1b41d3e38950@os.amperecomputing.com> Date: Fri, 9 Aug 2024 07:00:21 -0600 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [edk2-platforms][PATCH 1/1] AmpereAltraPkg/FlashFvbDxe: Sync up NVRAM FV with NVRAM cached To: Nhi Pham , devel@edk2.groups.io Cc: quic_llindhol@quicinc.com, chuong@os.amperecomputing.com, Tam Chi Nguyen References: <20240809031236.1590316-1-nhi@os.amperecomputing.com> From: "Rebecca Cran via groups.io" In-Reply-To: <20240809031236.1590316-1-nhi@os.amperecomputing.com> X-ClientProxiedBy: BY5PR03CA0010.namprd03.prod.outlook.com (2603:10b6:a03:1e0::20) To LV3PR01MB8464.prod.exchangelabs.com (2603:10b6:408:1a3::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV3PR01MB8464:EE_|SA1PR01MB8376:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b10145b-02bd-45ae-8b1c-08dcb8733c64 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: =?utf-8?B?aGEyeFhjZDYyUkphc1NvTDBZdFU1K1hIa2d1NnlmUGxZVzNROFpZWEpDNVRU?= =?utf-8?B?bUF1Zlh3LytuWlR3MDBJSkJIaHQrQUgvTEFpUjB4blVvTHFrR3B3YXJpNzZa?= =?utf-8?B?QkpGMnFLdk8zUktuRlpOUHpVV09sR2o3U3RHRUx0YVhXMk1nNFB4UnZ0SFNP?= =?utf-8?B?WkFuVUExSGtMc2Y0c3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XVVJaaWUwYW9uSXFrWFRVdHpud241MlRMZG9E?= =?utf-8?B?SzlzY28xaEY1T045Q3h6azR0SFBOYWJuZE41cCtIZjdVK25vWkoyTmZ4WmIz?= =?utf-8?B?dDZDbWlFeGZPbk10TW9uKzBBZ2VsTU0rOUhjQlQwTEZrK0dxSUQyUllpaWJP?= =?utf-8?B?RWJKTU50MVR5RWNJSlpTRndDcHNMN2JmalJiTjZadXBmY29xY0F3a2VqWHJ3?= =?utf-8?B?a1JORzBSd1Y1MU1LbHNxNks3QUY1NWNQUHhPb29QS0NNMy9LRUJtekZ2VWlm?= =?utf-8?Q?d4/Meks0N6pMlBZNgF1f4h4=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b10145b-02bd-45ae-8b1c-08dcb8733c64 X-MS-Exchange-CrossTenant-AuthSource: LV3PR01MB8464.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Aug 2024 13:00:25.6292 (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: B9FK81jytOQvpdvfax8jlKi3xxXJweQ8jOmHFk4sJUI1d/bTCJdGO+qaypKyBzm4SvUyTQJuau7BwgTft+65AGwPaGzkR2+XYb64R1NUoK9nKtETqSqq9atCvuB40sX9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR01MB8376 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, 09 Aug 2024 06:00:31 -0700 Resent-From: rebecca@os.amperecomputing.com Reply-To: devel@edk2.groups.io,rebecca@os.amperecomputing.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: jB2b7HxhQzmWqlWgi0RFAnyYx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=gWumU+cd; 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 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 > =20 > [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 @@ > =20 > **/ > =20 > +#include > #include > #include > #include > @@ -361,6 +362,8 @@ FlashFvbDxeWrite ( > return EFI_DEVICE_ERROR; > } > =20 > + CopyMem ((UINT8 *)(UINTN)mNvStorageBase + Lba * mFlashBlockSize + Offs= et, Buffer, *NumBytes); > + > return Status; > } > =20 -=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 (#120308): https://edk2.groups.io/g/devel/message/120308 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-