As part of the next firmware update we will switch from SMMSTOREv1 to SMMSTOREv2. Migrate existing SMMSTOREv1 data to UEFI variable store data used in edk2.
The migration cannot happen after flashing because BlSMMStoreDxe will erase the store on the next boot if the volume is not valid, deleting all variables.
Detect if there is an SMMSTORE region
Already done for copying the existing store
Determine if it is an NV Data Firmware Volume
Check for the firmware volume header
If true, assume data is valid and copy the region as-is
If false, assume it is SMMSTOREv1 and convert it
Convert raw SMMSTOREv1 data into a data structure and remove duplicates
Implemented in firmware-smmstore as deserialize()
Write the firmware volume and variable store headers to the new slice
As part of the next firmware update we will switch from SMMSTOREv1 to SMMSTOREv2. Migrate existing SMMSTOREv1 data to UEFI variable store data used in edk2.
The migration cannot happen after flashing because BlSMMStoreDxe will erase the store on the next boot if the volume is not valid, deleting all variables.
deserialize()
InitializeFvAndVariableStoreHeaders()
is the corresponding function in edk2ValidateFvHeader()
TODO: