On 7 May 2015 at 08:55, Laszlo Ersek <ler...@redhat.com> wrote: > On 05/07/15 08:16, Ard Biesheuvel wrote: >> The NorFlashDxe uses an explicit 'BEFORE xxx' Depex declaration to >> ensure that it is dispatched before VariableRuntimeDxe, and uses the >> file GUID of the latter as 'xxx' explicitly to accomplish that. >> >> However, when enabling UEFI Secure Boot, this breaks down since the >> authenticated VariableRuntimeDxe is a completely separate driver, with >> a different GUID. Also, the hardcoded dependency on gEfiVariableGuid, >> which is not used under UEFI Secure Boot, needs to be factored out in >> order to allow this driver to be used. >> >> So clone NorFlashDxe.inf into NorFlashAuthenticatedDxe.inf, and fix >> up the dependencies so they refer to gEfiAuthenticatedVariableGuid and >> SecurityPkg/VariableAuthenticated/RuntimeDxe/VariableRuntimeDxe.inf >> instead. >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> >> --- >> ArmPlatformPkg/ArmPlatformPkg.dec | 4 >> ++ >> ArmPlatformPkg/ArmVExpressPkg/ArmVExpressPkg.dec | 4 >> -- >> ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf | 76 >> ++++++++++++++++++++ >> ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedVariableDep.c | 19 >> +++++ >> ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h | 2 + >> ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf | 1 + >> ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c | 4 >> +- >> ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashVariableDep.c | 19 >> +++++ >> 8 files changed, 123 insertions(+), 6 deletions(-) > > snip > >> diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h >> b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h >> index c24680098f62..9b76bfa1df23 100644 >> --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h >> +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.h >> @@ -152,6 +152,8 @@ struct _NOR_FLASH_INSTANCE { >> NOR_FLASH_DEVICE_PATH DevicePath; >> }; >> >> +CONST EFI_GUID* CONST mNorFlashVariableGuid; >> + >> EFI_STATUS >> NorFlashReadCfiData ( >> IN UINTN DeviceBaseAddress, > > While this is valid C -- the above is a "tentative definition", > discussed eg. in C89 6.7.2 p2, and C99 6.9.2 p2 -- it is more usual to > add the storage-class specifier "extern" to such declarations. > > So, please do that, and then you can add my > > Reviewed-by: Laszlo Ersek <ler...@redhat.com> >
Thanks. I have pushed these 3 patches (with this change and your R-b added) to: https://git.linaro.org/leg/edk2.git/shortlog/refs/heads/linaro-topic-uefi-secure-boot ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel