fcp: properly set the partition actual size in write operations#13
fcp: properly set the partition actual size in write operations#13cclaudio wants to merge 1 commit intoopen-power:masterfrom
Conversation
The actual size of the partitions is not set correctly when we run op-build to create a PNOR image. entry.actual is set to entry.size (allocated size) by fpart while creating the partition (truncate operation), but it is not updated when a LID file is written to the partition. That causes an error in skiboot while loading CAPP partition, which has ECC. With the trusted boot patches recently merged into skiboot, the CAPP partition fails to be loaded. Skiboot correctly removes the ECC from the CAPP partition content that comes from the CAPP LID, but it fails when it reaches the 0xFF byte chain that comes from the partition creation process. This issue happens because entry.actual is not set properly. This patch fixes the actual size of the partitions of a PNOR image created by running op-build. It updates the partition actual size whenever a given content is about to be written to a PNOR partition. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com>
|
Why can't you fix this in skiboot? There is a problem with updating the TOC entry in that BMC code often doesn't have code to handle updating the TOC correctly. This means if someone uses, for example, the IPMI raw command to update a partition we end up with the TOC not matching either. |
|
So, I think we will need to update the build process to pad the CAPP section boundary and then ECC everything. Same way as hostboot does. Since entry.actual will continue to be equal to entry.size, skiboot can continue to retrieve only the CAPP actual size. |
|
FYI I just reverted those two skiboot patches as it breaks CAPI on existing machines and means you can't run CAPI+skiboot master. We're going to have to deal with the fact that old CAPP paritions exist anyway, as every developer is going to encounter this, and we can't make everybody update their CAPP partitions depending on what skiboot they're booting. We may have to have skiboot start to parse the STB container for the container size and then use it. I'd also like to see us update the FFS headers properly though, as otherwise we just add needless time onto boot reading unneeded parts of the flash. |
The actual size of the partitions is not set correctly when we run
op-build to create a PNOR image. entry.actual is set to entry.size
(allocated size) by fpart while creating the partition (truncate
operation), but it is not updated when a LID file is written to the
partition. That causes an error in skiboot while loading CAPP partition,
which has ECC.
With the trusted boot patches recently merged into skiboot, the CAPP
partition fails to be loaded. Skiboot correctly removes the ECC from the
CAPP partition content that comes from the CAPP LID, but it fails when
it reaches the 0xFF byte chain that comes from the partition creation
process. This issue happens because entry.actual is not set properly.
This patch fixes the actual size of the partitions of a PNOR image
created by running op-build. It updates the partition actual size
whenever a given content is about to be written to a PNOR partition.
Signed-off-by: Claudio Carvalho cclaudio@linux.vnet.ibm.com
This change is