Fwd: [openbmc/phosphor-host-ipmid] BMC version should be BCD encoded (#89)

Patrick Williams patrick at stwcx.xyz
Wed Jun 22 07:45:12 AEST 2016


On Tue, Jun 21, 2016 at 11:18:52AM -0500, Adriana Kobylak wrote:
> Any thoughts on the concern about BMC version being decimal, so that the IPMI representation of the version in BCD does not match character by character the tag in github?
> Should we limit the tag numbering to a max digit of 9 which would match the decimal and BCD representation, should the tag be in hex, or there should not be any change and this is how it works, other?

The spec for "Get Device ID" has:

byte 4 : [0:6] Major Firmware Revision, binary encoded.
byte 5 : Minor Firmware Revision, BCD encoded.

It is very odd to me that the two are different but that is what the
spec says.  We appear to be doing everything correct for byte 4 (binary
encoded and mask off the 7th bit) but not doing it correct for byte 5.

https://github.com/openbmc/phosphor-host-ipmid/blob/eee949f14d921d84497f41df84ab7ae45a0d830d/apphandler.C#L190

I think we should just fix this for byte 5 and make it BCD as requested.
This would still allow us to support up to v7F.99, which is more than
enough.

Sample code to fix up:

    rev.minor = (rev.minor > 99 ? 99 : rev.minor);
    dev_id[DEVICE_FW] = rev.minor % 10 + (rev.minor / 10) * 16;

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20160621/81862d59/attachment.sig>


More information about the openbmc mailing list