linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kweh, Hock Leong" <hock.leong.kweh@intel.com>
To: Matt Fleming <matt@console-pimps.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ong Boon Leong <boon.leong.ong@intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-efi@vger.kernel.org,
	Sam Protsenko <semen.protsenko@linaro.org>,
	Peter Jones <pjones@redhat.com>,
	Andy Lutomirski <luto@amacapital.net>,
	Roy Franz <roy.franz@linaro.org>, Borislav Petkov <bp@alien8.de>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>,
	"Kweh, Hock Leong" <hock.leong.kweh@intel.com>,
	Fleming Matt <matt.fleming@intel.com>
Subject: [PATCH v6 0/2] Enable capsule loader interface for efi firmware updating
Date: Fri,  2 Oct 2015 05:05:52 +0800	[thread overview]
Message-ID: <1443733554-22743-1-git-send-email-hock.leong.kweh@intel.com> (raw)

From: "Kweh, Hock Leong" <hock.leong.kweh@intel.com>

Dear maintainers & communities,

This patchset is created on top of Matt's patchset:
1.)https://lkml.org/lkml/2014/10/7/390
"[PATCH 1/2] efi: Move efi_status_to_err() to efi.h"
2.)https://lkml.org/lkml/2014/10/7/391
"[PATCH 2/2] efi: Capsule update support"

It expose a misc char interface for user to upload the capsule binary and
calling efi_capsule_update() API to pass the binary to EFI firmware.

The steps to update efi firmware are:
1.) cat firmware.cap > /dev/efi_capsule_loader
2.) reboot

Any failed upload error message will be returned while doing "cat" through
Write() function call.

Tested the code with Intel Quark Galileo platform.

Thanks.

---
changelog v6:
* clean up on error handling for better code flow and review
* clean up on pr_err() for critical error only
* design taking care writing block that below PAGE_SIZE
* once error has occurred, design will return -EIO until file close
* document design expectations/scenarios in the code
* change the dynamic allocation cap_info struct to statically allocated

changelog v5:
* changed to new design without leveraging firmware_class API
* use misc_char device interface instead of sysfs
* error return through file Write() function call


Kweh, Hock Leong (2):
  efi: export efi_capsule_supported() function symbol
  efi: a misc char interface for user to update efi firmware

 drivers/firmware/efi/Kconfig              |   10 ++
 drivers/firmware/efi/Makefile             |    1
 drivers/firmware/efi/capsule.c            |    1
 drivers/firmware/efi/efi-capsule-loader.c |  246 +++++++++++++++++++++++++++++
 4 files changed, 258 insertions(+)
 create mode 100644 drivers/firmware/efi/efi-capsule-loader.c

-- 
1.7.9.5


             reply	other threads:[~2015-10-01 13:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 21:05 Kweh, Hock Leong [this message]
2015-10-01 21:05 ` [PATCH v6 1/2] efi: export efi_capsule_supported() function symbol Kweh, Hock Leong
2015-10-02 17:37   ` Borislav Petkov
2015-10-03  3:02     ` Kweh, Hock Leong
2015-10-03  8:59       ` Borislav Petkov
2015-10-01 21:05 ` [PATCH v6 2/2] efi: a misc char interface for user to update efi firmware Kweh, Hock Leong
2015-10-02 17:39   ` Borislav Petkov
2015-10-03 23:16   ` Andy Lutomirski
2015-10-02 17:37 ` [PATCH v6 0/2] Enable capsule loader interface for efi firmware updating Borislav Petkov
2015-10-03  3:18   ` Kweh, Hock Leong
2015-10-03  9:05     ` Borislav Petkov
2015-10-05 15:33       ` Kweh, Hock Leong
2015-10-05 19:07         ` Andy Lutomirski
2015-10-03  4:18   ` Andy Lutomirski
2015-10-03  9:08     ` Borislav Petkov

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=1443733554-22743-1-git-send-email-hock.leong.kweh@intel.com \
    --to=hock.leong.kweh@intel.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=boon.leong.ong@intel.com \
    --cc=bp@alien8.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=matt.fleming@intel.com \
    --cc=matt@console-pimps.org \
    --cc=pjones@redhat.com \
    --cc=roy.franz@linaro.org \
    --cc=semen.protsenko@linaro.org \
    /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).