summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Drivers/MmCommunicationDxe
diff options
context:
space:
mode:
authorKun Qin <kuqin12@gmail.com>2022-01-26 03:39:07 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-01-27 02:16:17 +0000
commit541a077bd15f5730e93fcc6f79fb81021933bddb (patch)
treedb65e478643af6154912feefd5e7ac3952830ae0 /ArmPkg/Drivers/MmCommunicationDxe
parentce37f459550f6e4c9bae27a9a6c39ba8eaf6749f (diff)
downloadedk2-541a077bd15f5730e93fcc6f79fb81021933bddb.tar.gz
edk2-541a077bd15f5730e93fcc6f79fb81021933bddb.tar.bz2
edk2-541a077bd15f5730e93fcc6f79fb81021933bddb.zip
ArmPkg: MmCommunicationDxe: Update MM communicate `CommBuffer**` checks
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3751 Current MM communicate routine from ArmPkg would conduct few checks prior to proceeding with SMC calls. However, the inspection step is different from PI specification. This patch updated MM communicate input argument inspection routine to assure that return code `EFI_INVALID_PARAMETER` represents "the `CommBuffer**` parameters do not refer to the same location in memory", as described by `EFI_MM_COMMUNICATION2_PROTOCOL.Communicate()` section in PI specification. Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Kun Qin <kuqin12@gmail.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Diffstat (limited to 'ArmPkg/Drivers/MmCommunicationDxe')
-rw-r--r--ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c
index 7f756a32d4..0283be430d 100644
--- a/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c
+++ b/ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c
@@ -83,7 +83,7 @@ MmCommunication2Communicate (
//
// Check parameters
//
- if (CommBufferVirtual == NULL) {
+ if ((CommBufferVirtual == NULL) || (CommBufferPhysical == NULL)) {
return EFI_INVALID_PARAMETER;
}