From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by mx.groups.io with SMTP id smtpd.web08.12849.1623162099089651619 for ; Tue, 08 Jun 2021 07:21:39 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: linux.alibaba.com, ip: 115.124.30.56, mailfrom: huangming@linux.alibaba.com) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R801e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=huangming@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0Ubmd1wR_1623162073; Received: from 842effaa37a8.tbsite.net(mailfrom:huangming@linux.alibaba.com fp:SMTPD_---0Ubmd1wR_1623162073) by smtp.aliyun-inc.com(127.0.0.1); Tue, 08 Jun 2021 22:21:25 +0800 From: "Ming Huang" To: devel@edk2.groups.io, ardb+tianocore@kernel.org, sami.mujawar@arm.com, jiewen.yao@intel.com, supreeth.venkatesh@arm.com Cc: guoheyi@linux.alibaba.com, Ming Huang Subject: [Patch] StandaloneMmPkg: Fixed communicating from TF-A failed issue Date: Tue, 8 Jun 2021 22:21:12 +0800 Message-Id: <20210608142112.87183-1-huangming@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 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. 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 --- 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