Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does the ATTR value be saved to the PNOR flash when setting it in the Hostboot Runtime? #247

Open
ierictin opened this issue May 22, 2024 · 2 comments

Comments

@ierictin
Copy link

bool Target::trySetAttr(typename AttributeTraits<A>::Type const& i_attrValue)

Hello, I want to set ATTR in the Hostboot Runtime to transfer some data for the next boot (Hostboot IPL), but I failed.

Here are some tests I did, for the same ATTR (non-volatile):

  1. If set the ATTR in the Hostboot IPL, I can see that the ATTR takes effect during the next Hostboot IPL boot.
  2. If set the ATTR in the Hostboot Runtime, I see that the ATTR is not set successfully and still uses the default value during the next Hostboot IPL boot.
  3. After setting the ATTR in the Hostboot Runtime and immediately reading it back for verification, it was found the ATTR was set successfully.

I guess that the ATTR value may only be stored in memory and not written back to PNOR. So, I want to know will the ATTR value be saved to the PNOR flash when setting it in the Hostboot Runtime?

Thanks.

@dcrowell77
Copy link
Collaborator

Your guess is correct, at runtime all of the attributes live in memory only. Nothing is ever written into PNOR. Note that even during IPL the save doesn't happen automatically on each write, there is an explicit moment in time when all of the data is written out. See AttrRP::updatePreservedAttrSection() which is invoked at a high level by a call to syncAllAttributesToSP().

@ierictin
Copy link
Author

Thanks, I can try other ways to transfer data.

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

No branches or pull requests

2 participants