summaryrefslogtreecommitdiffstats
path: root/Contributions.txt
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2018-04-11 22:18:24 +0200
committerLaszlo Ersek <lersek@redhat.com>2018-04-12 21:24:32 +0200
commit0f87c53d0d0eb7e7c003e209705ec79264e0852b (patch)
tree7b3d07bf4d0b37fd2c9ad858f6ae39a47f753caf /Contributions.txt
parent7ab26d51808bd4ffab2510091b062a91cf6a8c81 (diff)
downloadedk2-0f87c53d0d0eb7e7c003e209705ec79264e0852b.tar.gz
edk2-0f87c53d0d0eb7e7c003e209705ec79264e0852b.tar.bz2
edk2-0f87c53d0d0eb7e7c003e209705ec79264e0852b.zip
ArmPlatformPkg/NorFlashDxe: initialize varstore headers eagerly
The lazy initialization of the varstore FVB makes no longer sense at this point: - "mNorFlashInstanceTemplate.Initialize" is NULL; - in NorFlashCreateInstance(), we only set Instance->Initialize to non-NULL -- namely NorFlashFvbInitialize() -- if the FVB stands for the variable store (see "ContainVariableStorage" / "SupportFvb"); - we call Instance->Initialize() from three places: - from NorFlashWriteSingleBlock(), which is too late for the variable read service ("variable write" depends on "variable read"); - from InitializeFvAndVariableStoreHeaders(), but that is only reachable from NorFlashFvbInitialize(), i.e. recursively from Instance->Initialize() itself; - and from FvbRead(), which is never called by the variable driver, only by the FTW driver. However, the variable driver may read (not write) the memory-mapped varstore flash chip before the FTW driver is dispatched. Therefore the lazy initialization is both superfluous and insufficient. Initialize the varstore headers eagerly, before we install the FVB protocol interface. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Steve Capper <steve.capper@linaro.org> Cc: Supreeth Venkatesh <Supreeth.Venkatesh@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Steve Capper <steve.capper@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'Contributions.txt')
0 files changed, 0 insertions, 0 deletions