linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Jones <pjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: "Kweh,
	Hock Leong"
	<hock.leong.kweh-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>,
	Sam Protsenko
	<semen.protsenko-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Matt Fleming
	<matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>,
	Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	"Ong,
	Boon Leong"
	<boon.leong.ong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface
Date: Fri, 6 Mar 2015 16:39:12 -0500	[thread overview]
Message-ID: <20150306213912.GA8020@fenchurch.internal.datastacks.com> (raw)
In-Reply-To: <F54AEECA5E2B9541821D670476DAE19C2B8AC9DD-j2khPEwRog0FyVwBAnZdSLfspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Tue, Feb 24, 2015 at 12:49:09PM +0000, Kweh, Hock Leong wrote:
> Hi All,
> 
> After some internal discussion and re-design prototyping & testing on
> this efi capsule interface kernel module, I would like to start a discussion
> here on the new idea and wish to get input for the implementation and
> eventually upstream.

So do we actually *need* a kernel interface to UpdateCapsule?  We've
already got an implementation in progress where we use my ESRT patch to
figure out what firmwares we can update, and we schedule them and do the
update during boot up before the normal bootloader is run.  That means
never having to call UpdateCapsule() after ExitBootServices() or
SetVirtualAddressMap() have been called, and only doing it across
reboots that UEFI is performing itself.  It also means never having to
do it with multiple CPUs running.

I've posted several revisions of the ESRT patch to linux-efi , and right
now we're just waiting on the UEFI 2.5 spec to be finalized before I
send a final copy to Matt.  The command line tool and the code to apply
the firmwares during boot are at https://github.com/rhinstaller/fwupdate
and there's a GNOME-based UI in progress at
https://github.com/hughsie/fwupd (yes we apparently stink at naming
things.)

I'm not sure how making this go through the kernel will make things
better - it introduces a lot more things that can go wrong, and the only
benefit is one reboot where BootNext is set - which actually is
relatively fast even slow-POSTing machines.  After that the
UpdateCapsule+reboot to apply is *extremely* fast, because
applying capsule updates have to happen very very early in the boot-up
sequence.  (That early processing is /effectively/ a requirement,
since it has to happen before the block write locking on the SPI part is
done.)  So even on the machine that takes quite some time to POST, the
time that would be saved saved is less than 1% or so of the total update
time.

An early version of my code worked to update a machine I got from your
employer, FWIW - right now we're adding API and fixing up implementation
bits I made specifically to that one proof-of-concept scenario, and
there's some API parts that are in UEFI 2.5 draft releases that we're
not quite handling yet.  However, there's code there that's already been
checked in which has successfully applied system firmware updates
without having a kernel interface to UpdateCapsule().

So again: do we really need or want to do this?

-- 
        Peter

  parent reply	other threads:[~2015-03-06 21:39 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <F54AEECA5E2B9541821D670476DAE19C2B8AC95C@PGSMSX102.gar.corp.intel.com>
     [not found] ` <F54AEECA5E2B9541821D670476DAE19C2B8AC95C-j2khPEwRog0FyVwBAnZdSLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-24 12:49   ` Re: [PATCH v2 3/3] efi: Capsule update with user helper interface Kweh, Hock Leong
2015-02-25 11:47     ` Borislav Petkov
     [not found]       ` <20150225114747.GC3226-fF5Pk5pvG8Y@public.gmane.org>
2015-02-25 12:38         ` Kweh, Hock Leong
2015-02-25 12:49           ` Borislav Petkov
2015-02-26 15:30       ` Andy Lutomirski
     [not found]         ` <CALCETrVk8GJSzOyRu3Jr-72Tp79XzunGg9T-_70ngTPnG4YZqQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-26 15:54           ` Borislav Petkov
2015-03-02 11:24             ` Matt Fleming
     [not found]     ` <F54AEECA5E2B9541821D670476DAE19C2B8AC9DD-j2khPEwRog0FyVwBAnZdSLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-06 21:39       ` Peter Jones [this message]
     [not found]         ` <20150306213912.GA8020-FS9oOTXHwv9t4tGkRPVz9tcb/sdHg95EuydrBrBl+0sAvxtiuMwx3w@public.gmane.org>
2015-03-06 21:49           ` Roy Franz
     [not found]             ` <CAFECyb8oD+tjmwaR11PRZ_0K6ddYW5TE9+L1tVnMFE2yHHCg0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-06 22:17               ` Peter Jones
2015-03-10 12:26           ` Matt Fleming
2015-03-10 15:21             ` Peter Jones
     [not found]               ` <20150310152155.GB1208-FS9oOTXHwv9t4tGkRPVz9tcb/sdHg95EuydrBrBl+0sAvxtiuMwx3w@public.gmane.org>
2015-03-10 15:26                 ` Andy Lutomirski
     [not found]                   ` <CALCETrXMvDqMvRf2yzRvpjHQB5pip5zNiihAccCc9Sm5UWGysg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-10 15:40                     ` Peter Jones
2015-03-10 15:51                       ` Andy Lutomirski
2015-03-10 17:26                         ` Peter Jones
     [not found]                           ` <20150310172603.GF1208-FS9oOTXHwv9t4tGkRPVz9tcb/sdHg95EuydrBrBl+0sAvxtiuMwx3w@public.gmane.org>
2015-03-10 17:31                             ` Andy Lutomirski
     [not found]                         ` <CALCETrUDuTt_BK1JSFU=_EEujpm1ekzmkte-c3vxuRW7hWPUPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-12 22:47                           ` Matt Fleming
     [not found]                             ` <20150312224754.GD24174-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-03-13 14:42                               ` Greg Kroah-Hartman
2015-03-16 15:35                                 ` Andy Lutomirski
2015-03-02 10:59 Kweh, Hock Leong
     [not found] ` <F54AEECA5E2B9541821D670476DAE19C2B8AD9CA-j2khPEwRog0FyVwBAnZdSLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-02 12:29   ` Matt Fleming
2015-03-03  5:56     ` Kweh, Hock Leong
2015-03-03 20:37       ` Andy Lutomirski
     [not found]         ` <CALCETrXfjbKcYSSRQXZbam7TgHU34LXM0BhvMuba_vYyCCPTig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-03 20:49           ` Borislav Petkov
2015-03-03 21:56             ` Andy Lutomirski
2015-03-05  9:18           ` Kweh, Hock Leong
     [not found]             ` <F54AEECA5E2B9541821D670476DAE19C2B8AF4F2-j2khPEwRog0FyVwBAnZdSLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-05 23:08               ` Andy Lutomirski
     [not found]                 ` <CALCETrWKwQVe46gASNbb0miwcuHe+wirVSO-pQt6uF-Jd6e-bw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-06  8:13                   ` Borislav Petkov
2015-03-06 11:41                     ` Kweh, Hock Leong
     [not found]                       ` <F54AEECA5E2B9541821D670476DAE19C2B8AF844-j2khPEwRog0FyVwBAnZdSLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-06 14:47                         ` Borislav Petkov
2015-03-06 12:20                   ` Kweh, Hock Leong
2015-03-06 19:05                     ` Andy Lutomirski

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=20150306213912.GA8020@fenchurch.internal.datastacks.com \
    --to=pjones-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=boon.leong.ong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=hock.leong.kweh-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
    --cc=matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org \
    --cc=ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=semen.protsenko-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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).