From: "Ni, Ray" <ray.ni@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"mikuback@linux.microsoft.com" <mikuback@linux.microsoft.com>
Subject: Re: [edk2-devel] [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg: Add BaseSmmAccessLibNull
Date: Fri, 20 Aug 2021 05:33:03 +0000 [thread overview]
Message-ID: <CO1PR11MB493050EB5724C50647E90DC98CC19@CO1PR11MB4930.namprd11.prod.outlook.com> (raw)
In-Reply-To: <28669d2c-da78-d35f-4ad3-812a70d09ba2@linux.microsoft.com>
Null SmmAccessLib is confusing to me. Have you evaluated the option:
Create two instances of BoardInitLib for pre-mem and post-mem. Pre-mem
one doesn’t link to SmmAccessLib
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Michael Kubacki
> Sent: Friday, August 20, 2021 12:53 AM
> To: devel@edk2.groups.io; Ni, Ray <ray.ni@intel.com>
> Subject: Re: [edk2-devel] [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg: Add BaseSmmAccessLibNull
>
> I don't understand your argument.
>
> The library class (SmmAccessLib) that already exists is the abstraction
> layer. This is not introducing a new layer of abstraction. It is using
> the current layer of abstraction.
>
> Thanks,
> Michael
>
> On 8/19/2021 5:49 AM, Ni, Ray wrote:
> > Michael,
> >
> > I don’t think scenario #1 is a good reason for NULL instance of
> > SmmAccessLib. The root cause is BoardInitLib lib class supports pre-mem
> > and post-mem board init.
> >
> > Below solution can avoid NULL SmmAccessLib:
> >
> > Create two instances of BoardInitLib for pre-mem and post-mem. Pre-mem
> > one doesn’t link to SmmAccessLib.
> >
> > For scenario #2, if a particular platform doesn’t support S3, why does
> > this platform include the PEIM?
> >
> > Please understand that I want to avoid introducing more abstraction layers.
> >
> > Thanks,
> >
> > Ray
> >
> > *From:* Michael Kubacki <mikuback@linux.microsoft.com>
> > *Sent:* Friday, August 13, 2021 10:16 AM
> > *To:* Ni; Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
> > *Subject:* Re: [edk2-devel] [edk2-platforms][PATCH v1 1/1]
> > IntelSiliconPkg: Add BaseSmmAccessLibNull
> >
> > Sure.
> >
> > Scenario #1:
> >
> > MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf and
> > MinPlatormPkg/PlatformInit/PlatformInitPei/PlatformInitPostMem.inf both
> > link against an instance of BoardInitLib.
> >
> > Many boards link against a single BoardInitLib instance. See example -
> > https://github.com/tianocore/edk2-
> platforms/blob/cd4e6b716c7d1bcde94035e7dce14b53a553e103/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenB
> oardPkg.dsc#L203
> > <https://github.com/tianocore/edk2-
> platforms/blob/cd4e6b716c7d1bcde94035e7dce14b53a553e103/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenB
> oardPkg.dsc#L203>
> >
> > That BoardInitLib instance may link against SmmAccessLib.
> > PlatformInitPreMem may wish to library class override the SmmAccessLib
> > to the NULL instance while keeping it to non-NULL instance in
> > PlatformInitPostMem.
> >
> > Scenario #2:
> >
> > A PEIM is built that checks whether the boot mode is S3. If so, it calls
> > PeiInstallSmmAccessPpi(). A particular platform does not support S3,
> > therefore, it links BaseSmmAccessLibNull as its library instance for
> > SmmAccessLib.
> >
> >
>
>
>
>
next prev parent reply other threads:[~2021-08-20 5:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-09 14:15 [edk2-platforms][PATCH v1 1/1] IntelSiliconPkg: Add BaseSmmAccessLibNull Michael Kubacki
2021-08-09 22:42 ` Chaganty, Rangasai V
2021-08-10 2:30 ` Ni, Ray
2021-08-10 15:28 ` [edk2-devel] " Michael Kubacki
2021-08-12 5:32 ` Ni, Ray
2021-08-13 2:16 ` Michael Kubacki
2021-08-18 18:45 ` Michael Kubacki
2021-08-19 9:49 ` Ni, Ray
2021-08-19 16:53 ` Michael Kubacki
2021-08-20 5:33 ` Ni, Ray [this message]
2021-08-20 19:34 ` Michael Kubacki
2021-09-09 14:12 ` Michael Kubacki
2021-09-09 14:49 ` Ni, Ray
2021-09-09 14:54 ` Michael Kubacki
2021-09-09 14:58 ` Ni, Ray
2021-09-09 15:23 ` Michael Kubacki
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=CO1PR11MB493050EB5724C50647E90DC98CC19@CO1PR11MB4930.namprd11.prod.outlook.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