From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: "Wu, Hao A" <hao.a.wu@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"Wang, Jian J" <jian.j.wang@intel.com>,
"Zeng, Star" <star.zeng@intel.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>,
"Gao, Liming" <liming.gao@intel.com>,
Achin Gupta <achin.gupta@arm.com>,
"Yao, Jiewen" <jiewen.yao@intel.com>,
Supreeth Venkatesh <supreeth.venkatesh@arm.com>,
Jagadeesh Ujja <jagadeesh.ujja@arm.com>
Subject: Re: [PATCH 0/4] MdeModulePkg, StandaloneMmPkg: work around VA vs PA ambiguity
Date: Fri, 15 Mar 2019 09:12:39 +0100 [thread overview]
Message-ID: <CAKv+Gu-_XqNaVY5TMn18FSY=-SEq68ctn_Q9uViOeAyfFrdx5Q@mail.gmail.com> (raw)
In-Reply-To: <B80AF82E9BFB8E4FBD8C89DA810C6A093C8AB4FA@SHSMSX104.ccr.corp.intel.com>
On Fri, 15 Mar 2019 at 03:17, Wu, Hao A <hao.a.wu@intel.com> wrote:
>
> > -----Original Message-----
> > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
> > Sent: Monday, March 11, 2019 11:36 PM
> > To: edk2-devel@lists.01.org
> > Cc: Ard Biesheuvel; Wang, Jian J; Wu, Hao A; Zeng, Star; Kinney, Michael D;
> > Gao, Liming; Achin Gupta; Yao, Jiewen; Supreeth Venkatesh; Jagadeesh Ujja
> > Subject: [PATCH 0/4] MdeModulePkg, StandaloneMmPkg: work around VA
> > vs PA ambiguity
> >
> > This series proposes one possible approach to work around the issue that the
> > traditional MM and standalone MM implement versions of the communicate
> > protocol
> > that are fundamentally incompatible from the point of view of the caller.
> >
> > In traditional MM, the MM communicate protocol takes a physical pointer for
> > the buffer, so that the SMM execution context can access the memory
> > directly
> > without having to translate it according to the translation regime of the
> > caller.
> >
> > In standalone MM, the buffer that is shared with the MM context is
> > preallocated,
> > and so it is up to the implementation of the MM communicate protocol to
> > copy the
> > data from the caller allocated buffer into the preallocated shared buffer. In
> > order to be able to do so, the DXE driver needs to copy the contents, and for
> > this it needs to know the virtual address not the physical address.
> >
> > So this means we have two incompatible versions of the same protocol, and
> > given
> > that we have even re-used the EFI_SMM_COMMUNICATE_PROTOCOL GUID
> > for the new
> > EFI_MM_COMMUNICATE_PROTOCOL, we cannot distinguish
> > programmatically between a
> > MM context that takes physical addresses vs one that takes virtual ones.
> >
> > Since this is known at build time, one way to deal with this is to have two
> > different implementations of a library that defines an abstract
> > MmCommunicate()
> > function, allowing the correct implementation to be selected at integration
> > time.
>
> Hello Ard,
>
> It seems to me that for platforms that include the VariableSmmRuntimeDxe
> driver, they need to add the 'MmCommunicateLib' dependency.
>
> Please grant us some time to evaluate this proposal and its impact. We
> will inform you as soon as there is a result. Thanks.
>
Thank you Hao.
Note that we intend to discuss the issue addressed by this series in
the PIWG call, but the next one is at least two weeks away.
So there is no urgency to reviewing this patch for inclusion, but any
feedback you can give is appreciated.
prev parent reply other threads:[~2019-03-15 8:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-11 15:36 [PATCH 0/4] MdeModulePkg, StandaloneMmPkg: work around VA vs PA ambiguity Ard Biesheuvel
2019-03-11 15:36 ` [PATCH 1/4] MdeModulePkg: introduce MmCommunicationLib library class Ard Biesheuvel
2019-03-11 15:36 ` [PATCH 2/4] MdeModulePkg: add implementation of MmCommunicateLib Ard Biesheuvel
2019-03-11 15:36 ` [PATCH 3/4] StandaloneMmPkg: " Ard Biesheuvel
2019-03-11 15:36 ` [PATCH 4/4] MdeModulePkg/VariableSmmRuntimeDxe: switch to MmCommunicateLib library Ard Biesheuvel
2019-03-15 2:15 ` [PATCH 0/4] MdeModulePkg, StandaloneMmPkg: work around VA vs PA ambiguity Wu, Hao A
2019-03-15 8:12 ` Ard Biesheuvel [this message]
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='CAKv+Gu-_XqNaVY5TMn18FSY=-SEq68ctn_Q9uViOeAyfFrdx5Q@mail.gmail.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