From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 8F169740034 for ; Mon, 27 Nov 2023 12:15:21 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=SPH4fGql2RYmHrwjJvq/IydpCr3LXpcvwDyVnTmWRE8=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1701087320; v=1; b=ZI+Y6RpBdzmXzneHKJaNvZaxNnqBecRUNVKC6aQZ+pwOpWtsKClDVigIEIrQ0XTt71/2JZXT ttnha3o1YYbx3PUoZKnT3uv2r5I/xEMrUfRN8jmTzKdmvwa0SuFoeJVhWf5OQGIePGX6zygKwAV O4l8oL2VEk5C0xUxlXNlhytk= X-Received: by 127.0.0.2 with SMTP id Pu8uYY7687511x0sy7KQjhnl; Mon, 27 Nov 2023 04:15:20 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web10.93466.1701087319545703646 for ; Mon, 27 Nov 2023 04:15:19 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="377724877" X-IronPort-AV: E=Sophos;i="6.04,230,1695711600"; d="scan'208";a="377724877" X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 04:15:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="838685294" X-IronPort-AV: E=Sophos;i="6.04,230,1695711600"; d="scan'208";a="838685294" X-Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga004.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 27 Nov 2023 04:15:18 -0800 X-Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Mon, 27 Nov 2023 04:15:17 -0800 X-Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34 via Frontend Transport; Mon, 27 Nov 2023 04:15:17 -0800 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.34; Mon, 27 Nov 2023 04:15:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S312HGQORtzvDbCllTyEt2lfaCPgOer+u/DUgjx3mOKesj0NBHNiI3i4Sg6F2Ny+K0y/M0tx45io4dro6ZK2ulQ9Lqh7IVUPbYetv13M0D/LMHAd9JLcRfGKodtU0fzWAfSro8Hg8LTtIsaPuzY2hBoRHdCz1Opn3zq2UVJ5qiNBKSUXXbvOCLGymTfNZg1aH315hl533uHrV9ckAEF59YfWqfVLJw8x+VVCmsvWR55vEXfZDeg5PMTs2IsKX8MYDQxhhx3FKb3HhAC7fsSWhzZ/vqSBTDKEU4iKTrVarhXGISS6mSIZI69uR/8aQnTTjhaVY8dYzlkHYgBGJoMLNw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JLY/UgiNUIcDTx4oflW21o01+KP7AqangXDsuBtn/A0=; b=TKlypz9KcDs9Rw0NeD8h7S1zaJ6hfMzQx1DzzD0VB8D0MBIwrTYJBsosHpoyRoexZ+ICkXenTb6Vshs9in7Zedr7yS4AfCNP9yuoyV9vaiBFv21202/EwGcWUJGqnk1OYrXds1aH+a5CFU07qjDvTf3A28cd0OX8M67oLmHPoON1ybNVSS9TQ4iPuEkqS0tiDaOcr/y7oyjx91JRFZTO+nu8ao2tefa2kS0Z1dzzmNdtLxsLoDr7teTf301p4l9PziIdHEU1EPN5xyb8fb19+znUwKvTSOvo9xNCJyaU6w0Ky5TKl++2N/Femf23CvaAQ7gNqsMf/Vd28Zadrzhxlg== 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 X-Received: from MN0PR11MB6158.namprd11.prod.outlook.com (2603:10b6:208:3ca::18) by SJ2PR11MB8513.namprd11.prod.outlook.com (2603:10b6:a03:56e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.19; Mon, 27 Nov 2023 12:15:15 +0000 X-Received: from MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::864d:d91a:4674:e0f7]) by MN0PR11MB6158.namprd11.prod.outlook.com ([fe80::864d:d91a:4674:e0f7%7]) with mapi id 15.20.7025.022; Mon, 27 Nov 2023 12:15:14 +0000 From: "Wu, Jiaxin" To: "devel@edk2.groups.io" , "Xu, Wei6" CC: Ard Biesheuvel , Sami Mujawar , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH 1/1] StandaloneMmPkg/Core: Restart dispatcher once MmEntryPoint is registered Thread-Topic: [edk2-devel] [PATCH 1/1] StandaloneMmPkg/Core: Restart dispatcher once MmEntryPoint is registered Thread-Index: AQHaG4vtb66bw2Hajkm1piUEWuwZ8LCOHj3Q Date: Mon, 27 Nov 2023 12:15:14 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN0PR11MB6158:EE_|SJ2PR11MB8513:EE_ x-ms-office365-filtering-correlation-id: 52570749-7561-4398-ed9d-08dbef4282e5 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: gaEQj5wxGygPPj5ZHh013TtVr69z7vPeQE4eSjm6/67aa5VArVR3XCepbKH4c4MkY17zQcwdRztoHaxIaSEHxZVMm6vZb1QllRT7u5xFK7FtPRYDOnDBFMB3roa50o5uoMBrORidDR1dZWlIMrqZI1KM8LBye7FPDtOSgliL8Z1HiojNNQ9WxXS0Z7hpBwDuJRiz94Fd6+xgNa0ZC+vPdNw0umgtNGVKnPqB2in5NsS1alWnyivIUlgx91rOdvw2044oNagNO7ldQECPKsM+8pyZIa4ONzoY/pfe+R8TVWY/ViqzmM1uKa3e5kL6bFFS7MV3R1JIKLEeSeNXuItOWO78BTSoH0kTil+wHV5qMT+wHBkHeWelRgGN45waiDgri3ehIFXbIonQD81E2Y/310DnSdY8zLSJJbuIj5wR/7ZVzCWsVcDYK7nEOTj7WSOVxuQaTI6tF+uQ0ftFaiTCIRTzQ9piHwWemB+VjkgDYaz6kax499yKGDhFYSgx8X8aPYghV3MSlJvI7dEPwpuNginfGlKDADUYaO6sBYtM3Zd1rsypcQ4+WTdexRa4Zx78GjmSN5PQXHDdSk4N/HhjLBGWYnnhfVo60HQxhLhgMlOOmWQXmCQdlHkLJo4LOguuxIh9sD2SL+dW/4fi4Q11Tw== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?x7bQntnmE9XIyJtrvSglWd9ZMB+JqVQKwOykKvcONIMnxo1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KpybySdcBS4k6hJ8cOpPClBDI0vUoPZySwsYRA2nLFdx2Qx?= =?us-ascii?Q?rnqUEVt9QF+IKW4Ahw2x1crrdbOSGobjR5wVzaP5MiE7i/qy5FldkFDdsCt1?= =?us-ascii?Q?xtGnXBdSl9dhpt8OKfHuhD2Ix/RekDsi9vYEvsNzGRXKzNzl1XxQSY2ctvV9?= =?us-ascii?Q?M07iLJ6ItpXUuUQOf49pvIL3Dl4SmWXTyzkIBGJnDizvDNJ/XPGtt9/9lI3u?= =?us-ascii?Q?gj7vKO+NfMeS6WZHklqj1OYhUdfTf7r5rgpTGs+BipIFeM1ZXwiT0fCtikzw?= =?us-ascii?Q?AGzZMq1zFGsSiZmXvZ/CNpDGFd26Pfo+PhTMcgb0EEftlpPYE6MCHzXFX5J2?= =?us-ascii?Q?zEqZbCb8MpcfNZpGcG+8GQOOTOZi3WNGiJBP9KaYY8+WB2XlBpvQcdBFcRoO?= =?us-ascii?Q?MrqasOuexjV3mRMe2DP2xrtx5z1jyd8DG4J9EGIhen8Csnsiuy7GqD9wd4Kp?= =?us-ascii?Q?dBmZLNNg6dZpPLdWw53cZvHR9or7cTgLzEUmQFW4tCk7BOI0t3wcbihP5Yb/?= =?us-ascii?Q?Mbls4eJLkAAdiM+WzsYTcjCa/9pIvaBKsWYCxLCQkNZV0GiCOQXaoOREQJpl?= =?us-ascii?Q?Gd+aLhTNCpAM30Epp+70bmyUZo7ElhUbSec18xgQ86b1BYGWgggeAEM6J/at?= =?us-ascii?Q?IVJlLqEIzkzcR45lJ8xT3SOiWh0uehwKdxVw2dqw?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN0PR11MB6158.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52570749-7561-4398-ed9d-08dbef4282e5 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Nov 2023 12:15:14.5448 (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: LtFLQ3M+aKdJrx2H66giITWO+N0ZEYBdUbb8jJBebt/xd3gm8RRSvjZftfrl8FbUjsICdzhDMFBcet/pxShGzQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB8513 X-OriginatorOrg: intel.com Precedence: Bulk List-Subscribe: List-Help: 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,jiaxin.wu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: cWMSD3uXIjzm1sXYGwXZpaREx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ZI+Y6RpB; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") > // > MM_CORE_MMI_HANDLERS mMmCoreMmiHandlers[] =3D { > + { MmDriverDispatchHandler, &gEfiEventDxeDispatchGuid, NULL, > TRUE }, Should we need define a new HandlerType name instead of using the gEfiEvent= DxeDispatchGuid? We just need a simple MM Dispatch Event, which is trigged by IPL to dispat= ch again after StandaloneMmCore returns. Not depends on dxe dispatch event. And besides, should we update & correct the below code comments? /// /// Define values for the communications buffer used when gEfiEventDxeDispa= tchGuid is /// event signaled. This event is signaled by the DXE Core each time the D= XE Core /// dispatcher has completed its work. When this event is signaled, the MM= Core /// if notified, so the MM Core can dispatch MM drivers. If COMM_BUFFER_MM= _DISPATCH_ERROR /// is returned in the communication buffer, then an error occurred dispatc= hing MM /// Drivers. If COMM_BUFFER_MM_DISPATCH_SUCCESS is returned, then the MM C= ore /// dispatched all the drivers it could. If COMM_BUFFER_MM_DISPATCH_RESTAR= T is /// returned, then the MM Core just dispatched the MM Driver that registere= d /// the MM Entry Point enabling the use of MM Mode. In this case, the MM C= ore /// should be notified again to dispatch more MM Drivers using MM Mode. /// #define COMM_BUFFER_MM_DISPATCH_ERROR 0x00 #define COMM_BUFFER_MM_DISPATCH_SUCCESS 0x01 #define COMM_BUFFER_MM_DISPATCH_RESTART 0x02=20 Thanks, Jiaxin=20 > { MmReadyToLockHandler, &gEfiDxeMmReadyToLockProtocolGuid, NULL, > TRUE }, > { MmEndOfDxeHandler, &gEfiEndOfDxeEventGroupGuid, NULL, > FALSE }, > { MmExitBootServiceHandler, &gEfiEventExitBootServicesGuid, NULL, > FALSE }, > diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf > b/StandaloneMmPkg/Core/StandaloneMmCore.inf > index c44b9ff33303..845fed831c47 100644 > --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf > +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf > @@ -76,6 +76,9 @@ [Guids] > gEfiEventExitBootServicesGuid > gEfiEventReadyToBootGuid >=20 > +[Pcd] > + > gStandaloneMmPkgTokenSpaceGuid.PcdRestartMmDispatcherOnceMmEntry > Registered > + > # > # This configuration fails for CLANGPDB, which does not support PIE in t= he > GCC > # sense. Such however is required for ARM family StandaloneMmCore > diff --git a/StandaloneMmPkg/StandaloneMmPkg.dec > b/StandaloneMmPkg/StandaloneMmPkg.dec > index 46784d94e421..bb4d1520f7d9 100644 > --- a/StandaloneMmPkg/StandaloneMmPkg.dec > +++ b/StandaloneMmPkg/StandaloneMmPkg.dec > @@ -48,3 +48,9 @@ [Guids] > gEfiStandaloneMmNonSecureBufferGuid =3D { 0xf00497e3, 0xbfa2, 0x4= 1a1, > { 0x9d, 0x29, 0x54, 0xc2, 0xe9, 0x37, 0x21, 0xc5 }} > gEfiArmTfCpuDriverEpDescriptorGuid =3D { 0x6ecbd5a1, 0xc0f8, 0x4= 702, > { 0x83, 0x01, 0x4f, 0xc2, 0xc5, 0x47, 0x0a, 0x51 }} >=20 > +[PcdsFeatureFlag] > + ## Indicates if restart MM Dispatcher once MM Entry Point is > registered.

> + # TRUE - Restart MM Dispatcher once MM Entry Point is registered. > + # FALSE - Do not restart MM Dispatcher once MM Entry Point is > registered.
> + # @Prompt Restart MM Dispatcher once MM Entry Point is registered. > + > gStandaloneMmPkgTokenSpaceGuid.PcdRestartMmDispatcherOnceMmEntry > Registered|FALSE|BOOLEAN|0x00000001 > -- > 2.29.2.windows.2 >=20 >=20 >=20 >=20 >=20 -=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 (#111735): https://edk2.groups.io/g/devel/message/111735 Mute This Topic: https://groups.io/mt/102703852/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-