public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Andrew Fish <afish@apple.com>
To: "Tomas Pilar (tpilar)" <tpilar@solarflare.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Self-replicating image
Date: Fri, 08 Feb 2019 09:16:22 -0800	[thread overview]
Message-ID: <0AB73E14-5641-428D-9E4A-1D504A65885F@apple.com> (raw)
In-Reply-To: <5c8dff3b-3bbf-f317-efa9-277bc05b8b10@solarflare.com>



> On Feb 8, 2019, at 6:42 AM, Tomas Pilar (tpilar) <tpilar@solarflare.com> wrote:
> 
> Hi,
> 
> I am currently pondering the most elegant way to implement capsule update for our devices that would work in the presence of multiple devices in the host.
> 
> Capsule allows embedding a driver that is executed prior to the update, which is very handy. Crypto library is quite large and would not fit into an OptionROM, so being able to supply FMP driver in the capsule is great.
> 
> However, if only one instance of the driver loads, the FMP upstream is currently written to support only one device per instance. So I wonder if there is a easy, neat way for my image to replicate on DriverBinding so that I end up with one instance per device.
> 


Tom,

The usually model in EFI is to have one driver handle multiple things. 

> It looks like I should be able to do it with gBS->LoadImage() and passing information about currently loaded image though I might have to CopyMem() the image itself to new location.
> 

gBS->LoadImage() will load and relocate the image to a malloced address of the correct memory type for the image. The inputs are just the source of the image, so no need to CopyMem() anything. gBS->StartImage() calls the entry point.

Thanks,

Andrew Fish

> Thoughts?
> 
> Cheers,
> Tom
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel



  reply	other threads:[~2019-02-08 17:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 14:42 Self-replicating image Tomas Pilar (tpilar)
2019-02-08 17:16 ` Andrew Fish [this message]
2019-02-08 17:59   ` Kinney, Michael D
2019-02-11 10:37     ` Tomas Pilar (tpilar)
2019-02-28  3:33       ` Kinney, Michael D
2019-02-28 10:48         ` Tomas Pilar (tpilar)

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-list 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=0AB73E14-5641-428D-9E4A-1D504A65885F@apple.com \
    --to=devel@edk2.groups.io \
    /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