Skip to content

Comments

Fix MRC NVS data reading issue#145

Merged
myguitar merged 1 commit intoslimbootloader:masterfrom
mauricema:aplmrcnvs
Apr 25, 2019
Merged

Fix MRC NVS data reading issue#145
myguitar merged 1 commit intoslimbootloader:masterfrom
mauricema:aplmrcnvs

Conversation

@mauricema
Copy link
Contributor

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 #TBD.

Signed-off-by: Maurice Ma maurice.ma@intel.com

@mauricema mauricema requested a review from a team as a code owner April 25, 2019 05:08
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>
Copy link
Contributor

@rprangar rprangar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link
Contributor

@myguitar myguitar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@myguitar myguitar merged commit 9172889 into slimbootloader:master Apr 25, 2019
@mauricema mauricema deleted the aplmrcnvs branch May 18, 2019 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants