openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Williams <patrick@stwcx.xyz>
To: Oskar Senft <osk@google.com>
Cc: Brad Chou <bradc@hyvedesignsolutions.com>,
	"openbmc@lists.ozlabs.org" <openbmc@lists.ozlabs.org>
Subject: Re: Human readable POST code messages
Date: Wed, 30 Sep 2020 14:25:39 -0500	[thread overview]
Message-ID: <20200930192539.GB6152@heinlein> (raw)
In-Reply-To: <CABoTLcQQFTCnyv0xxtHoDNQDYOF3JeBrFah2fFjk1BRG+WB-GQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]

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.
> 
> 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.
> 
> 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?

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

> On Wed, Sep 30, 2020, 7:23 AM Brad Chou <bradc@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-09-30 19:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 11:07 Human readable POST code messages Brad Chou
2020-09-30 11:42 ` Oskar Senft
2020-09-30 19:25   ` Patrick Williams [this message]
2020-10-01 14:34     ` Brad Chou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200930192539.GB6152@heinlein \
    --to=patrick@stwcx.xyz \
    --cc=bradc@hyvedesignsolutions.com \
    --cc=openbmc@lists.ozlabs.org \
    --cc=osk@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).