Check Petitboot version from user-space

Javier Martinez Canillas javierm at redhat.com
Thu May 24 21:18:53 AEST 2018


Hi Vasant,

On 05/24/2018 01:02 PM, Vasant Hegde wrote:

[snip]

>>
>> Yes, both are under the "ibm,firmware-versions" OF node but my understanding is
>> that they have different OF properties. The "New" style has a single "version"
>> property (which is the only one marked as Required for POWER9 in the table at
>> the top) while the "Old" style has more properties. In the examples you have:
> 
> So number of OF property may differ.
> 
> "version" -- So in P9 we mandate to have version property it tells overall 
> system firmware version ... like "IBM-Witherspoon-Blah-blah" and rest of the 
> property tells individual
> firmware component version detail.
> 
>>
>> New style (required for POWER9 and above):
>>
>> ibm,firmware-versions {
>>               version = "open-power-habanero-v1.14-45-g78d89280c3f9-dirty";
> 
> This is mandatory in P9, optional in P8.
> 
>>               skiboot = "5.4.0";
>>               occ = "d7efe30";
>>               linux = "4.4.32-openpower1";
>> };
>>
>> Old-style:
>>
>> ibm,firmware-versions {
>>          occ = "d7efe30-opdirty";
>>          skiboot = "5.4.0-opdirty";
>>          buildroot = "211bd05";
>>          capp-ucode = "1bb7503-opdirty";
>>          petitboot = "v1.3.1-opdirty-d695626";
>>          open-power = "habanero-f7b8f65-dirty";
>>          phandle = <0x1000012e>;
>>          hostboot-binaries = "56532f5-opdirty";
>>          habanero-xml = "6a78496-opdirty-526ff79";
>>          hostboot = "09cfacb-opdirty";
>>          linux = "4.4.32-openpower1-opdirty-85cf528";
>> };
>>
>> My understanding is that in "New" the "version" property contains the info
>> that's in the "open-power" and "petitboot" properties from the "Old" style.
> 
> Yeah. Some old system used open-power property to tell overall system property.
> Recent skiboot converts `open-power` value got from PNOR and puts it as 
> `version` property.
>
Then my understanding was correct, thanks a lot for the clarification!

> 
>> Hard to tell thought since the values in both examples don't match and the
>> documenation is quite confusing (for me at least).
> 
> May be documentation needs some update.
> 

Yes, I think that it may be improved by:

a) Explaining in more detail that there are two styles and their difference.
   Right now only the "New" style is explained and the "Old" is just shown
   in the examples.

b) Making the "New" and "Old" examples to match the firmware component versions,
   that way it will be clear what's present in the "New" versions property.

c) Mentioning the exact Skiboot version where the "New" style was introduced.
   That way people can first check the skiboot version and then use that info
   to know which style has to be parsed.

>>
>>> This is the point where I'll CC Stewart in :)
>>>
>>
>> Thanks, hopefully he can shed some light.
>>
>>> But regardless behind the scenes the big split is that on P8 Hostboot put this
>>> in the device tree and now on P9 Skiboot does it. The commit in Skiboot that
>>> adds this is 9727fe3, "DT: Add ibm,firmware-versions node", which exists as of:
>>> 	# git describe --tag 9727fe384
>>> 	v5.8-12-g9727fe38
>>>
>>
>> But for P8 is optional, right? You can't rely on this info to be present there.
> 
> P8 BMC boxes we will this information. But on P8 and P9 FSP systems we will not 
> have this
> version. I'm not sure whether we can get such information from FSP someway. I 
> will check
> on this.
>

Great.
 
>>
>>> Additionally on FSP-based machines (Tuleta, ZZ..) this doesn't exist and finding
>>> the relevant firmware versions is more painful - you'd likely have to match it
>>> up against the FSP image version.
>>>
>>
>> I see, so this is only present on BMC-based machines? How can I check if a
> 
> Yes. Only BMC based system
> 
>> machine is using FSP or BMC as the hardware manager?
> 
> You can check in device tree. If `fsps` node exists then its FSP system.
> if `bmc` node exists then its BMC system.
> 

Indeed, I already found it by looking at the DT for the machines I've access to.

For FSP-based machines:

/sys/firmware/devicetree/base/fsps

For BMC-based machines:

/sys/firmware/devicetree/base/bmc/name

Bets regards,
-- 
Javier Martinez Canillas
Software Engineer - Desktop Hardware Enablement
Red Hat


More information about the Petitboot mailing list