From: Michael Walle <michael@walle.cc>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] cmd: fru: Add support for FRU commands
Date: Tue, 22 Oct 2019 16:43:32 +0200 [thread overview]
Message-ID: <1344640054fad582c19cf1fa96ce0d31@walle.cc> (raw)
In-Reply-To: <4e723b74-c2ce-3da8-8ee3-9691cfa49145@monstr.eu>
Am 2019-10-22 15:45, schrieb Michal Simek:
> On 22. 10. 19 15:09, Michael Walle wrote:
>> Am 2019-10-14 15:29, schrieb Michal Simek:
>>> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>>>
>>> This patch adds support for fru commands "fru capture" and "fru
>>> display".
>>> The fru capture parses the FRU table present at an address and stores
>>> in a
>>> structure for later use. The fru display prints the content of
>>> captured
>>> structured in a readable format.
>>>
>>> As of now, it supports only common header and board area of FRU.
>>> Also, it
>>> supports only English language code and ASCII8 format.
>>>
>>> fru_data variable is placed to data section because fru parser can be
>>> called very early before bss is initialized. And also information
>>> needs to
>>> be shared that's why it is exported via header.
>>
>> Wouldn't it make more sense to have a level of indirection so other
>> "fru" formats might be supported as well. As far as I can see, only
>> "your" type of FRU data is supported by this command and there is now
>> way to extend it.
>
> Current code is just showing board information which is what it is in
> FRU spec and it is common for all. There is no any OEM specific field
> now.
I didn't meant the (I guess it is the IPMI) FRU spec. But there are also
other specifications like the PICMG Embedded EEPROM [1]. What I wanted
to say is, that if there will be a new "fru" command, it might make
sense to have it more generic. Otherwise, we have the fru command which
can only display IPMI FRU spec compliant stuff and in the future, maybe
a "picmg" command, which can only display PICMG EEPROM content.
>> Also why do the user have to manually do a "fru capture"? The use case
>> is to display any FRU data, correct? So from a users perspective a
>> "fru
>> display" be sufficient to display the data.
>
> The code was written for using fru board detection code where capture
> part can be performed without displaying results. Simply because you
> need to find where you are running to be able to know which device to
> use for showing results.
What does a "fru capture" do besides maybe printing an error. Briefly
looking at the code, I didn't find anything else. (It sets the fru_data
stuff which is used in "fru display" of course).
> It means internally it needs to be divided.
> That's going to second point if make sense to have two separate
> commands
> or just one.
> And it should be ok to have only one command till there is a need to do
> it differently.
There might be more commands, but IMHO it should be sufficient to run
"fru display" to print the data. If I read the code correctly, you have
to do a "fru capture; fru display" at the moment; btw in the "fru
display" error it reads "please run fru parse", I guess that is a typo.
-michael
[1] https://www.picmg.org/wp-content/uploads/PICMG_EeeP_R1_0.pdf
next prev parent reply other threads:[~2019-10-22 14:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 13:29 [U-Boot] [PATCH 0/3] cmd: fru: Add simple FRU generator and parser Michal Simek
2019-10-14 13:29 ` [U-Boot] [PATCH 1/3] cmd: fru: Add support for FRU commands Michal Simek
2019-10-21 23:46 ` Simon Glass
2019-10-22 12:57 ` Michal Simek
2019-10-22 12:40 ` Jean-Jacques Hiblot
2019-10-22 12:54 ` Michal Simek
2019-10-22 13:09 ` Michael Walle
2019-10-22 13:45 ` Michal Simek
2019-10-22 14:43 ` Michael Walle [this message]
2019-10-23 7:11 ` Michal Simek
2019-10-14 13:29 ` [U-Boot] [PATCH 2/3] cmd: fru: Add basic fru format generator Michal Simek
2019-10-14 13:29 ` [U-Boot] [PATCH 3/3] arm64: versal: Enable FRU command Michal Simek
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=1344640054fad582c19cf1fa96ce0d31@walle.cc \
--to=michael@walle.cc \
--cc=u-boot@lists.denx.de \
/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