openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Thang Nguyen <thang@amperemail.onmicrosoft.com>
To: Jie Yang <jjy@google.com>
Cc: "Garrett, Mike \(HPE Server Firmware\)" <mike.garrett@hpe.com>,
	Andrei Kartashev <a.kartashev@yadro.com>,
	CS20 CHLi30 <chli30@nuvoton.com>,
	openbmc <openbmc@lists.ozlabs.org>
Subject: Re: Read smbios2 file failed
Date: Fri, 17 Sep 2021 20:40:03 +0700	[thread overview]
Message-ID: <7528c7d5-0669-1bc8-5b82-39fad3c9f5a8@amperemail.onmicrosoft.com> (raw)
In-Reply-To: <CAAcJOwv4ieTTcYm60M043iXiWiC9=KNK31Pb7jheedqhr84VLg@mail.gmail.com>

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

Thanks Jia for your information

On 17/09/2021 05:36, Jie Yang wrote:
> Hi,
>
> Actually I added an ipmi blob interface to 
> smbios-mdr https://github.com/openbmc/smbios-mdr/tree/master/src/smbios-ipmi-blobs 
> <https://github.com/openbmc/smbios-mdr/tree/master/src/smbios-ipmi-blobs>. 
> With this interface you can send the smbios tables to BMC either 
> through LinuxBoot or host. The LinuxBoot code 
> https://github.com/u-root/u-root/tree/master/cmds/exp/smbios_transfer 
> <https://github.com/u-root/u-root/tree/master/cmds/exp/smbios_transfer>. 
> Writing and committing to this blob will generate the MDR header.
>
> -Jie
>
> On Thu, Sep 16, 2021 at 4:19 AM Thang Nguyen 
> <thang@amperemail.onmicrosoft.com 
> <mailto:thang@amperemail.onmicrosoft.com>> wrote:
>
>     Thanks Tim, Mike and Andrei for very useful information. We can
>     make it
>     work by adding MDRv2 header.
>
>     I am finding some information about the IPMI blobs commands. I can
>     see
>     some notes at
>
>     https://github.com/openbmc/docs/blob/master/designs/binarystore-via-blobs.md
>     <https://github.com/openbmc/docs/blob/master/designs/binarystore-via-blobs.md>
>
>     https://github.com/openbmc/phosphor-ipmi-blobs/blob/master/README.md
>     <https://github.com/openbmc/phosphor-ipmi-blobs/blob/master/README.md>
>
>     But I have not found more description about the IPMI blob commands
>     like
>     NetFn, Func, ... that I can send a file from Host to BMC. Do you have
>     any information about them?
>
>
>     Thanks,
>
>     Thang Q. Nguyen
>
>     On 16/09/2021 09:40, CS20 CHLi30 wrote:
>     > Hi Thang,
>     > Did you try to use smbios_entry_point or DMI from host to BMC
>     /var/lib/smbios/smbios2 for parsing?
>     >
>     > You can refer this sysfs-firmware-dmi-tables as below:
>     >
>     > The firmware provides DMI structures as a packed list of data
>     referenced by a SMBIOS table entry point.
>     > The SMBIOS entry point contains general information, like SMBIOS
>     version, DMI table size, etc.
>     > The structure, content and size of SMBIOS entry point is
>     dependent on SMBIOS version.
>     >
>     > The format of SMBIOS entry point and DMI structures can be read
>     in SMBIOS specification.
>     > The dmi/tables provides raw SMBIOS entry point and DMI tables
>     through sysfs as an alternative to utilities reading them from
>     /dev/mem.
>     >
>     > The raw SMBIOS entry point and DMI table are presented as binary
>     attributes and are accessible via:
>     > /sys/firmware/dmi/tables/smbios_entry_point
>     > /sys/firmware/dmi/tables/DMI
>     >
>     > Best regards,
>     > Tim
>     >
>     > -----Original Message-----
>     > From: openbmc [mailto:openbmc-bounces+chli30
>     <mailto:openbmc-bounces%2Bchli30>=nuvoton.com@lists.ozlabs.org
>     <mailto:nuvoton.com@lists.ozlabs.org>] On Behalf Of Garrett, Mike
>     (HPE Server Firmware)
>     > Sent: Wednesday, September 15, 2021 9:19 PM
>     > To: Andrei Kartashev <a.kartashev@yadro.com
>     <mailto:a.kartashev@yadro.com>>; Thang Nguyen
>     <thang@amperemail.onmicrosoft.com
>     <mailto:thang@amperemail.onmicrosoft.com>>; openbmc
>     <openbmc@lists.ozlabs.org <mailto:openbmc@lists.ozlabs.org>>
>     > Subject: RE: Read smbios2 file failed
>     >
>     > We recently did the same thing and got it working.  All you have
>     to do is take the RAW smbios records blob in binary form
>     (delivered as noted below in whatever way you choose) and prepend
>     a specific header:
>     https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fsmbios-mdr%2Fblob%2F33c948a473bd273fea0cff82d4c99b70b7784be6%2Finclude%2Fsmbios_mdrv2.hpp%23L114&amp;data=04%7C01%7Cchli30%40nuvoton.com%7C81a4bd29e4904bf4d84608d978510b92%7Ca3f24931d4034b4a94f17d83ac638e07%7C0%7C0%7C637673526954552742%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=oQwcozsSoGlgSFwztPFV3FAoPpRZGYoZ7pc0%2BxDi1MA%3D&amp;reserved=0
>     <https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenbmc%2Fsmbios-mdr%2Fblob%2F33c948a473bd273fea0cff82d4c99b70b7784be6%2Finclude%2Fsmbios_mdrv2.hpp%23L114&amp;data=04%7C01%7Cchli30%40nuvoton.com%7C81a4bd29e4904bf4d84608d978510b92%7Ca3f24931d4034b4a94f17d83ac638e07%7C0%7C0%7C637673526954552742%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=oQwcozsSoGlgSFwztPFV3FAoPpRZGYoZ7pc0%2BxDi1MA%3D&amp;reserved=0>
>     >
>     > It is a little bit fragile as it introduces a dependency on the
>     file download logic to write a non-standard header defined in
>     another service that could potentially change.
>     >
>     > Mike
>     >
>     >> -----Original Message-----
>     >> From: openbmc <openbmc-
>     >> bounces+mike.garrett=hpe.com@lists.ozlabs.org
>     <mailto:hpe.com@lists.ozlabs.org>> On Behalf Of Andrei
>     >> Kartashev
>     >> Sent: Wednesday, September 15, 2021 3:17 AM
>     >> To: Thang Nguyen <thang@amperemail.onmicrosoft.com
>     <mailto:thang@amperemail.onmicrosoft.com>>; openbmc
>     >> <openbmc@lists.ozlabs.org <mailto:openbmc@lists.ozlabs.org>>
>     >> Subject: Re: Read smbios2 file failed
>     >>
>     >> I don't know what is format of "dmidecode --dump-bin", but if
>     it just
>     >> raw dump of smbios then you only need to add mdr header.
>     >>
>     >> See answer for the same question here:
>     >> INVALID URI REMOVED
>     >> 021-July/026882.html__;!!NpxR!2w0FkPs2KyaB6XOvB8et52bWKqAMLImmL-
>     >> iUk9A_zZbJ8WLhMeXdvRAp-pcxt8Q$
>     >>
>     >> On Wed, 2021-09-15 at 12:41 +0700, Thang Nguyen wrote:
>     >>> Hi Andrei,
>     >>>
>     >>> I see output of "dmidecode --dump-bin" follows SMBIOS
>     specification.
>     >>> As
>     >>> the data for smbios-mdr does not follow this, do you know
>     about the
>     >>> document or any information I can reference to prepare data to
>     send
>     >>> to BMC??
>     >>>
>     >>>
>     >>> Best Regards,
>     >>>
>     >>> Thang Q. Nguyen
>     >>>
>     >>> On 14/09/2021 15:51, Andrei Kartashev wrote:
>     >>>> No, it is not same as "dmidecode --dump-bin".
>     >>>>
>     >>>> On Tue, 2021-09-14 at 13:46 +0700, Thang Nguyen wrote:
>     >>>>> On 13/09/2021 23:56, Andrei Kartashev wrote:
>     >>>>>> You need to somehow deliver smbios data image to BMC. This
>     >>>>>> means, your BIOS should implementat some logic to transfer
>     >>>>>> this data.
>     >>>>>> For BMC side see example here:
>     >>>>>>
>     https://apc01.safelinks.protection.outlook.com/?url=https%3A%2
>     <https://apc01.safelinks.protection.outlook.com/?url=https%3A%2>
>     >>>>>> F%2Fgithub.com%2Fopenbmc%2Fintel-ipmi-&amp;data=04%7C01%7Cchli
>     >>>>>> 30%40nuvoton.com
>     <http://40nuvoton.com>%7C81a4bd29e4904bf4d84608d978510b92%7Ca3f24931
>     >>>>>> d4034b4a94f17d83ac638e07%7C0%7C0%7C637673526954552742%7CUnknow
>     >>>>>> n%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik
>     >>>>>> 1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=cG6ZZzOSXkuUtcQuuoymsRdP
>     >>>>>> p24mINa%2FhCy%2BYhe%2FNmk%3D&amp;reserved=0
>     >> oem/blob/master/src/smbios
>     >>>>>> mdrv2handler.cpp
>     >>>>> Hi Andrei,
>     >>>>>
>     >>>>> What is the format of smbios data to transfer to BMC? Is it the
>     >>>>> same content of "dmidecode --dump-bin" command from Host Linux?
>     >> or
>     >>>>> anything special in formatting the content to send?
>     >>>>>
>     >>>>>> On Mon, 2021-09-13 at 17:40 +0300, Alexander Raih wrote:
>     >>>>>>> Hi guys, I am beginner in openbmc I build openbmc with
>     >>>>>>> smbios-mdr repository and I have error:
>     >>>>>>>
>     >>>>>>> Read data from flash error - Open MDRV2 table file failure
>     >>>>>>>
>     >>>>>>> There isnt file in /var/lib/smbios/smbios2
>     >>>>>>>
>     >>>>>>> How I can resolve this problem?
>     >>>>>>> Help me please!!!
>     >>
>     >> --
>     >> Best regards,
>     >> Andrei Kartashev
>     >>
>     > ________________________________
>     > ________________________________
>     >   The privileged confidential information contained in this
>     email is intended for use only by the addressees as indicated by
>     the original sender of this email. If you are not the addressee
>     indicated in this email or are not responsible for delivery of the
>     email to such a person, please kindly reply to the sender
>     indicating this fact and delete all copies of it from your
>     computer and network server immediately. Your cooperation is
>     highly appreciated. It is advised that any unauthorized use of
>     confidential information of Nuvoton is strictly prohibited; and
>     any information in this email irrelevant to the official business
>     of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
>

[-- Attachment #2: Type: text/html, Size: 12924 bytes --]

      reply	other threads:[~2021-09-17 13:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 14:40 Alexander Raih
2021-09-13 16:56 ` Andrei Kartashev
2021-09-14  6:46   ` Thang Nguyen
2021-09-14  8:51     ` Andrei Kartashev
2021-09-15  5:41       ` Thang Nguyen
2021-09-15  8:16         ` Andrei Kartashev
2021-09-15 13:18           ` Garrett, Mike (HPE Server Firmware)
2021-09-16  2:40             ` CS20 CHLi30
2021-09-16 11:18               ` Thang Nguyen
2021-09-16 22:36                 ` Jie Yang
2021-09-17 13:40                   ` Thang Nguyen [this message]

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=7528c7d5-0669-1bc8-5b82-39fad3c9f5a8@amperemail.onmicrosoft.com \
    --to=thang@amperemail.onmicrosoft.com \
    --cc=a.kartashev@yadro.com \
    --cc=chli30@nuvoton.com \
    --cc=jjy@google.com \
    --cc=mike.garrett@hpe.com \
    --cc=openbmc@lists.ozlabs.org \
    --subject='Re: Read smbios2 file failed' \
    /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

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