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

Replace pflash with direct MTD access. #553

Closed
williamspatrick opened this issue Sep 8, 2016 · 5 comments
Closed

Replace pflash with direct MTD access. #553

williamspatrick opened this issue Sep 8, 2016 · 5 comments

Comments

@williamspatrick
Copy link
Member

In #542, @shenki suggested it may be better to use direct MTD access provided by the kernel instead of pflash's direct register manipulation. We need to better understand what the design for that would be and then an appropriate refactoring of the host flash code.

My immediate thoughts and questions would be:

  1. How does the kernel know when it is acceptable to create the MTD? Is this a probe / removal done by userspace? We need to make sure we are not having dual access between the BMC and the Host.
  2. Where does the parsing of the FFS TOC happen? I think there is kernel level support for that on Power, but perhaps that is provided as an abstraction by skiboot. Do we still need pflash for TOC parsing or can we get support for creating independent MTD partitions? The FSP driver team also has an FFS implementation, so there may be something we can leverage from them also.
  3. For security reasons there was a potential P9 design that would prevent the Host from accessing the SFC entirely and the BMC would present a 'memboot' emulation of the PNOR. Where are we with that? If that is the intended Host firmware design, I would propose that we don't even use FFS natively but simply map the PNOR device as a second flash chip for the BMC. We can be more efficient than the FFS layout is and we can xz compress many of the sections. We can then utilize the extra space for our own purposes.
@williamspatrick williamspatrick added this to the openBMC v2.0 Backlog milestone Sep 8, 2016
@shenki
Copy link
Member

shenki commented Sep 8, 2016

There is not support for parsing the FFS TOC in power. We did a prototype it but didn't stick.

Point 1 and 3 are mutually exclusive. I think we should design for 3, which means the mtd device is present in the device tree and is always owned by the BMC.

@williamspatrick
Copy link
Member Author

If we want to design for 3 we need to ensure the host firmware team is on board and ready to go for that. We also need a plan for what to do with userspace on P8 machines. It is also a pain to have two different implementations.

@rfrandse
Copy link

remove pflash as part of cleanup

@williamspatrick
Copy link
Member Author

We will be removing pflash in favor of UBI-managed volumes.

@ozbenh
Copy link

ozbenh commented Jun 1, 2017

Don't remove it until the alternative exists. AFAIK the current pflash will use /dev/mtd when available and has the whole FFS stuff we need when updating skiboot etc...

So until you have the new UBI stuff, please keep pflash around

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

4 participants