public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: Ming Huang <huangming@linux.alibaba.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	 Sami Mujawar <sami.mujawar@arm.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	 Supreeth Venkatesh <supreeth.venkatesh@arm.com>,
	guoheyi@linux.alibaba.com
Subject: Re: [Patch] StandaloneMmPkg: Fixed communicating from TF-A failed issue
Date: Wed, 9 Jun 2021 09:10:05 +0200	[thread overview]
Message-ID: <CAMj1kXHx1UPYxjS5ZMJtMEAtfrFAPZnraOEBd0XogMVTwRbXWQ@mail.gmail.com> (raw)
In-Reply-To: <20210608142112.87183-1-huangming@linux.alibaba.com>

On Tue, 8 Jun 2021 at 16:21, Ming Huang <huangming@linux.alibaba.com> wrote:
>
> TF-A: TrustedFirmware-a
> SPM: Secure Partition Manager(MM)
>
> For AArch64, when SPM enable in TF-A, TF-A may communicate to MM
> with buffer address (PLAT_SPM_BUF_BASE). The address is different
> from PcdMmBufferBase which use in edk2.

Then why do we have PcdMmBufferBase?

Is it possible to set PcdMmBufferBase to the correct value?

> Checking address will let TF-A communicate failed to MM. So remove
> below checking code:
> if (NsCommBufferAddr < mNsCommBuffer.PhysicalStart) {
>   return EFI_ACCESS_DENIED;
> }
>
> Signed-off-by: Ming Huang <huangming@linux.alibaba.com>
> ---
>  StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
> index 63fbe26642..fe98d3181d 100644
> --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
> +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c
> @@ -103,10 +103,6 @@ PiMmStandaloneArmTfCpuDriverEntry (
>      return EFI_INVALID_PARAMETER;
>    }
>
> -  if (NsCommBufferAddr < mNsCommBuffer.PhysicalStart) {
> -    return EFI_ACCESS_DENIED;
> -  }
> -
>    if ((NsCommBufferAddr + sizeof (EFI_MM_COMMUNICATE_HEADER)) >=
>        (mNsCommBuffer.PhysicalStart + mNsCommBuffer.PhysicalSize)) {
>      return EFI_INVALID_PARAMETER;
> --
> 2.17.1
>

  reply	other threads:[~2021-06-09  7:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 14:21 [Patch] StandaloneMmPkg: Fixed communicating from TF-A failed issue Ming Huang
2021-06-09  7:10 ` Ard Biesheuvel [this message]
2021-06-10  1:14   ` Ming Huang
2021-06-16  5:29     ` [edk2-devel] " Omkar Anand Kulkarni
2021-06-16 14:10       ` Ard Biesheuvel
2021-06-18  3:42         ` Ming Huang

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=CAMj1kXHx1UPYxjS5ZMJtMEAtfrFAPZnraOEBd0XogMVTwRbXWQ@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