From nobody Tue Feb 10 10:59:00 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+59193+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+59193+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1589228695; cv=none; d=zohomail.com; s=zohoarc; b=Kq7jQjdkPeZ8KEX4kvye5qco5Vo4Cam78C6z8zwOXNxxAEWri4sho860r9sUD11Nzwf7Cja+hEmV4wgOw4k06aLf0GzjKuWBr99O25di2FqHckEgglPyyBfai2eUs9eOsUzUIxT7VZPqtalZK3ZYSAtd1hp0DGKTsppIC4Ry/c8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589228695; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=PYkt5qDQX4pFXas+tFtcYEzLHNWml59L3RCLuwmFGOQ=; b=XnQbv/narmZ7THp8ivWu5SQm+98lhHrwRRovhd0EEf3oh6YxtWH1R4Kvj01GuvNddxAuvf8pwVhQK6T+XHmZ4nyhJ51qTieyC6ox2m53nIX6Q/j0mWTBX7OjR1w1QYCdE9SfVY+v+tMkFMy9q1Av6B2rIYRcN62yVKKf4cHF9Kg= 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+59193+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 158922869547422.455263871919556; Mon, 11 May 2020 13:24:55 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id XFHvYY1788612xFxbrKImzRl; Mon, 11 May 2020 13:24:55 -0700 X-Received: from atlmailgw2.ami.com (atlmailgw2.ami.com []) by mx.groups.io with SMTP id smtpd.web12.1022.1589228692562159134 for ; Mon, 11 May 2020 13:24:54 -0700 X-AuditID: ac10606f-05fff70000001b62-bf-5eb9b496f3e1 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 atlmailgw2.ami.com (Symantec Messaging Gateway) with SMTP id B9.50.07010.694B9BE5; Mon, 11 May 2020 16:24:54 -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; Mon, 11 May 2020 16:24:17 -0400 From: "Oleksiy Yakovlev" To: CC: , , , , Subject: [edk2-devel] [PATCH v2 3/5] MdePkg: EFI_MM_COMUNICATION2_PROTOCOL Date: Mon, 11 May 2020 16:24:11 -0400 Message-ID: <20200511202413.18140-4-oleksiyy@ami.com> In-Reply-To: <20200511202413.18140-1-oleksiyy@ami.com> References: <20200511202413.18140-1-oleksiyy@ami.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLIsWRmVeSWpSXmKPExsWyRiBhgu60LTvjDGb/EbRonzCbzWLFvQ3s Fh0d/5gcmD22f7/A6LF4z0umAKaoBkabxLy8/JLEklSFlNTiZFulgKLMssTkSiWFzBRbJUMl hYKcxOTU3NS8ElulxIKC1LwUJTsuBQxgA1SWmaeQmpecn5KZl26r5Bnsr2thYWqpa6hkF5KR qpCZl5ZflJtYkpmfp5Ccn1cCVJ2aAhRVSOjmzNi00LTgpWrFiaVdrA2Ms2W6GDk5JARMJI79 2sUIYgsJ7GKSWHbFv4uRC8jewigxZcUMsASbgKbEgWNTwGwRASmJKQdmMoHYzAJFErePvmYB sYUFbCW+bPvKCmKzCKhKLLk7DayGV8BU4urqVawQyzQkpq25CxbnFDCT2L3oDdBMDqBlphLL f4RBlAtKnJz5hAVivITEwRcvmCFuk5VoO/6cfQIj/ywkZbOQlC1gZFrFKJRYkpObmJmTXm6k l5ibqZecn7uJERJX+TsYP340P8TIxMF4iFGCg1lJhLclc2ecEG9KYmVValF+fFFpTmrxIUYn oPsnMktxg4IPGB/xxgYGUqIwjqGJmYm5kbmhpYm5sbGSOO+ktWvihATSgfGanZpakFoEM4SJ g1OqgXH9VKfdOYLl7U1saSLd82aZSF9jEt/Qcdxck3G6I3PEQY2Ar1YltVdz151xXmB0dO7k xSy9FlXv1m8XtLx+6//Sp0WfZ3ZOvnNlz2yjBgvbi00/HrrqfHZ5FfRi6VeNMBv7GYq8bbXq bz8VF2cvnfmvymhm3fKNVxpZ2WbI++5nDtQ7NHGCsqcSS3FGoqEWc1FxIgAq2XpAwAIAAA== 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: tEbE3rYYrFjPAHeTQgCKkJcQx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1589228695; bh=MpJs0f/ZNaXG+TLR2kRPT3ExLootFfxuNVnRm0u+iZI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=mHBHWEQ1z2qoI6d1aVmlT4zu+NL3qeIyxjEeKW/MqpjcaM594RZozqspfDnDS2slzSk +G46IW19X2hWQbzHAMcb8Ifp1DDAbRezawC03faFyTLBD2hazWRL5jYzumqfqg1ImEJRd kU2scBLGh6vC3Q7PPzzx9Ok73BeX6rhtpzo= 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 Reviewed-by: Zhiguang Liu --- MdePkg/Include/Protocol/MmCommunication2.h | 72 ++++++++++++++++++++++ MdePkg/MdePkg.dec | 7 +++ 2 files changed, 79 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..2d1f44f309 --- /dev/null +++ b/MdePkg/Include/Protocol/MmCommunication2.h @@ -0,0 +1,72 @@ +/** @file + EFI MM Communication Protocol 2 as defined in the PI 1.7 errata A spec= ification. + + Provides a runtime service for communicating between DXE drivers and a= registered MMI handler + +Copyright (c) 2020, American Megatrends International LLC. All rights rese= rved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#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 CommBufferPhysical 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 0b9c4bc40a..2591b8e135 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1280,6 +1280,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 (#59193): https://edk2.groups.io/g/devel/message/59193 Mute This Topic: https://groups.io/mt/74145024/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-