From 541a077bd15f5730e93fcc6f79fb81021933bddb Mon Sep 17 00:00:00 2001 From: Kun Qin Date: Wed, 26 Jan 2022 03:39:07 +0800 Subject: 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 Cc: Ard Biesheuvel Cc: Bret Barkelew Cc: Michael Kubacki Cc: Sami Mujawar Signed-off-by: Kun Qin Reviewed-by: Sami Mujawar --- ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ArmPkg') 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; } -- cgit v1.2.3