Name Date Size #Lines LOC

..06-Nov-2024-

test/H05-Nov-2024-2,4801,742

Makefile.am.includeH A D21-Sep-2022189 97

README.mdH A D08-Dec-20222.6 KiB5645

backend.cppH A D06-Nov-202415.4 KiB544369

backend.hH A D09-Aug-2023938 4630

ffs.hH A D07-Mar-20214.8 KiB13757

partition.cppH A D21-Sep-20226.7 KiB240186

partition.hppH A D21-Sep-20223.1 KiB10142

table.cppH A D29-Nov-202312.6 KiB406322

table.hppH A D21-Sep-20229.6 KiB356154

README.md

1# Virtual PNOR Functionality
2
3In the abstract, the virtual PNOR function shifts mboxd away from accessing raw
4flash to dynamically presenting a raw flash image to the host from a set of
5backing files.
6
7Enabling the feature virtualises both the host's access to the flash (the mbox
8protocol), and the BMC's access to the flash (via some filesystem on top of the
9flash device).
10
11## Do I want to use this feature in my platform?
12
13Maybe. It depends on how the image construction is managed, particularly the
14behaviour around writes from the host. It is likely the scheme will prevent
15firmware updates from being correctly applied when using flash tools on the
16host.
17
18## Use-case Requirements
19
20Currently, the virtual PNOR implementation requires that:
21
22- The host expect an FFS layout (OpenPOWER systems)
23- The BMC provide a directory tree presenting the backing files in a hierarchy
24  that reflects the partition properties in the FFS table of contents.
25
26## Implementation Behavioural Properties
27
281.  The FFS ToC defines the set of valid access ranges in terms of partitions
292.  The read-only property of partitions is enforced
303.  The ToC is considered read-only
314.  Read access to valid ranges must be granted
325.  Write access to valid ranges may be granted
336.  Access ranges that are valid may map into a backing file associated with the
34    partition
357.  A read of a valid access range that maps into the backing file will render
36    the data held in the backing file at the appropriate offset
378.  A read of a valid access range that does not map into the backing file will
38    appear erased
399.  A read of an invalid access range will appear erased
4010. A write to a valid access range that maps into the backing file will update
41    the data in the file at the appropriate offset
4211. A write to a valid access range that does not map into the backing file will
43    expand the backing file to accommodate the write.
4412. A write to a valid access range may fail if the range is not marked as
45    writeable. The error should be returned in response to the request to open
46    the write window intersecting the read-only range.
4713. A write of an invalid access range will return an error. The error should be
48    returned in response to the request to open the write window covering the
49    invalid range.
50
51The clarification on when the failure occurs in points 11 and 12 is useful for
52host-side error handling. Opening a write window gives the indication that
53future writes are expected to succeed, but in both cases we define them as
54always failing. Therefore we should not give the impression to the host that
55what it is asking for can be satisfied.
56