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 1DB39740038 for ; Fri, 30 Aug 2024 04:25:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=mhEW6tm22pVMm/cQDDWEXbW9SgIJcvBZx1imxGd9sOs=; 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=1724991907; v=1; b=ivBP+gdYExxtKcyQeJTCjKgSX8C3J0STq2gqll4YyaVMTwiXHhv2LAucakTvzcOX6+/ssZsm +mNx9j7nN/05wMxYF8VIcw/C9jN+sB6ARR8tczw35Va/czXKAiNawQ+7Vch4ZZx2XbhLkcqhki1 OfdJMD+wEfswqI1N+Cf9SemRMoGW66w9G61ZcBQTGkMxB+D+fvEPCQ5b+Q++TKcDTxjyKNaMG5B xnoUIxX8IOCmKb96GR0dsRPcMVStJ8nEo7HbSfAYeDIzPvvVvDIDWgsmoBHRC/4vZDm90zMsVmO +4r2zj8ucqlBmk/rlViQABo9EJgxDdyoUZWC0nO3Zq7pg== X-Received: by 127.0.0.2 with SMTP id y0o7YY7687511xXxbFFBbF49; Thu, 29 Aug 2024 21:25:06 -0700 X-Received: from DM5PR21CU001.outbound.protection.outlook.com (DM5PR21CU001.outbound.protection.outlook.com [52.101.62.73]) by mx.groups.io with SMTP id smtpd.web10.5462.1724991905257872196 for ; Thu, 29 Aug 2024 21:25:05 -0700 X-Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by DS1PR01MB8870.prod.exchangelabs.com (2603:10b6:8:21e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.29; Fri, 30 Aug 2024 04:24:54 +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.7918.019; Fri, 30 Aug 2024 04:24:54 +0000 From: "Nhi Pham via groups.io" To: Ard Biesheuvel , "devel@edk2.groups.io" CC: Chuong Tran OS , "quic_llindhol@quicinc.com" , "Rebecca Cran OS" Subject: Re: [edk2-devel] [PATCH 1/1] AmpereAltraPkg/FlashLib: Fix kernel crash if not call SetVirtualAddressMap() Thread-Topic: [edk2-devel] [PATCH 1/1] AmpereAltraPkg/FlashLib: Fix kernel crash if not call SetVirtualAddressMap() Thread-Index: AQHa7flze3z4TDM23EubaxX59+OMVLI9/jIAgAAGGtiAAFEhAIAA9eqd Date: Fri, 30 Aug 2024 04:24:54 +0000 Message-ID: References: <20240814032242.2353572-1-nhi@os.amperecomputing.com> <82e50c43-e924-49f3-bc17-8b32cb51bd7b@amperemail.onmicrosoft.com> In-Reply-To: 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-30T04:24:51.867Z;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_|DS1PR01MB8870:EE_ x-ms-office365-filtering-correlation-id: 7bb68fe4-57b2-4292-d1a4-08dcc8abb2c6 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-ascii?Q?y8MzbQo6vAJcm7lS0/oBci38M8FOf+gm5VjRfQ7EjMUnbU3kZH4wKeLdcF3F?= =?us-ascii?Q?uL6eohWRY8Gd4Vo1QjutxDXbhglEMvVcVoLIsbsk3WNuzRMtGg7kN6VhKFsX?= =?us-ascii?Q?EksiYO/epxM6iJuGP6yW3q8S4nrKYCB2CGHXZKKnKvkl1JX3Mvfdzm8MFrOx?= =?us-ascii?Q?aCmIzAsxMcJc82/NBEia8bDZGGzSTv8MJOWzEpMhXhzIY4akM3zH3ezd0f9l?= =?us-ascii?Q?sRT5EdXmNOAFKWOBeCAMlTt7L5Mk3k7kwlEgvrBZa5zGwLfbTkZXvctowHYO?= =?us-ascii?Q?3jMte01imf+auS6+p2my0L7MMW1zPaZ4k3xVjIxCUbpqeOoUwUSW0Wbk0FQq?= =?us-ascii?Q?HqULytrUj3QX3J8k9ee9+16KtC63tGNTPSqFkzB5YjI4iOjZvX9WW1emCFoI?= =?us-ascii?Q?RnzpLtgkoKwIyz32K7+xeA5GYragde5bqJnpuH1h0xng7sCdSw9JDBNl+dbV?= =?us-ascii?Q?2D5K0HMzrfIl5eS+vE57SWvSGHgY/MaR86y8nWZeDXIBW2GVH2z9wyAD5uHF?= =?us-ascii?Q?CMC+1IOi6boJXJ58s8l9xLPQMts6oHAcSNQrXSwWk2f6iz3eOTfMMYDHGCVW?= =?us-ascii?Q?1O22Eh00ZFMc7WNn+7NZk1ObDGJjNO5ZJSUvV14tDg21aIFTq3++oDzUwR8/?= =?us-ascii?Q?hmd1pOxyG4idrMKHMot9xu0eXpLtKtP/eXxEM9zSlIuT3hUv6aqi+oTSunqq?= =?us-ascii?Q?A4Vr6cXmACYU2ry6/q1xWCLA8l5QkPoSsAUEJ7uamoK7uOfx7ESudbL3qpVe?= =?us-ascii?Q?vOBWmu84JZwbsOgI7tgk/Bq4/ywK08bnnF7E5fvjMiEaQGv2Uowgpon3n+CX?= =?us-ascii?Q?9GS2qIgSnoNBsGdWCA6Z7wHLGksMKl6l58dqas3baKC6K0KshzEQUnEoTTVT?= =?us-ascii?Q?4ZR5gM36EVyK6jNR48J1TOdwYja287d1hSdDUfVlBwozGrnA4pep7eGkFQol?= =?us-ascii?Q?Qdutc4GapDqyIGFNNZ6zyLIoS5+WIFfCblwiv6I2r+h4roJr/YcdNe6tzY0e?= =?us-ascii?Q?TUIY6xNObLNgWdR1X2Mu2RO+zrTMeghqDqzO0/VLCXD1a34uq9De98BiqEr5?= =?us-ascii?Q?Wtb8hdkOly5RswvtSerHcPnMg5pZ26wotB2cy68gkqpoaST4Fy1+KrsX+TRH?= =?us-ascii?Q?O3BDKwpIh6V6NolIEwnIfr2a7YEB/bfXScE8AfUvd+C0OQhT6KXQm++Tw6Xb?= =?us-ascii?Q?tdIU9WUa8nBy3MDLmrlB/BqQmiPlmgcYCQwOacqeMwxFTOyJnyGDPxWyObzD?= =?us-ascii?Q?fQMhEg6/OR/4++B0N95EprFr06HPwp+FPeDqfsZNEEfqgI/RL0HScLPqGjx0?= =?us-ascii?Q?ghNPQyZSVR6NLSRpnlwvkbJ/S8xm4OjuQ8d8pTWfPjLslQp47jFpyCG1nOOm?= =?us-ascii?Q?I6rThCDLrGrqs/i1SOZzdxGC+UdI1gAbqwMChVhgyU54R3ehGA=3D=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?U6NefSlpwgt4iRX6mCia9v0rOG8udcEyivvMxH5Zg9S0d8O4JYyE27fh5Y6Q?= =?us-ascii?Q?06rW5QV8GukvhhVrpYToo7SVHJK9X8jX7OaxjIsLsmeR+Uw0YcHjqnkfYet6?= =?us-ascii?Q?qOkAYm4qrimYkZwaA/kLWO+t9MkenJTcylVLUif6bEiARXrvJHL3HfE1oMPc?= =?us-ascii?Q?CSPnTpJk4YY3BkTzNZ2z0YgM4sDPeUsxEjJDk2JejjqIdiT4HOXX2ozFGQax?= =?us-ascii?Q?wbeM2256Z7ZBfg8OyO69x41V/C9/2HSCWJfMPPRJQxUsfx5S8ibQGCVDWFI5?= =?us-ascii?Q?JXHe2w4EcZu2GKfFmkoa8Ka/6wnBF/RmmF9OiBzHmw9ofi985WnTPRL/P4pu?= =?us-ascii?Q?Av3eCupzejjpw3z8wyToMR1PfY619S+gTedzvj2MtnaPsjBFkLEm7XExh6g7?= =?us-ascii?Q?5Gv+gCHMN4gOg/IuXhTiiaUK5iuVh1syaKH0Ua5fzmzYHchx5lih1oP2DC69?= =?us-ascii?Q?aHLDobium9iDmFlpusbvqMUrxk4spnBtM6mNm0hfOOsaGUd2o4gDHv9+9siR?= =?us-ascii?Q?8Bo64SOt3hVMvFLVwcD4UjJSeviB6bIsnJ9fMgXk++W7pyrOXuURmTL6Klsx?= =?us-ascii?Q?2UlNrQtzV2pz/KlFZcR2+sD+6teZ9BX0zlYAyEh2lMhZRYJXQTEYs8FU4RAV?= =?us-ascii?Q?3IwiSRkQNot4KkntP8UIItd9Q75AM9Vy6RsS46EvoS4j76OImL6i+8DXTrVx?= =?us-ascii?Q?lmHnsRQYXWTpJ/quSZmFRqKIMX2h5AZbwrkcGLwx/n9l9cFZEakmo00S9yH8?= =?us-ascii?Q?66/I2cl9U5IqQcAyMFA2wX2JpGcxgKVasF14NGsXjwNgINvg2DhlZvh4y8nd?= =?us-ascii?Q?mJy6bhn4icDfp/rpkDt/22iwV5uCjHjDQPLHOn0waOtQoAwJO6FyhihUJRFZ?= =?us-ascii?Q?+UZHI5jPyP0m+CnDSLX+ohvxBnOTPfdvo7oMkA9rQ2rLMslkIH2me2xSXMUS?= =?us-ascii?Q?sWBefAdoZQTP0duCL4BQn8+w5OAKv6v4JLw0x/H4ppmdk4FEU96J0HvG7YXl?= =?us-ascii?Q?3XYojk7DC5KRU3fbNa3QpjnTphYDoquJ0wkJkAAOc/h4efKdUYDrGkbpxIjE?= =?us-ascii?Q?1Ov2h5AIpDKp4CTIgxqnrKT05rUk6pP/Snmwq5Yo0bA5bejB4yVl5xANUQck?= =?us-ascii?Q?LTLQVF60JgR3OyDv3gavRTFJyVOYad+9GDM3NE96/i3NGtmFGHawHeDc7gIX?= =?us-ascii?Q?tml56H9E2AeuEgXTPQIXr0W9YQA1PQP17UpJYr411rrEFdtjRwWEn+vPBnpm?= =?us-ascii?Q?o29RHE1l8IXNm8+kd8r+yeY34rnAH9C97dSv0DHmE6s2JHV26YHreTCyBYyG?= =?us-ascii?Q?q2mdgDxmypjBwXoc/KtiEjve1BF8vTwhcuNcS5waQE5ofpt7hsyAH1Qfo6YO?= =?us-ascii?Q?NSk0McyRE5IR+PU/gxxraxJwYYSPgDCnoLLv7NHhGO2H0K2TR6VkrEAgR5Ob?= =?us-ascii?Q?lMSOcA6yHYB8SCcH3JOQ6pTLCKaKl2e1mZGIdy9AUn2d16ojiQeewEsifW4M?= =?us-ascii?Q?HxGI0Rzy+vKKADLoDm33Vk+PuLXpcOiNg42haIq2QgF+MIlhx9WfJOTuGuvr?= =?us-ascii?Q?dr+RCCl3z9o8x4rsyVxglUYpUXZCEmghVWOCifXiTzTvcoQ4YVJztSZHvDHz?= =?us-ascii?Q?+A=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: 7bb68fe4-57b2-4292-d1a4-08dcc8abb2c6 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2024 04:24:54.3771 (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: MYPXkaAH6TcEAYaa0bEd6Tcb4HVA1u6rgs2O2Q4A1w1PcgDz8sElmz3ed5lUOTb6q9mv5itz2wIrvNtbZxJuK8XFrpRnkGFgNwEsnmzqiQk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS1PR01MB8870 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: Thu, 29 Aug 2024 21:25:05 -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: 9dVSYVJxX4FwUuVJQr41To02x7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_PH0PR01MB7287DBDB6CB0D632ED92264796972PH0PR01MB7287prod_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=ivBP+gdY; dmarc=pass (policy=none) header.from=groups.io; 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_PH0PR01MB7287DBDB6CB0D632ED92264796972PH0PR01MB7287prod_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ard, AFAIK, the latest Ampere Software Release Package (SRP) release has been al= ready fixed this runtime issue. Regards, Nhi ________________________________ From: Ard Biesheuvel Sent: Thursday, August 29, 2024 8:38 PM To: devel@edk2.groups.io ; Nhi Pham OS Cc: Chuong Tran OS ; quic_llindhol@quici= nc.com ; Chuong Tran OS ; Rebecca Cran OS Subject: Re: [edk2-devel] [PATCH 1/1] AmpereAltraPkg/FlashLib: Fix kernel c= rash if not call SetVirtualAddressMap() On Thu, 29 Aug 2024 at 10:48, Nhi Pham via groups.io wrote: > > Pushed as 03d3395552c5 > Thanks for finally providing a fix for this! Is there any way to detect whether a firmware build has this fix? > ________________________________ > From: Chuong Tran OS > Sent: Thursday, August 29, 2024 3:25 PM > To: Nhi Pham OS ; devel@edk2.groups.io > Cc: quic_llindhol@quicinc.com ; Chuong Tran OS= ; Rebecca Cran OS > Subject: Re: [PATCH 1/1] AmpereAltraPkg/FlashLib: Fix kernel crash if not= call SetVirtualAddressMap() > > Acked-by: Chuong Tran > > Thanks, > Chuong > > On 8/14/2024 10:22 AM, Nhi Pham wrote: > > From: Chuong Tran > > > > OS kernel with greater than or equal to 48-bit VA space avoids EFI's > > SetVirtualAddressMap() runtime service on Arm64 and simply uses the 1:1 > > address mapping that UEFI used at booting. However, AmpereAltraPkg's > > RuntimeFlashLib replies on function call SetVirtualAddressMap() to > > determine whether it is in boot time or run-time. If > > SetVirtualAddressMap() has not been called prior, it causes the kernel > > crash. This patch fixes that issue by removing the separation between > > UEFI boot time and run-time in RuntimeFlashLib. > > > > Signed-off-by: Nhi Pham > > --- > > Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibCommon.c | 11= +++-------- > > Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/RuntimeFlashLib.c | 2= -- > > 2 files changed, 3 insertions(+), 10 deletions(-) > > > > diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibCom= mon.c b/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibCommon.c > > index 83695c857a11..0b000c2aad46 100644 > > --- a/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibCommon.c > > +++ b/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibCommon.c > > @@ -15,7 +15,6 @@ > > > > #include "FlashLibCommon.h" > > > > -BOOLEAN gFlashLibRuntime =3D FALSE; > > UINT8 *gFlashLibPhysicalBuffer; > > UINT8 *gFlashLibVirtualBuffer; > > > > @@ -34,13 +33,9 @@ ConvertToPhysicalBuffer ( > > IN UINT32 Size > > ) > > { > > - if (gFlashLibRuntime) { > > - ASSERT (VirtualPtr !=3D NULL); > > - CopyMem (gFlashLibVirtualBuffer, VirtualPtr, Size); > > - return gFlashLibPhysicalBuffer; > > - } > > - > > - return VirtualPtr; > > + ASSERT (VirtualPtr !=3D NULL); > > + CopyMem (gFlashLibVirtualBuffer, VirtualPtr, Size); > > + return gFlashLibPhysicalBuffer; > > } > > > > /** > > diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/RuntimeFlas= hLib.c b/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/RuntimeFlashLib.c > > index 2dcd13e08146..14cef8e17ece 100644 > > --- a/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/RuntimeFlashLib.c > > +++ b/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/RuntimeFlashLib.c > > @@ -35,8 +35,6 @@ FlashLibAddressChangeEvent ( > > { > > gRT->ConvertPointer (0x0, (VOID **)&gFlashLibVirtualBuffer); > > gRT->ConvertPointer (0x0, (VOID **)&mMmCommunicationProtocol); > > - > > - gFlashLibRuntime =3D TRUE; > > } > > > > /** > >=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 (#120441): https://edk2.groups.io/g/devel/message/120441 Mute This Topic: https://groups.io/mt/107889187/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_PH0PR01MB7287DBDB6CB0D632ED92264796972PH0PR01MB7287prod_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi Ard,

AFAIK, the latest Ampere Software Release Package (SRP) release has been al= ready fixed this runtime issue.

Regards,
Nhi

From: Ard Biesheuvel <ar= db@kernel.org>
Sent: Thursday, August 29, 2024 8:38 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>; Nhi Pham OS &= lt;nhi@os.amperecomputing.com>
Cc: Chuong Tran OS <chuong@amperemail.onmicrosoft.com>; quic_l= lindhol@quicinc.com <quic_llindhol@quicinc.com>; Chuong Tran OS <c= huong@os.amperecomputing.com>; Rebecca Cran OS <rebecca@os.amperecomp= uting.com>
Subject: Re: [edk2-devel] [PATCH 1/1] AmpereAltraPkg/FlashLib: Fix k= ernel crash if not call SetVirtualAddressMap()
 
On Thu, 29 Aug 2024 at 10:48, Nhi Pham via groups.= io
<nhi=3Dos.amperecomputing.com@groups.io> wrote:
>
> Pushed as 03d3395552c5
>

Thanks for finally providing a fix for this!

Is there any way to detect whether a firmware build has this fix?


> ________________________________
> From: Chuong Tran OS <chuong@amperemail.onmicrosoft.com>
> Sent: Thursday, August 29, 2024 3:25 PM
> To: Nhi Pham OS <nhi@os.amperecomputing.com>; devel@edk2.groups.= io <devel@edk2.groups.io>
> Cc: quic_llindhol@quicinc.com <quic_llindhol@quicinc.com>; Chuon= g Tran OS <chuong@os.amperecomputing.com>; Rebecca Cran OS <rebecc= a@os.amperecomputing.com>
> Subject: Re: [PATCH 1/1] AmpereAltraPkg/FlashLib: Fix kernel crash if = not call SetVirtualAddressMap()
>
> Acked-by: Chuong Tran <chuong@os.amperecomputing.com>
>
> Thanks,
> Chuong
>
> On 8/14/2024 10:22 AM, Nhi Pham wrote:
> > From: Chuong Tran <chuong@os.amperecomputing.com>
> >
> > OS kernel with greater than or equal to 48-bit VA space avoids EF= I's
> > SetVirtualAddressMap() runtime service on Arm64 and simply uses t= he 1:1
> > address mapping that UEFI used at booting. However, AmpereAltraPk= g's
> > RuntimeFlashLib replies on function call SetVirtualAddressMap() t= o
> > determine whether it is in boot time or run-time. If
> > SetVirtualAddressMap() has not been called prior, it causes the k= ernel
> > crash. This patch fixes that issue by removing the separation bet= ween
> > UEFI boot time and run-time in RuntimeFlashLib.
> >
> > Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
> > ---
> >   Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashL= ibCommon.c  | 11 +++--------
> >   Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/Runtim= eFlashLib.c |  2 --
> >   2 files changed, 3 insertions(+), 10 deletions(-)
> >
> > diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/Flash= LibCommon.c b/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibCommon= .c
> > index 83695c857a11..0b000c2aad46 100644
> > --- a/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibComm= on.c
> > +++ b/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/FlashLibComm= on.c
> > @@ -15,7 +15,6 @@
> >
> >   #include "FlashLibCommon.h"
> >
> > -BOOLEAN         &nb= sp;            = gFlashLibRuntime =3D FALSE;
> >   UINT8        =             &nb= sp;    *gFlashLibPhysicalBuffer;
> >   UINT8        =             &nb= sp;    *gFlashLibVirtualBuffer;
> >
> > @@ -34,13 +33,9 @@ ConvertToPhysicalBuffer (
> >     IN UINT32 Size
> >     )
> >   {
> > -  if (gFlashLibRuntime) {
> > -    ASSERT (VirtualPtr !=3D NULL);
> > -    CopyMem (gFlashLibVirtualBuffer, VirtualPtr, = Size);
> > -    return gFlashLibPhysicalBuffer;
> > -  }
> > -
> > -  return VirtualPtr;
> > +  ASSERT (VirtualPtr !=3D NULL);
> > +  CopyMem (gFlashLibVirtualBuffer, VirtualPtr, Size);
> > +  return gFlashLibPhysicalBuffer;
> >   }
> >
> >   /**
> > diff --git a/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/Runti= meFlashLib.c b/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/RuntimeFlashL= ib.c
> > index 2dcd13e08146..14cef8e17ece 100644
> > --- a/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/RuntimeFlash= Lib.c
> > +++ b/Silicon/Ampere/AmpereAltraPkg/Library/FlashLib/RuntimeFlash= Lib.c
> > @@ -35,8 +35,6 @@ FlashLibAddressChangeEvent (
> >   {
> >     gRT->ConvertPointer (0x0, (VOID **)&am= p;gFlashLibVirtualBuffer);
> >     gRT->ConvertPointer (0x0, (VOID **)&am= p;mMmCommunicationProtocol);
> > -
> > -  gFlashLibRuntime =3D TRUE;
> >   }
> >
> >   /**
>
_._,_._,_

Groups.io Links:

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

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

_._,_._,_
--_000_PH0PR01MB7287DBDB6CB0D632ED92264796972PH0PR01MB7287prod_--