Human readable POST code messages

Brad Chou bradc at hyvedesignsolutions.com
Fri Oct 2 00:34:28 AEST 2020



On Oct 1, 2020, at 3:25 AM, Patrick Williams <patrick at stwcx.xyz<mailto:patrick at stwcx.xyz>> wrote:

On Wed, Sep 30, 2020 at 07:42:47AM -0400, Oskar Senft wrote:
Hi Brad

I had thought about this before. The main issue I found is that the meaning
of the POST code messages are highly dependent on the particular platform
(i.e. BIOS) emitting them, i.e. there's no generic mapping that's always
correct.
Another more tricky problem is the same post code can mean different things while during different BIOS POST phase.
For example, suppose code 0x10 is “Power-on initialization of the host processor” in phase A;
The same code 0x10 may be “Check memory modules” in phase B.
There is no clue to tell when the POST is in what phase.


Having said that, given that there are only a limited number of BIOS
vendors, it might be possible to generate a few lists and make the BIOS
vendor a config option to select the right mapping.
I think maybe a generic YAML config is suitable for this situation.
The mapping table of codes and messages are illustrate in this file.
While anyone can easily “bbappend" it to meet their requirements.


What's your use case?

I would like to know more about the underlying use-case.  How do you
intend to expose these?  Is this "WithMessage" usable for Redfish and
the WebUI or is it only for internal use by CLI tools?
The idea it to show it on Redfish and WebUI with post code.
But one thing to consider is, the message can be longer and there are tons of post codes at each boot cycle.
This can mess up the Redfish or WebUI easily.
I still have no idea what is the best way to avoid this problem.

I think a bigger question is how we handle translation.  I think it is a
bad direction to have individual processes providing "human consumable"
strings because you need to translate them at some point.  We maybe
should look at a message registry design of some sort that can help
facilitate translation.

Putting very little thought behind it, we might want to define some kind
of interface (ex. MessageRegistry) with a method:

   Message(language, interface, property, value) -> string
Do you mean to translate the messages to another language of other country ?
The post code messages are something more like journalctl system logs.
Most of the contents are underlying BIOS things that only looks good for engineers.
I think there is no proper grammar to translate it to other languages.


On Wed, Sep 30, 2020, 7:23 AM Brad Chou <bradc at hyvedesignsolutions.com<mailto:bradc at hyvedesignsolutions.com>>
wrote:

Hi,

Is it possible to implement an interface that decode each post code into a
manful string ?

For example, if code 0x10 is mapped to “Power-on initialization of the
host processor”.

Then, in the
phosphor-dbus-interfaces/xyz/openbmc_project/State/Boot/PostCode.interface.yaml,

We have the GetPostCodes method, that can return the post codes “0x10”.

Can we add another method GetPostCodesWithMessage to return the post code
0x10 and its human readable message “Power-on initialization of the host
processor” ?



Thanks.


--
Patrick Williams

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20201001/53a3f13b/attachment-0001.htm>


More information about the openbmc mailing list