From: "Laszlo Ersek" <lersek@redhat.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>,
Sean Brogan <sean.brogan@microsoft.com>,
"'Bret.Barkelew@microsoft.com'" <Bret.Barkelew@microsoft.com>,
Matthew Carlson <macarl@microsoft.com>
Cc: "Wang, Jian J" <jian.j.wang@intel.com>,
"Lu, XiaoyuX" <xiaoyux.lu@intel.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [edk2-devel] [Patch 3/5] CryptoPkg/Driver: Add Crypto PEIM, DXE, and SMM modules
Date: Thu, 30 Jan 2020 18:25:17 +0100 [thread overview]
Message-ID: <b1db8f28-524d-0917-b54d-f6a15c497118@redhat.com> (raw)
In-Reply-To: <E92EE9817A31E24EB0585FDF735412F5B9E81876@ORSMSX113.amr.corp.intel.com>
On 01/30/20 18:10, Kinney, Michael D wrote:
> 3) EDK II community defines a small number of profiles
> for the PEI, DXE, SMM versions of these modules and
> publishes released binaries for each profile. Platforms
> integrate the published binary modules. This may
> provide more services than are required for some platforms
> but has the advantage of using a released binary from
> the EDK II project and reducing build times. Once again,
> some guidance and/or tools may be required to help the
> EDK II community determine the right number of profiles
> and the services enabled in each profile.
This sounds super interesting; I didn't think of it!
The great property of profiles seems to be that they strike a middle
ground between space savings and call safety. Namely:
- let's say we define 4 profiles,
- each profile comes with its own *wrapper* crypto API lib instance,
- in each such lib instance, the wrapper functions for those PPI /
protocol member APIs that are disabled in the PCD are *also not
implemented*, thereby causing linkage failures if a module tries to use them
- given that there are only 4 profiles, a platform can exhaustively test
building against each, and find the smallest one that works -- and
repeatably so: it's never a "bad time" to attempt building against a
smaller profile!
- in the smallest applicable profile, some functions might be included
uselessly in the PPI / protocol providers -- but not too many. That's
why we didn't pick a larger profile. And whatever is included, will be
shared between consumers.
This should work even without distributing the PPI / protocol providers
in binary form.
I think this could be a valid use case for some library instances in
edk2 *not* to implement all functions from the library class header.
Thanks!
Laszlo
next prev parent reply other threads:[~2020-01-30 17:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 7:00 [Patch 0/5] CryptoPkg: Add modules that produce BaseCryptLib services Michael D Kinney
2020-01-30 7:00 ` [Patch 1/5] CryptoPkg/BaseCryptLib: Add X509ConstructCertificateStackV() Michael D Kinney
2020-02-04 7:31 ` Wang, Jian J
2020-01-30 7:00 ` [Patch 2/5] CryptoPkg: Add EDK II Crypto Protocols/PPIs/PCDs Michael D Kinney
2020-02-04 7:59 ` Wang, Jian J
2020-02-05 1:04 ` Michael D Kinney
2020-01-30 7:00 ` [Patch 3/5] CryptoPkg/Driver: Add Crypto PEIM, DXE, and SMM modules Michael D Kinney
2020-01-30 13:53 ` [edk2-devel] " Laszlo Ersek
2020-01-30 17:10 ` Michael D Kinney
2020-01-30 17:25 ` Laszlo Ersek [this message]
2020-02-04 8:16 ` Wang, Jian J
2020-02-05 1:38 ` Michael D Kinney
2020-01-30 7:00 ` [Patch 4/5] CryptoPkg/Library: Add BaseCryptLibOnProtocolPpi instances Michael D Kinney
2020-02-04 9:00 ` Wang, Jian J
2020-02-05 1:39 ` Michael D Kinney
2020-01-30 7:00 ` [Patch 5/5] CryptoPkg/CryptoPkg.dsc: Add build of Crypto libraries/modules Michael D Kinney
2020-02-04 9:01 ` Wang, Jian J
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=b1db8f28-524d-0917-b54d-f6a15c497118@redhat.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