From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.749.1649452849692033078 for ; Fri, 08 Apr 2022 14:20:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=eg7weIEu; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [192.168.4.22] (unknown [47.201.46.36]) by linux.microsoft.com (Postfix) with ESMTPSA id BE89B203A05C; Fri, 8 Apr 2022 14:20:48 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BE89B203A05C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1649452849; bh=k+x6RdzucDbTH34BDK4pQYTfolPpb9r/Ex7ODloDIjU=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=eg7weIEuZoq/t9hQz+nhZ+7/DIBSWLpr7BMNlkSkz5Zebdr6Fihz093eRG8ed08uC QEFLXMzdlPFjRzrYMBpbJpieMvj2Izu9myXy2LIhvMxQ2CzHSgpBVIqEheXOnG6v3y +w8rFwHnBXZM0f15UBCX55PNafmy6msBNdghCfTc= Message-ID: <4f1d5f1f-bdc9-4cb7-28f8-885d6a257336@linux.microsoft.com> Date: Fri, 8 Apr 2022 17:20:47 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [edk2-devel] [PATCH v1 0/3] Add Variable Flash Info HOB From: "Michael Kubacki" To: devel@edk2.groups.io, hao.a.wu@intel.com Cc: "Wang, Jian J" , "Gao, Liming" References: <20220406162648.234-1-mikuback@linux.microsoft.com> In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Hao, I addressed all of your feedback including abstraction of the=20 information with a library API in v2. It did help clean up the=20 consumption code quite a bit. https://edk2.groups.io/g/devel/message/88649 Thanks, Michael On 4/7/2022 7:56 PM, Michael Kubacki wrote: > Yes, I considered that as well but I was not sure if it was worth adding= =20 > a new library just for that. I agree though that the code should not be= =20 > duplicated. I will look into it and include your other suggestions in a= =20 > v2 series. >=20 > Thanks, > Michael >=20 > On 4/6/2022 11:31 PM, Wu, Hao A wrote: >> Sorry for a question: >> GetVariableFlashInfo() seems being defined multiple times across=20 >> modules, do you see value in abstracting it as a library API? >> >> Best Regards, >> Hao Wu >> >>> -----Original Message----- >>> From: devel@edk2.groups.io On Behalf Of Michael >>> Kubacki >>> Sent: Thursday, April 7, 2022 12:27 AM >>> To: devel@edk2.groups.io >>> Cc: Wang, Jian J ; Wu, Hao A=20 >>> ; >>> Gao, Liming >>> Subject: [edk2-devel] [PATCH v1 0/3] Add Variable Flash Info HOB >>> >>> From: Michael Kubacki >>> >>> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D3479 >>> >>> The UEFI variable drivers such as VariableRuntimeDxe, VariableSmm, >>> VariableStandaloneMm, etc. (and their dependent protocol/library >>> stack), typically acquire UEFI variable store flash information >>> with PCDs declared in MdeModulePkg. >>> >>> For example: >>> [Pcd] >>> =C2=A0=C2=A0 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBa= se >>> =C2=A0=C2=A0 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBa= se64 >>> =C2=A0=C2=A0 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSi= ze >>> >>> These PCDs work as-is in the StandaloneMm driver if they are not >>> dynamic such as Dynamic or DynamicEx because PCD services are not >>> readily available in the Standalone MM environment. Platforms that >>> use Standalone MM today, must define these PCDs as FixedAtBuild in >>> their platform build. However, the PCDs do allow platforms to treat >>> the PCDs as Dynamic/DynamicEx and being able to support that is >>> currently a gap for Standalone MM. >>> >>> This patch series introduces a HOB that can be produced by the >>> platform to provide the same information. The HOB list is >>> available to Standalone MM. >>> >>> The PCD declarations are left as-is in MdeModulePkg for backward >>> compatibility. This means unless a platform wants to use the HOB, >>> their code will continue to work with no change (they do not need >>> to produce the HOB). Only if the HOB is found, is its value used >>> instead of the PCDs. >>> >>> Cc: Jian J Wang >>> Cc: Hao A Wu >>> Cc: Liming Gao >>> Signed-off-by: Michael Kubacki >> >>> Michael Kubacki (3): >>> =C2=A0=C2=A0 MdeModulePkg: Add Variable Flash Info HOB >>> =C2=A0=C2=A0 MdeModulePkg/Variable: Consume Variable Info HOB >>> =C2=A0=C2=A0 MdeModulePkg/FaultTolerantWrite: Consume Variable Info HOB >>> >>> =20 >>> MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c = =20 >>> | >>> 111 +++++++++++++++++--- >>> =C2=A0 MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.= c >>> |=C2=A0=C2=A0 7 +- >>> =C2=A0 MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWriteP= ei.c >>> |=C2=A0 92 ++++++++++++++-- >>> =20 >>> MdeModulePkg/Universal/Variable/Pei/Variable.c = =20 >>> |=C2=A0 66 >>> +++++++++++- >>> =20 >>> MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c = =20 >>> |=C2=A0 42 >>> ++++++++ >>> =20 >>> MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c = =20 >>> | >>> 25 ++++- >>> =C2=A0 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableNonVolatile.c >>> |=C2=A0 20 +++- >>> =20 >>> MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c = =20 >>> | >>> 20 +++- >>> =20 >>> MdeModulePkg/Include/Guid/VariableFlashInfo.h = =20 >>> |=C2=A0 36 >>> +++++++ >>> =20 >>> MdeModulePkg/MdeModulePkg.dec = =20 >>> |=C2=A0=C2=A0 4 + >>> =C2=A0 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.= h >>> |=C2=A0=C2=A0 9 +- >>> =C2=A0 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteD= xe.inf >>> |=C2=A0 11 +- >>> =C2=A0 MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteS= mm.inf >>> |=C2=A0 11 +- >>> >>> MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandalo= n >>> eMm.inf |=C2=A0 11 +- >>> =C2=A0 MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWriteP= ei.inf >>> |=C2=A0 10 +- >>> =20 >>> MdeModulePkg/Universal/Variable/Pei/Variable.h = =20 >>> |=C2=A0=C2=A0 2 + >>> =20 >>> MdeModulePkg/Universal/Variable/Pei/VariablePei.inf = =20 >>> |=C2=A0=C2=A0 6 +- >>> =20 >>> MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h = =20 >>> |=C2=A0 17 >>> +++ >>> =C2=A0 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.in= f >>> |=C2=A0=C2=A0 6 +- >>> =20 >>> MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf = =20 >>> | >>> 6 +- >>> =C2=A0 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.= inf >>> |=C2=A0=C2=A0 6 +- >>> =C2=A0 21 files changed, 455 insertions(+), 63 deletions(-) >>> =C2=A0 create mode 100644 MdeModulePkg/Include/Guid/VariableFlashInfo.h >>> >>> --=20 >>> 2.28.0.windows.1 >>> >>> >>> >>> -=3D-=3D-=3D-=3D-=3D-=3D >>> Groups.io Links: You receive all messages sent to this group. >>> View/Reply Online (#88461): https://edk2.groups.io/g/devel/message/8846= 1 >>> Mute This Topic: https://groups.io/mt/90293658/1768737 >>> Group Owner: devel+owner@edk2.groups.io >>> Unsubscribe: https://edk2.groups.io/g/devel/unsub [hao.a.wu@intel.com] >>> -=3D-=3D-=3D-=3D-=3D-=3D >>> >> >> >> >>=20 >>