Introduce NVRAM storage format versioning
We want to be able to detect situations when NVRAM storage format
changes for whatever reason. At the very least the NVRAM needs to be
reinitialized, ideally its contents should be migrated from old to new
storage format.
This patch implements the reinitialization part.
BUG=chrome-os-partner:60537
TEST=added some code to print out a message when NvInit() is invoked
in NvCheckAndMigrateIfNeeded(). Verified that it is invoked on
the first restart after upgrade to this new version.
Change-Id: Ia713a6fe7814bbe44ed5ce28ebcc0435a99b7716
Signed-off-by: Vadim Bendebury <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/416294
Reviewed-by: Andrey Pronin <[email protected]>
2 files changed