From nobody Tue Feb 10 05:10:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+58804+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58804+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1588878281; cv=none; d=zohomail.com; s=zohoarc; b=Prc7Env8bslQIoCFwJ/C0Xvs/bBMs0AmH1SHalRjddBsvTkQS6n+wQfHwvOg+vNQ3HzfXghm+15kEEHgwmCRfV51nLqIOcWbtn2MxIYxqIumpSuFOJbTx8e0Ha59ZzUHwyGD29z9wabeBTNb8vPD8a5L1rPp5ojSIKluAuk+n/A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588878281; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=FmO4CM4twfbrvXoomJCT+TRGQkPOAc/Rsf8ksJiCURs=; b=O1Zp5k5D7ENMKO9qvx1+UlHuxcx/UhEXxaKZxolelXPYbxVeMF1h/VRGxGsDc93xejbSTP1AlMUlyZ1Q6OcqGiwtMqSWhAVygqoyvK0hPQ+IZm5Hzjd/dQh6dzwOEGGshNH9Jdbb6jerUD/ZIQvyccZ7zw8bv/x4p76jF2hc75Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58804+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1588878281286133.09111182275365; Thu, 7 May 2020 12:04:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id NccbYY1788612x5wkmZ0sTWq; Thu, 07 May 2020 12:04:40 -0700 X-Received: from atlmailgw1.ami.com (atlmailgw1.ami.com []) by mx.groups.io with SMTP id smtpd.web10.1746.1588878279589921480 for ; Thu, 07 May 2020 12:04:40 -0700 X-AuditID: ac1060b2-0f7ff700000018d4-a0-5eb45bc7a92b X-Received: from atlms1.us.megatrends.com (atlms1.us.megatrends.com [172.16.96.144]) (using TLS with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by atlmailgw1.ami.com (Symantec Messaging Gateway) with SMTP id D0.DB.06356.7CB54BE5; Thu, 7 May 2020 15:04:40 -0400 (EDT) X-Received: from Oleksiy77.us.megatrends.com (172.16.97.158) by atlms1.us.megatrends.com (172.16.96.144) with Microsoft SMTP Server id 14.3.468.0; Thu, 7 May 2020 15:03:15 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , Subject: [edk2-devel] [PATCH 3/5] MdePkg: EFI_MM_COMUNICATION2_PROTOCOL Date: Thu, 7 May 2020 15:03:08 -0400 Message-ID: <20200507190310.38968-4-oleksiyy@ami.com> In-Reply-To: <20200507190310.38968-1-oleksiyy@ami.com> References: <20200507190310.38968-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLIsWRmVeSWpSXmKPExsWyRiBhgu6J6C1xBotfsFm0T5jNZrHi3gZ2 i46Of0wOzB7bv19g9Fi85yVTAFNUA6NNYl5efkliSapCSmpxsq1SQFFmWWJypZJCZoqtkqGS QkFOYnJqbmpeia1SYkFBal6Kkh2XAgawASrLzFNIzUvOT8nMS7dV8gz217WwMLXUNVSyC8lI VcjMS8svyk0syczPU0jOzysBqk5NAYoqJHRzZizZqF6wVrmib/9vpgbG9VJdjJwcEgImEq// 3GUCsYUEdjFJvOipgLA3M0osXFwAYrMJaEocODaFEcQWEZCSmHJgJlg9s0CRxO2jr1lAbGEB K4n5T5+wgdgsAioSW/Y/BavnFTCVWLJ9CxPELg2JaWsgdnEKmEmc/nOKGWKXqcTJs79YIeoF JU7OfMICMV9C4uCLF1A1shJtx5+zT2Dkn4WkbBaSsgWMTKsYhRJLcnITM3PSyw31EnMz9ZLz czcxQuJq0w7GlovmhxiZOBgPMUpwMCuJ8PL82BgnxJuSWFmVWpQfX1Sak1p8iNEJ6IGJzFLc oOADxke8sYGBlCiMY2hiZmJuZG5oaWJubKwkzjt57Zo4IYF0YLxmp6YWpBbBDGHi4JRqYNyo 5Sr1zHxucWfT2uf/e1J9E1W3FGb9TS18YHSgVXpxL2txReP5tBkXorPUWu6tV484VTMz1lAl 9/51tqg+D6kVHq92zbO1nlHM2uR4wuXzmVup7E+PlcUvP1ZwZ/vBmPpV7DY6hxP3G6+d/v/P HBbVDRtPN6x6H5yp4fDkm+4tI4eZpQv+mSmxFGckGmoxFxUnAgBbmbGWwAIAAA== Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,oleksiyy@ami.com X-Gm-Message-State: y3npr6D69Ru5ESC9F64u55jRx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1588878280; bh=52rqtsaWax/RI272S+mHSc7VGtghVp0rvqXcgyiZYv4=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=uE96ANyl6weRInEA08gkg211QmrLrCK6Ice6qbBgXSvRp7KAEaRmfRw4Ve0Sz+McALu PPsJyVAyEUTsiJ7lVH71ITdxP2y1ljU/y66Z6A0SPcq5NUCqHXfGZzcw3aj5iDnO1HTbF RVRagdFjSPX9Ej+vuMLd5b690xNNEzt1jDM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Robert Phelps Created a new header to support the new EFI_MM_COMMUNICATION2_PROTOCOL Protocol as defined in the PI 1.7a Specification (PI 1.7a Mantis 1993) Signed-off-by: Robert Phelps --- MdePkg/Include/Protocol/MmCommunication2.h | 66 ++++++++++++++++++++++ MdePkg/MdePkg.dec | 7 +++ 2 files changed, 73 insertions(+) create mode 100644 MdePkg/Include/Protocol/MmCommunication2.h diff --git a/MdePkg/Include/Protocol/MmCommunication2.h b/MdePkg/Include/Pr= otocol/MmCommunication2.h new file mode 100644 index 0000000000..b6fe5069e1 --- /dev/null +++ b/MdePkg/Include/Protocol/MmCommunication2.h @@ -0,0 +1,66 @@ +/** @file + Provides a runtime service for communicating between DXE drivers and a= registered MMI handler +**/ +#ifndef _MM_COMMUNICATION2_H_ +#define _MM_COMMUNICATION2_H_ + +/// +/// Global ID for EFI_MM_COMUNICATION@_PROTOCOL_GUID +/// +#define EFI_MM_COMMUNICATION2_PROTOCOL_GUID \ + { 0x378daedc, 0xf06b, 0x4446, { 0x83, 0x14, 0x40, 0xab, 0x93, 0x3c= , 0x87, 0xa3 }} + + +/// +/// The forward declaration for EFI_MM_COMMUNICATION2_PROTOCOL_GUID +/// +typedef struct _EFI_MM_COMMUNICATION2_PROTOCOL EFI_MM_COMMUNICATION2_PROTO= COL; + + +/** + Communicates with a registered handler. + + Usage is identical to EFI_MM_COMMUNICATION_PROTOCOL.Communicate() exce= pt for the notes below: + - Instead of passing just the physical address via the CommBuffer para= meter, the caller must pass both the physical and the virtual addresses of = the communication buffer. + - If no virtual remapping has taken place, the physical address will b= e equal to the virtual address, and so the caller is required to pass the s= ame value for both parameters. + + @param This The EFI_MM_COMMUNICATION2_PROTOCOL instanc= e. + @param mBufferPhysical Physical address of the buffer to convey i= nto MMRAM. + @param CommBufferVirtual Virtual address of the buffer to convey in= to MMRAM. + @param CommSize The size of the data buffer being passed i= n. On exit, the + size of data being returned. Zero if the h= andler does not + wish to reply with any data. This paramete= r is optional and may be NULL. + + + @retval EFI_SUCCESS The message was successfully posted. + @retval EFI_INVALID_PARAMETER The CommBuffer** parameters do not ref= er to the same location in memory. + @retval EFI_BAD_BUFFER_SIZE The buffer is too large for the MM imp= lementation. + If this error is returned, the Message= Length field + in the CommBuffer header or the intege= r pointed by + CommSize, are updated to reflect the m= aximum payload + size the implementation can accommodat= e. + @retval EFI_ACCESS_DENIED The CommunicateBuffer parameter or Com= mSize parameter, + if not omitted, are in address range t= hat cannot be + accessed by the MM environment. +**/ + +typedef +EFI_STATUS +(EFIAPI *EFI_MM_COMMUNICATE2)( +IN CONST EFI_MM_COMMUNICATION2_PROTOCOL *This, +IN OUT VOID *CommBufferPhysical, +IN OUT VOID *CommBufferVirtual, +IN OUT UINTN *CommSize OPTIONAL +); + + +/// This protocol provides a means of communicating between drivers outside +/// of MM and MMI handlers inside of MM, in a way that hides the implement= ation +/// details regarding whether traditional or standalone MM is being used. + +typedef struct _EFI_MM_COMMUNICATION2_PROTOCOL { +EFI_MM_COMMUNICATE2 Communicate; +} EFI_MM_COMMUNICATION2_PROTOCOL; + + +#endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 6c37c2181c..c64cad75dd 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1277,6 +1277,13 @@ ## Include/Protocol/SpiSmmNorFlash.h gEfiSpiSmmNorFlashProtocolGuid =3D { 0xaab18f19, 0xfe14, 0x4666,= { 0x86, 0x04, 0x87, 0xff, 0x6d, 0x66, 0x2c, 0x9a }} =20 + # + # Protocols defined in PI 1.7 + # + + ## Include/Protocol/MmComunication2.h + gEfiMmCommunication2ProtocolGuid =3D { 0x378daedc, 0xf06b, 0x4446,= { 0x83, 0x14, 0x40, 0xab, 0x93, 0x3c, 0x87, 0xa3 }} + # # Protocols defined in UEFI2.1/UEFI2.0/EFI1.1 # --=20 2.24.1.windows.2 Please consider the environment before printing this email. The information contained in this message may be confidential and proprieta= ry to American Megatrends (AMI). This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephon= e at 770-246-8600, and then delete or destroy all copies of the transmissio= n. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58804): https://edk2.groups.io/g/devel/message/58804 Mute This Topic: https://groups.io/mt/74057699/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-