From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=google.com (client-ip=2a00:1450:4864:20::536; helo=mail-ed1-x536.google.com; envelope-from=osk@google.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="AVJRnqcA"; dkim-atps=neutral Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47d1G833zYzDqRf for ; Wed, 18 Dec 2019 14:49:03 +1100 (AEDT) Received: by mail-ed1-x536.google.com with SMTP id r21so486502edq.0 for ; Tue, 17 Dec 2019 19:49:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kZvdw5e2BR6apN4ts1vn3He2wcJtPFRdqgCbJUDtMgY=; b=AVJRnqcAo/4H6Bp7OT44772xqKg5Mji8wNMM9MUt8eyNuK2kUEx/RJwEYIGWYBoRVI nE/X59jJadfzmEqp88wtZ3AVUWJ1qpV2ImszyjBRxseg6dhM4yKzqEy9RpKcT0RsyDKb hN6ombfXAFoLUnYRRemontEaaUu8BNy1Tu4t0tC0MyEBf2c40y9hYLU6JbaVIZ8oXLey XBfOGVaP013zvmS6kIZZ9v2rDvsOM44R0xnrxaCdN2e0mQTcf1x5tjZ/StVosGgUmdks pVZt0wZz2XPr/ygRKR8DwxMBfICL3UEfwEaisq6lLDrSxfA2RRd7gfcCkXgONHfXSbwa LY2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kZvdw5e2BR6apN4ts1vn3He2wcJtPFRdqgCbJUDtMgY=; b=gG901mf3PRvQlKaY70LG+6+xKtfxhprA9ydvEOC+zXU4HOU4VhDGeLqKR+DveWl0Z2 7DsPk3/WorYPBy1LbzWhv74Wz9xaKvmh7EMsCoxEfU9U/uGhplWylZfycJZyWw4pXKP+ 7kmoQHNlTc50iWuSxhJYTbPFvNg1kxK5R9/w0KxPDXbTpO1LWcsN9hgJuKUrH2n+m7YS mSC5sHwsY3iNFogu8rt6GtyQ8mXmf5N6po7rfKh6A2dlIO5R/DIWVC8hAVrzZyu5huE4 MZrJCpny6Z9sRcgU70t8/bydpn5O8qTKi+BdlCIy/aHHIhgXkzHAcFOHVu0WWcSpKSro Bugg== X-Gm-Message-State: APjAAAVKrUMNXUF5BJvkyrfxUk8klltuz/XVe25PMOBF7oc8PMmxbtEL wYeFxL+MMd3Ek6W0Jh23iNLb7yy8LEqgvyqCkFqPfg== X-Google-Smtp-Source: APXvYqwMJ0ihj48xA5rDUgj6/5Tb2rwVQwkHbcfn2MaKETrcjfqmCrzjf6PHe7TdT+n0Gar/U+eKiiDoKNtIHuWv5KQ= X-Received: by 2002:a05:6402:1d9a:: with SMTP id dk26mr1227453edb.37.1576640936857; Tue, 17 Dec 2019 19:48:56 -0800 (PST) MIME-Version: 1.0 References: <95F85EE0-7D7A-41CD-A9B3-69ACC271087C@fb.com> In-Reply-To: From: Oskar Senft Date: Tue, 17 Dec 2019 22:48:40 -0500 Message-ID: Subject: Re: Bios upgrade To: CS20 CTCchien Cc: Vijay Khemka , OpenBMC Maillist Content-Type: multipart/alternative; boundary="000000000000fb5d900599f252c4" X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Dec 2019 03:49:05 -0000 --000000000000fb5d900599f252c4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cool, thanks! Do you have the device tree snippet (or a reference to the DTS) handy by any chance? Oskar. On Tue, Dec 17, 2019 at 9:29 PM CS20 CTCchien wrote: > Hi, > > > > Yes, I just echo string to device node to bind and unbind. > > c0000000 is the FIU address in my system > > > > B.R. > > Medad > > *From:* Oskar Senft > *Sent:* Wednesday, December 18, 2019 10:23 AM > *To:* CS20 CTCchien > *Cc:* Vijay Khemka ; OpenBMC Maillist < > openbmc@lists.ozlabs.org> > *Subject:* Re: Bios upgrade > > > > Hi > > > > How do you do the rescan? That was the part I was curious about :-D > > > > Is it this ( > https://github.com/Nuvoton-Israel/openbmc/blob/runbmc/meta-phosphor/nuvot= on-layer/recipes-phosphor/ipmi/phosphor-ipmi-flash/bios-update.sh#L38 > > )? > > cd /sys/bus/platform/devices/c0000000.fiu/driver > > echo -n "c0000000.fiu" > unbind > > echo -n "c0000000.fiu" > bind > > > > If so, what's the magic "c0000000.fiu"? > > > > Thanks > > Oskar > > > > On Tue, Dec 17, 2019 at 7:33 PM CS20 CTCchien > wrote: > > Hi, > > > > We have a gpio which could control the MUX > > When I want to do BIOS upgrade, I will shut down the host and operate the > gpio, and rescan, then BIOS flash will be accessible from BMC now. > > > > B.R. > > Medad > > > > *From:* Oskar Senft > *Sent:* Wednesday, December 18, 2019 4:57 AM > *To:* CS20 CTCchien > *Cc:* Vijay Khemka ; OpenBMC Maillist < > openbmc@lists.ozlabs.org> > *Subject:* Re: Bios upgrade > > > > Hi > > > > How did you configure the BIOS flash device? I assume via the device tree= ? > I haven't tested this in a while, but I seem to remember that if the BIOS > SPI flash is not accessible Linux doesn't "detect" the device and doesn't > create the MTD, i.e. it's not accessible from the BMC. This can be the ca= se > if the mux between BMC, PCH and BIOS SPI flash) is configured to connect > the SPI flash to the BMC at the time the BMC boots. Or is there a way to > make BMC's Linux "rescan" for SPI flash chips at runtime? > > > > Thanks > > Oskar. > > > > On Tue, Dec 17, 2019 at 12:38 AM CS20 CTCchien > wrote: > > Hi Vijay, > > > > You could build a host daemon and a ipmi library on BMC from > phosphor-ipmi-flash > > Here is the link I implement BIOS upgrade on my system > > > https://github.com/Nuvoton-Israel/openbmc/tree/runbmc/meta-phosphor/nuvot= on-layer/recipes-phosphor/ipmi > > . > > > > You need to prepare a BIOS image and a signature file for this BIOS > > After you execute the command on host, ipmid in BMC will launch a script > to upgrade BIOS. > > > > For example, > > sudo ./burn_my_bmc --command update --interface ipmipci --image BIOS.img > --sig BIOS.img.sig --type static > > > > > > B.R. > > Medad > > *From:* Vijay Khemka > *Sent:* Tuesday, December 17, 2019 8:16 AM > *To:* OpenBMC Maillist > *Subject:* Bios upgrade > > > > Hi, > > I am looking for bios upgrade from BMC. I looked at phosphor-ipmi-flash > but > > couldn=E2=80=99t figure out how to use this for bios upgrade. I checked f= ew old > mails > > where oskar was asking about using user space application instead of > kernel. > > Can anyone please give steps to use any existing kernel driver or user > space > > Application for upgrading host firmware. > > > > Regards > > -Vijay > ------------------------------ > > The privileged confidential information contained in this email is > intended for use only by the addressees as indicated by the original send= er > of this email. If you are not the addressee indicated in this email or ar= e > 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 thi= s > email irrelevant to the official business of Nuvoton shall be deemed as > neither given nor endorsed by Nuvoton. > > ------------------------------ > > The privileged confidential information contained in this email is > intended for use only by the addressees as indicated by the original send= er > of this email. If you are not the addressee indicated in this email or ar= e > 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 thi= s > email irrelevant to the official business of Nuvoton shall be deemed as > neither given nor endorsed by Nuvoton. > > ------------------------------ > The privileged confidential information contained in this email is > intended for use only by the addressees as indicated by the original send= er > of this email. If you are not the addressee indicated in this email or ar= e > 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 thi= s > email irrelevant to the official business of Nuvoton shall be deemed as > neither given nor endorsed by Nuvoton. > --000000000000fb5d900599f252c4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Cool, thanks!

Do you have the device tr= ee snippet (or a reference to the DTS) handy by any chance?

=
Oskar.

On Tue, Dec 17, 2019 at 9:29 PM CS20 CTCchien <CTCCHIEN@nuvoton.com> wrote:

Hi,

=C2=A0

Yes, I just echo string to device node to bi= nd and unbind.

c0000000 is the FIU address in my system<= /u>

=C2=A0

B.R.

Medad

From: Oskar Senft <osk@google.com>
Sent: Wednesday, December 18, 2019 10:23 AM
To: CS20 CTCchien <CTCCHIEN@nuvoton.com>
Cc: Vijay Khemka <vijaykhemka@fb.com>; OpenBMC Maillist <openbmc@lists.ozlabs.org&g= t;
Subject: Re: Bios upgrade

=C2=A0

Hi

=C2=A0

How do you do the rescan? That = was the part I was curious about :-D

=C2=A0

cd /sys/bus/platform/devices/c0= 000000.fiu/driver

echo -n "c0000000.fiu"= ; > unbind

echo -n "c0000000.fiu"= ; > bind

=C2=A0

If so, what's the magic &qu= ot;c0000000.fiu"?

=C2=A0

Thanks

Oskar

=C2=A0

On Tue, Dec 17, 2019 at 7:33 PM= CS20 CTCchien <CTCCHIEN@nuvoton.com> wrote:

Hi,

=C2=A0=

We have a gpio which could control the MUX

When I want to do BIOS upgrade, I will shut = down the host and operate the gpio, and rescan, then BIOS flash will be accessible from BMC now.=

=C2=A0=

B.R.

Medad<= /u>

=C2=A0=

From: Oskar Senft <osk@google.c= om>
Sent: Wednesday, December 18, 2019 4:57 AM
To: CS20 CTCchien <CTCCHIEN@nuvoton.com>
Cc: Vijay Khemka <vijaykhemka@fb.com>; OpenBMC Maillist <openbmc@lists.ozlabs.org&g= t;
Subject: Re: Bios upgrade
<= /span>

=C2=A0

Hi

=C2=A0

How did you configure the BIOS = flash device? I assume via the device tree? I haven't tested this in a = while, but I seem to remember that if the BIOS SPI flash is not accessible Linux doesn't "detect" the device and does= n't create the MTD, i.e. it's not accessible from the BMC. This can= be the case if the mux between BMC, PCH and BIOS SPI flash) is configured = to connect the SPI flash to the BMC at the time the BMC boots. Or is there a way to make BMC's Linux "rescan" for SP= I flash chips at runtime?

=C2=A0

Thanks

Oskar.

=C2=A0

On Tue, Dec 17, 2019 at 12:38 A= M CS20 CTCchien <CTCCHIEN@nuvoton.com> wrote:

= Hi Vijay,

= =C2=A0

= You could build a host daemon and a ipmi library on BMC from phosphor-ipmi-= flash

= Here is the link I implement BIOS upgrade on my system

https://github.com/Nuvoton-Israel/openbmc/tree/runbmc/me= ta-phosphor/nuvoton-layer/recipes-phosphor/ipmi.

= =C2=A0

= You need to prepare a BIOS image and a signature file for this BIOS<= span lang=3D"EN-US">

= After you execute the command on host, ipmid in BMC will launch a script to= upgrade BIOS.

= =C2=A0

= For example,

= sudo=C2=A0 ./burn_my_bmc --command update --interface ipmipci --image BIOS.= img --sig BIOS.img.sig --type static<= /u>

= =C2=A0

= =C2=A0

= B.R.

= Medad

Fro= m: Vijay Khemka &l= t;vijaykhemka@fb.co= m>
Sent: Tuesday, December 17, 2019 8:16 AM
To: OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Bios upgrade

=C2=A0

Hi,

I am l= ooking for bios upgrade from BMC. I looked at phosphor-ipmi-flash but

couldn= =E2=80=99t figur= e out how to use this for bios upgrade. I checked few old mails

where = oskar was asking about using user space application instead of kernel.

Can an= yone please give steps to use any existing kernel driver or user space

Applic= ation for upgrading host firmware.

=C2=A0=

Regard= s

-Vijay=


The privileged confidential information contained in thi= s email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the address= ee 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 a= nd delete all copies of it from your computer and network server immediately. Your cooperation is highly a= ppreciated. It is advised that any unauthorized use of confidential informa= tion of Nuvoton is strictly prohibited; and any information in this email i= rrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.


The privileged confidential information contained in thi= s email is intended for use only by the addressees as indicated by the orig= inal sender of this email. If you are not the addressee indicated in this email or are not responsible for deliv= ery of the email to such a person, please kindly reply to the sender indica= ting this fact and delete all copies of it from your computer and network s= erver immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confiden= tial information of Nuvoton is strictly prohibited; and any information in = this email irrelevant to the official business of Nuvoton shall be deemed a= s neither given nor endorsed by Nuvoton.


The privileged confidential information contained in this emai= l is intended for use only by the addressees as indicated by the original s= ender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of t= he email to such a person, please kindly reply to the sender indicating thi= s fact and delete all copies of it from your computer and network server im= mediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential infor= mation 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.
--000000000000fb5d900599f252c4--