Re: [edk2] [edk2-platforms PATCH] Platform HiKeyXXX: Use merged variable driver for emulated NV mode
On Wed, 16 Jan 2019 at 11:25, Star Zeng wrote: > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1323 > Merge EmuVariable and Real variable driver. > > The real variable driver has been updated to support emulated > variable NV mode and the EmuVariableRuntimeDxe will be removed > later, so use merged variable driver for emulated NV mode. > > NOTE: > FaultTolerantWriteDxe is not needed at all for emulated NV mode, > so remove FaultTolerantWriteDxe including. > > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Cc: Michael D Kinney > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng Reviewed-by: Ard Biesheuvel > --- > Platform/Hisilicon/HiKey/HiKey.dsc | 13 +++-- > Platform/Hisilicon/HiKey/HiKey.fdf | 3 +-- > Platform/Hisilicon/HiKey960/HiKey960.dsc | 14 -- > Platform/Hisilicon/HiKey960/HiKey960.fdf | 3 +-- > 4 files changed, 25 insertions(+), 8 deletions(-) > > diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc > b/Platform/Hisilicon/HiKey/HiKey.dsc > index 38fee902690c..7e05babb6c51 100644 > --- a/Platform/Hisilicon/HiKey/HiKey.dsc > +++ b/Platform/Hisilicon/HiKey/HiKey.dsc > @@ -59,6 +59,12 @@ [LibraryClasses.common] >IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf >UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf > > + # VariableRuntimeDxe Requirements > + > SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf > + > AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf > + > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf > + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf > + > [LibraryClasses.common.SEC] >PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf > > ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf > @@ -144,6 +150,10 @@ [PcdsFixedAtBuild.common] > > gHiKeyTokenSpaceGuid.PcdAndroidBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00D023F700)/eMMC(0x0)/Ctrl(0x0)/HD(6,GPT,5C0F213C-17E1-4149-88C8-8B50FB4EC70E,0x7000,0x2)/\\EFI\\BOOT\\GRUBAA64.EFI" > > gHiKeyTokenSpaceGuid.PcdSdBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00E023F700)/SD(0x0)" > > + # > + # Make VariableRuntimeDxe work at emulated non-volatile variable mode. > + # > + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE > > > > # > @@ -183,8 +193,7 @@ [Components.common] >MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf >MdeModulePkg/Universal/SerialDxe/SerialDxe.inf > > - MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf > - MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf > + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > >ArmPkg/Drivers/ArmGic/ArmGicDxe.inf >ArmPkg/Drivers/TimerDxe/TimerDxe.inf > diff --git a/Platform/Hisilicon/HiKey/HiKey.fdf > b/Platform/Hisilicon/HiKey/HiKey.fdf > index b0e533c5b1de..7e6c8083bbca 100644 > --- a/Platform/Hisilicon/HiKey/HiKey.fdf > +++ b/Platform/Hisilicon/HiKey/HiKey.fdf > @@ -182,8 +182,7 @@ [FV.FvMain] >INF FatPkg/EnhancedFatDxe/Fat.inf >INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf > > - INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf > - INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf > + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > >INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf > > diff --git a/Platform/Hisilicon/HiKey960/HiKey960.dsc > b/Platform/Hisilicon/HiKey960/HiKey960.dsc > index bd26b759dce0..a4a1a371de19 100644 > --- a/Platform/Hisilicon/HiKey960/HiKey960.dsc > +++ b/Platform/Hisilicon/HiKey960/HiKey960.dsc > @@ -59,6 +59,12 @@ [LibraryClasses.common] >IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf >UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf > > + # VariableRuntimeDxe Requirements > + > SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf > + > AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf > + > TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf > + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf > + > [LibraryClasses.common.SEC] >PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf > > ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf > @@ -135,6 +141,11 @@ [PcdsFixedAtBuild.common] > > gHiKey960TokenSpaceGuid.PcdAndroidBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,3BFF00)/UFS(0x0,0x3)/HD(7,GPT,D3340696-9B95-4C64-8DF6-E6D4548FBA41,0x12100,0x4000)/\\EFI\\BOOT\\GRUBAA64.EFI" >
[edk2] [edk2-platforms PATCH] Platform HiKeyXXX: Use merged variable driver for emulated NV mode
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1323 Merge EmuVariable and Real variable driver. The real variable driver has been updated to support emulated variable NV mode and the EmuVariableRuntimeDxe will be removed later, so use merged variable driver for emulated NV mode. NOTE: FaultTolerantWriteDxe is not needed at all for emulated NV mode, so remove FaultTolerantWriteDxe including. Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- Platform/Hisilicon/HiKey/HiKey.dsc | 13 +++-- Platform/Hisilicon/HiKey/HiKey.fdf | 3 +-- Platform/Hisilicon/HiKey960/HiKey960.dsc | 14 -- Platform/Hisilicon/HiKey960/HiKey960.fdf | 3 +-- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc b/Platform/Hisilicon/HiKey/HiKey.dsc index 38fee902690c..7e05babb6c51 100644 --- a/Platform/Hisilicon/HiKey/HiKey.dsc +++ b/Platform/Hisilicon/HiKey/HiKey.dsc @@ -59,6 +59,12 @@ [LibraryClasses.common] IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf + # VariableRuntimeDxe Requirements + SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf + AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf + TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf + [LibraryClasses.common.SEC] PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf @@ -144,6 +150,10 @@ [PcdsFixedAtBuild.common] gHiKeyTokenSpaceGuid.PcdAndroidBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00D023F700)/eMMC(0x0)/Ctrl(0x0)/HD(6,GPT,5C0F213C-17E1-4149-88C8-8B50FB4EC70E,0x7000,0x2)/\\EFI\\BOOT\\GRUBAA64.EFI" gHiKeyTokenSpaceGuid.PcdSdBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00E023F700)/SD(0x0)" + # + # Make VariableRuntimeDxe work at emulated non-volatile variable mode. + # + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE # @@ -183,8 +193,7 @@ [Components.common] MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf MdeModulePkg/Universal/SerialDxe/SerialDxe.inf - MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf - MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf ArmPkg/Drivers/ArmGic/ArmGicDxe.inf ArmPkg/Drivers/TimerDxe/TimerDxe.inf diff --git a/Platform/Hisilicon/HiKey/HiKey.fdf b/Platform/Hisilicon/HiKey/HiKey.fdf index b0e533c5b1de..7e6c8083bbca 100644 --- a/Platform/Hisilicon/HiKey/HiKey.fdf +++ b/Platform/Hisilicon/HiKey/HiKey.fdf @@ -182,8 +182,7 @@ [FV.FvMain] INF FatPkg/EnhancedFatDxe/Fat.inf INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf - INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf - INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf diff --git a/Platform/Hisilicon/HiKey960/HiKey960.dsc b/Platform/Hisilicon/HiKey960/HiKey960.dsc index bd26b759dce0..a4a1a371de19 100644 --- a/Platform/Hisilicon/HiKey960/HiKey960.dsc +++ b/Platform/Hisilicon/HiKey960/HiKey960.dsc @@ -59,6 +59,12 @@ [LibraryClasses.common] IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf + # VariableRuntimeDxe Requirements + SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf + AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf + TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf + [LibraryClasses.common.SEC] PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf @@ -135,6 +141,11 @@ [PcdsFixedAtBuild.common] gHiKey960TokenSpaceGuid.PcdAndroidBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,3BFF00)/UFS(0x0,0x3)/HD(7,GPT,D3340696-9B95-4C64-8DF6-E6D4548FBA41,0x12100,0x4000)/\\EFI\\BOOT\\GRUBAA64.EFI" gHiKey960TokenSpaceGuid.PcdSdBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00F037FF00)/SD(0x0)" + # + # Make VariableRuntimeDxe work at emulated non-volatile variable mode. + # + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE +