Fix MRC NVS data reading issue#145
Merged
myguitar merged 1 commit intoslimbootloader:masterfrom Apr 25, 2019
Merged
Conversation
An issue was reported on APL that MRC will start to do full training after 119 boot cycles. APL MRC training data contains two parts. One part will not change, and the other part will change for every boot. To avoid frequently erasing flash, a rolling method was applied to save this data into different slot for each boot. When all slots are full, the whole block will be reclaimed. However, some boundary condition was not handled properly which caused the NVS data cannot be located when the slot is close to the end of the block. This patch addressed this issue by: - Force the max slot number to be 8 aligned so that the map is always at byte boundary (1 bit for 1 slot in the slot map). - When all slots are marked with 0 (all slots are full), set default slot to be the last slot so that the last slot will be used to get the MRC NVS data. It fixed slimbootloader#146. Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An issue was reported on APL that MRC will start to do full training
after 119 boot cycles. APL MRC training data contains two parts. One
part will not change, and the other part will change for every boot.
To avoid frequently erasing flash, a rolling method was applied to
save this data into different slot for each boot. When all slots are
full, the whole block will be reclaimed. However, some boundary
condition was not handled properly which caused the NVS data cannot
be located when the slot is close to the end of the block.
This patch addressed this issue by:
at byte boundary (1 bit for 1 slot in the slot map).
slot to be the last slot so that the last slot will be used to get
the MRC NVS data.
It fixed #TBD.
Signed-off-by: Maurice Ma maurice.ma@intel.com