linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v11 0/1] Enable capsule loader interface for efi firmware updating
@ 2016-01-29  4:39 Kweh, Hock Leong
  2016-01-29  4:39 ` [PATCH v11 1/1] efi: a misc char interface for user to update efi firmware Kweh, Hock Leong
  0 siblings, 1 reply; 7+ messages in thread
From: Kweh, Hock Leong @ 2016-01-29  4:39 UTC (permalink / raw)
  To: Matt Fleming, Greg Kroah-Hartman, Matt Fleming
  Cc: Ong Boon Leong, LKML, linux-efi, Sam Protsenko, Peter Jones,
	Andy Lutomirski, Roy Franz, Borislav Petkov, James Bottomley,
	Linux FS Devel, Anvin H Peter, Kweh, Hock Leong

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
file operation write() function call.

Tested the code with Intel Quark Galileo GEN1 platform.

Thanks.

---

changelog v11:
* rebase to v4.5-rc1
* correct vocabulary base on Bryan's comments
* Optimise ->pages & ->index code flow base on Matt's comments

changelog v10:
* rebase to v4.4
* added efi runtime services check at efi_capsule_loader_init()
* fixed checkpatch issues
* code clean up base on Borislav's comments

changelog v9:
* squash 2 patches to become 1 patch
* change function param to pass in cap_info instead of file structure
* perform both alloc inside efi_capsule_setup_info()
* change to use multiple exit labels instead of one function call
* further code clean up base on Matt's comments

changelog v8:
* further clean up on kunmap() & efi_free_all_buff_pages()
* design enhanced to support 1st few writes are less than efi header size
* removed support to padding capsule and flag error once the upload size
  bigger than header defined size

changelog v7:
* add successful message printed in dmesg
* shorten the code in efi_capsule_write() by splitting out
  efi_capsule_setup_info() & efi_capsule_submit_update() functions
* design added capability to support multiple file open action
* re-write those comments by following standard format
* design added the "uncomplete" error return through flush() file operation

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 (1):
  efi: a misc char interface for user to update efi firmware

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

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-15 16:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-29  4:39 [PATCH v11 0/1] Enable capsule loader interface for efi firmware updating Kweh, Hock Leong
2016-01-29  4:39 ` [PATCH v11 1/1] efi: a misc char interface for user to update efi firmware Kweh, Hock Leong
2016-02-08  5:43   ` Greg Kroah-Hartman
2016-02-08  9:50     ` Matt Fleming
2016-02-15 16:41       ` Greg Kroah-Hartman
2016-02-08 15:13   ` Matt Fleming
2016-02-15  6:46     ` Kweh, Hock Leong

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