]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPkg: MmCommunicationDxe: Update MM communicate `MessageLength` check
authorKun Qin <kuqin12@gmail.com>
Tue, 25 Jan 2022 19:39:09 +0000 (03:39 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 27 Jan 2022 02:16:17 +0000 (02:16 +0000)
commit8cc5590eab974ab34e2bfa1c9d6a7ef94c70ffae
treecffaf00250bcf59cf8c9b557ff5e966e0e259fd4
parent1aa1ec457424fe03c976efda85e062461a44542c
ArmPkg: MmCommunicationDxe: Update MM communicate `MessageLength` check

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 "if the `MessageLength` is zero, or too large for the MM
implementation to manage, the MM implementation must update the
`MessageLength` to reflect the size of the `Data` buffer that it can
tolerate", as described by `EFI_MM_COMMUNICATION_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>
ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.c