From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web11.6598.1589175066405974229 for ; Sun, 10 May 2020 22:31:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=FYogNHTV; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: zhiguang.liu@intel.com) IronPort-SDR: COvYh5H4XVmnI4LuhrUcUFlF524gPdpz/AahZX/lb9Q/oSy5w5JtnnEBrBWtgfLpsrfjulbSst yHaAjcnfwiVg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2020 22:31:04 -0700 IronPort-SDR: +jgoUE0bz4LpEXrBVAl6yTDgNOYWuTHVWrMSPipxhO4VpKPkLWr2Ho7c4Psob6jj1Z9nZJBf+A pMhrO5yGXN1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,378,1583222400"; d="scan'208";a="371111280" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 10 May 2020 22:31:06 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 10 May 2020 22:31:05 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 10 May 2020 22:31:05 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 10 May 2020 22:31:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FUX131jUl9gbw+aJO0M6eLwZKTI5wrm9O8xVc2hWIcrLvY6NruQ9wIKf+6pADHjFtDnyEMbfJYG9HfvN88L4aLqgoBc4u43BYtj46ZllQYeuHgIz8RNP36yjjBrC03uKxGF2papbIuhBaVc8FNSj5HUmxdYxCDaJXsqLKE6YkjcudbV27cpf/fNTQaEo6vV4nS5f2Qho6yHRR/V3/mN7BiBTxzkbavTYqy1HS3TsCofX0DmY6AvoGwPSERvdGM1jQ2MT9akzlVSNYCB58Q09ByTACAgFv+atdLSCFVU0IyiFLFFUHk/UqKr28Lidis5GahBBCJ2ni8USO+HVWKNqFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sdTf6fJGtpV4z19OIi3R30UVjZyBjc1C3Vxw4ZNOVEM=; b=FC3oum5blg3XLvJQm50YmbmAv29/QT/SJ1mebPoheg65PZBssn0ld++rYjh/gpQrhh+/ViEKyjGVAFeICR+jQSnGdA9F2LBd/F7K8yR/Ga2LZAi0SkVettpXLnPr5x5Rpm2qj85cVqFcVZQiuhW69kGFby1FLuFHG3H39pp7wOVwLan4bofwF+3BI57GjfTDv1STKlR3DrJFjGN7T6gjJbBYzt6HEYD/Veml0nRZ9QcayXD+i6iyT+VQL9pAXwVtri7J18a0SjVBiTHLGBT8rHks5M+uvF3W/rMnI0yEMHll/fuFO1Vgeckl/faMLw/3lHSopJCKr+8VBTGBwDcPQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sdTf6fJGtpV4z19OIi3R30UVjZyBjc1C3Vxw4ZNOVEM=; b=FYogNHTVvI0+pdhOa2oE/rQrczFldHgL+1A0xtwBKAZme/nHkRNc7LmVFFVtxOoPDHQvZ4Fx2Uz30pbe0RcQLB+aYsXU66KO5UFz4D5ObnJ8YEpkyM0qQSnsJdpuIr8KT+pETGH8IDKYhH09HGOw8//JO+hypG6/q1ZmlBvfp3M= Received: from BN7PR11MB2804.namprd11.prod.outlook.com (2603:10b6:406:ac::12) by BN7PR11MB2785.namprd11.prod.outlook.com (2603:10b6:406:ac::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Mon, 11 May 2020 05:31:03 +0000 Received: from BN7PR11MB2804.namprd11.prod.outlook.com ([fe80::79e2:ed1f:4d6b:532c]) by BN7PR11MB2804.namprd11.prod.outlook.com ([fe80::79e2:ed1f:4d6b:532c%7]) with mapi id 15.20.2979.033; Mon, 11 May 2020 05:31:03 +0000 From: "Zhiguang Liu" To: "devel@edk2.groups.io" , "oleksiyy@ami.com" CC: "Gao, Liming" , "Kinney, Michael D" , "Felixp@ami.com" , "robert@ami.com" Subject: Re: [edk2-devel] [PATCH 3/5] MdePkg: EFI_MM_COMUNICATION2_PROTOCOL Thread-Topic: [edk2-devel] [PATCH 3/5] MdePkg: EFI_MM_COMUNICATION2_PROTOCOL Thread-Index: AQHWJKJ1gl4Y+wONw0yAlvS3e1Lvx6iiYDtQ Date: Mon, 11 May 2020 05:31:03 +0000 Message-ID: References: <20200507190310.38968-1-oleksiyy@ami.com> <20200507190310.38968-4-oleksiyy@ami.com> In-Reply-To: <20200507190310.38968-4-oleksiyy@ami.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 dlp-product: dlpe-windows authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.45] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 92579ad3-b660-4f60-aa71-08d7f56c7f35 x-ms-traffictypediagnostic: BN7PR11MB2785: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 04004D94E2 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: S5uy6gZVCAitoBBtn+2S9qoUKT/KOMwJ5E2Vy+QFy5IadvvpiwYUmqZARE0eJI0+iAgt9nA8EQiAC5g9V5UOYEYToJfAaEV+C4n4W5jtEJddxK9hKNpSg+Ec2hcNKShXcl9sVf55hYSu5UikfO3MutOkl5/H/5x/TAZEZpE39IGFaV3NyAqAdk/vs9XCoSQwYvNRip0qzrRN7ie56eP+LG/Y6qolD7D7df7MJAwLhwWsyj/TZL0YvtVRAhFWUby5penF+fe974Zg4V+FzRaq+2GRhLiE1+wWENEB9STsGKawD/WNAyYUXfeo9j0K4tQ1D9Kq+lt88wsfmS+3xrByEw64gixGEXs2jfFQtndRmBmMa3FXVr7jWKLZmIawHf2KABN7Ad4mBbuu3ApRHMyXdXXxgP+Q6mx8s1cNGfj2llp3IstiVh/hVUT4TpuwZMfMcVWfd+FP2PhwwpaaPmaEVn20f6xUur53FEPqQMn4LcrAq3tq36WWdHdq2LK9/oIlil9IFCw9uaDwAf9iijrp/WfYT/fDQmkOAISH2pDYhVrQCKWOAsZ7x9XDosG0P/GbqtLi7rG+6hNZIQVGNjXjeqRoPwUx9kqLvoh75p4/XFo= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN7PR11MB2804.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(39860400002)(346002)(376002)(396003)(366004)(136003)(33430700001)(33656002)(66556008)(64756008)(6506007)(53546011)(8936002)(966005)(110136005)(478600001)(9686003)(33440700001)(7696005)(316002)(26005)(8676002)(55016002)(186003)(5660300002)(19627235002)(86362001)(66946007)(66446008)(76116006)(66476007)(2906002)(54906003)(52536014)(71200400001)(4326008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: IoOTWP75y/Iv4wZoUNSee+7UYjYvNpr0qFsPYYNOfUMhnwvyZcEufFQsQDA4P2gl4qSktJMIPjCmmEj6QwufnR4nmamu1FWDVKRGOvbjQ1IXYAiMj9EWGk9dVAikCXFKg/8pyvkGbJq0KsLvEwx49L7VoFvshvzvF4diYzF5zF8vbKS+VBw1yBtYCQnMgHo9FSNtqgCiW1vT9La7VDOz+DFEzv42SqKDU+wIc/pBTfl8uNaIU5QOJZTtsmfYI7Iyp/hvv1OA0aUGhzEapA3mpdpdX0se97JtvcYnH55ht7qJpkEtZS5YljXdeufRLlFOnvp9F8RHZD4d8Ay2MruTSi7oxsHi7SZhkURhHMVxQ3qeJnirpkc8SzluCUx8RiZBMo7pmV7vQoE5IFkeHJd7AkFzjM60HzlkJQkciGFGn/dy9ebBe1CQEDPPjlVQEIe+hWWSTFBcVvW1MEbo3EEbXzSZE5bSsvZCxguSKDMZItBXA0PdaBoK+5yMeBq2Bqdt MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 92579ad3-b660-4f60-aa71-08d7f56c7f35 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2020 05:31:03.3882 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: dO8a7MoCfP7gjZ4xkskoqWu0+CDu3PyuFjVPXz0oP/AU32iFizWUJ90XGyBM1BV310lIpTCvoESsn2ZrpiMavQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2785 Return-Path: zhiguang.liu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Robert, Give my comments inline Thanks Zhiguang > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Oleksiy > Yakovlev > Sent: Friday, May 8, 2020 3:03 AM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Kinney, Michael D > ; Felixp@ami.com; oleksiyy@ami.com; > robert@ami.com > Subject: [edk2-devel] [PATCH 3/5] MdePkg: > EFI_MM_COMUNICATION2_PROTOCOL >=20 > From: Robert Phelps >=20 > 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) >=20 > 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 >=20 > diff --git a/MdePkg/Include/Protocol/MmCommunication2.h > b/MdePkg/Include/Protocol/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_PROTOCOL; > + > + > +/** > + Communicates with a registered handler. > + > + Usage is identical to > EFI_MM_COMMUNICATION_PROTOCOL.Communicate() except for the > notes below: > + - Instead of passing just the physical address via the CommBuffer > parameter, the caller must pass both the physical and the virtual addres= ses > of the communication buffer. > + - If no virtual remapping has taken place, the physical address wil= l be > equal to the virtual address, and so the caller is required to pass the = same > value for both parameters. > + > + @param This The EFI_MM_COMMUNICATION2_PROTOCOL > instance. > + @param mBufferPhysical Physical address of the buffer to conve= y into > MMRAM. Shouldn't it be @param CommBufferPhysical > + @param CommBufferVirtual Virtual address of the buffer to convey= into > MMRAM. > + @param CommSize The size of the data buffer being passe= d in. On > exit, the > + size of data being returned. Zero if th= e handler does not > + wish to reply with any data. This param= eter is optional and > may be NULL. > + > + > + @retval EFI_SUCCESS The message was successfully posted= . > + @retval EFI_INVALID_PARAMETER The CommBuffer** parameters do > not refer to the same location in memory. > + @retval EFI_BAD_BUFFER_SIZE The buffer is too large for the MM > implementation. > + If this error is returned, the Mess= ageLength field > + in the CommBuffer header or the int= eger pointed by > + CommSize, are updated to reflect th= e maximum payload > + size the implementation can accommo= date. > + @retval EFI_ACCESS_DENIED The CommunicateBuffer parameter or > CommSize parameter, > + if not omitted, are in address rang= e that 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 Please intent the parameter names > +); > + > + > +/// This protocol provides a means of communicating between drivers > +outside /// of MM and MMI handlers inside of MM, in a way that hides > +the implementation /// details regarding whether traditional or standal= one > 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, 0x46= 66, { 0x86, > 0x04, 0x87, 0xff, 0x6d, 0x66, 0x2c, 0x9a }} >=20 > + # > + # Protocols defined in PI 1.7 > + # > + > + ## Include/Protocol/MmComunication2.h > + gEfiMmCommunication2ProtocolGuid =3D { 0x378daedc, 0xf06b, 0x44= 46, > { 0x83, 0x14, 0x40, 0xab, 0x93, 0x3c, 0x87, 0xa3 }} > + > # > # Protocols defined in UEFI2.1/UEFI2.0/EFI1.1 > # > -- > 2.24.1.windows.2 >=20 >=20 > Please consider the environment before printing this email. >=20 > The information contained in this message may be confidential and > proprietary to American Megatrends (AMI). This communication is intende= d > to be read only by the individual or entity to whom it is addressed or b= y their > designee. If the reader of this message is not the intended recipient, y= ou are > on notice that any distribution of this message, in any form, is strictl= y > prohibited. Please promptly notify the sender by reply e-mail or by > telephone at 770-246-8600, and then delete or destroy all copies of the > transmission. >=20 >=20