Skip to content

Conversation

@cclaudio
Copy link
Member

@cclaudio cclaudio commented Oct 10, 2016

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 Reviewable

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>
@williamspatrick
Copy link
Contributor

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.

@cclaudio
Copy link
Member Author

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.

@ghost
Copy link

ghost commented Oct 11, 2016

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.

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.

2 participants