linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/2] Enable capsule loader interface for efi firmware updating
@ 2015-10-05 20:15 Kweh, Hock Leong
  2015-10-05 20:15 ` [PATCH v7 1/2] efi: export efi_capsule_supported() function symbol Kweh, Hock Leong
       [not found] ` <1444076155-19295-1-git-send-email-hock.leong.kweh-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 2 replies; 13+ messages in thread
From: Kweh, Hock Leong @ 2015-10-05 20:15 UTC (permalink / raw)
  To: Matt Fleming, Greg Kroah-Hartman
  Cc: Ong Boon Leong, LKML, linux-efi-u79uwXL29TY76Z2rM5mHXA,
	Sam Protsenko, Peter Jones, Andy Lutomirski, Roy Franz,
	Borislav Petkov, James Bottomley, Linux FS Devel,
	Kweh, Hock Leong, Fleming Matt

From: "Kweh, Hock Leong" <hock.leong.kweh-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

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.

---
NOTE:
If Matt agrees with this design, [PATCH v7 1/1] will be squash into his
[PATCH 2/2]: https://lkml.org/lkml/2014/10/7/391 for submitting

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 (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 |  336 +++++++++++++++++++++++++++++
 4 files changed, 348 insertions(+)
 create mode 100644 drivers/firmware/efi/efi-capsule-loader.c

--
1.7.9.5

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

end of thread, other threads:[~2015-10-11 19:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-05 20:15 [PATCH v7 0/2] Enable capsule loader interface for efi firmware updating Kweh, Hock Leong
2015-10-05 20:15 ` [PATCH v7 1/2] efi: export efi_capsule_supported() function symbol Kweh, Hock Leong
2015-10-05 13:13   ` Borislav Petkov
     [not found]     ` <20151005131350.GA26329-K5JNixvcfoxupOikMc4+xw@public.gmane.org>
2015-10-05 15:19       ` Kweh, Hock Leong
2015-10-05 21:27         ` Bryan O'Donoghue
     [not found]           ` <5612EB38.2050209-SyKdqv6vbfZdzvEItQ6vdLNAH6kLmebB@public.gmane.org>
2015-10-06 10:53             ` Kweh, Hock Leong
     [not found]               ` <F54AEECA5E2B9541821D670476DAE19C4A864B5D-j2khPEwRog0FyVwBAnZdSLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-10-06 14:53                 ` Bryan O'Donoghue
     [not found]                   ` <5613E076.20508-SyKdqv6vbfZdzvEItQ6vdLNAH6kLmebB@public.gmane.org>
2015-10-07  2:01                     ` Kweh, Hock Leong
2015-10-07  8:27                       ` Bryan O'Donoghue
2015-10-10 22:02     ` Matt Fleming
2015-10-11 14:28       ` Kweh, Hock Leong
     [not found]         ` <F54AEECA5E2B9541821D670476DAE19C4A875128-j2khPEwRog0FyVwBAnZdSLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-10-11 19:03           ` Matt Fleming
     [not found] ` <1444076155-19295-1-git-send-email-hock.leong.kweh-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-10-05 20:15   ` [PATCH v7 2/2] efi: a misc char interface for user to update efi firmware 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).