From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 25A8178003C for ; Fri, 9 Aug 2024 06:59:55 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Cu94b5ENlHanl164p0EorYTszGu5KvNm7Ns91APrHdI=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240206; t=1723186795; v=1; b=PKDWV+brW/cxgcFmLUW2m7uzirMTQG28vlkOCJWcY8/Lv8Idg6rgvGPRsI+oTh/DkKFcyiET 0lOaQ7v+327vWn6chDMnJz3nmm5Z0OMwRAxvYPgMRcuQIiE1T5xR3SJb+TXnUp6GqFlwGMt6Lo2 9xd//aVJVtmm2igffti0W1HE/z+PUJERmQf4TrH67C81onBt7qNhMIbMoSW3AryOPDsqLPRZpoL nvgLgXsve9XiquPAp/TnaVZk/c1j9jSuEbnEp2CJL5XsPo54exIuFJZ//g/eNPAFzIbM541K7mn dQroN5Nu0URC94YcSq48SMEqapTLFbMDvYT/XelHqd+fw== X-Received: by 127.0.0.2 with SMTP id KVppYY7687511x1ytabvDffw; Thu, 08 Aug 2024 23:59:54 -0700 X-Received: from BN8PR05CU002.outbound.protection.outlook.com (BN8PR05CU002.outbound.protection.outlook.com [52.101.57.90]) by mx.groups.io with SMTP id smtpd.web10.66096.1723138912231172264 for ; Thu, 08 Aug 2024 10:41:52 -0700 X-Received: from BL1PR21MB3160.namprd21.prod.outlook.com (2603:10b6:208:394::10) by MWHPR21MB4454.namprd21.prod.outlook.com (2603:10b6:303:278::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.9; Thu, 8 Aug 2024 17:41:48 +0000 X-Received: from BL1PR21MB3160.namprd21.prod.outlook.com ([fe80::8526:1b46:61d7:8686]) by BL1PR21MB3160.namprd21.prod.outlook.com ([fe80::8526:1b46:61d7:8686%7]) with mapi id 15.20.7875.002; Thu, 8 Aug 2024 17:41:48 +0000 From: "Kun Qin via groups.io" To: "Ni, Ray" , "devel@edk2.groups.io" CC: "Wu, Jiaxin" , "Tan, Dun" , "Xu, Wei6" , "Zhang, Hongbin1" , "Ni, Ray" , "Kinney, Michael D" Subject: Re: [edk2-devel] Proposing v3 of MM communicate buffer Thread-Topic: Proposing v3 of MM communicate buffer Thread-Index: Adro6QAPLf/WRMT7RNuaRkedI6TpYwAgLKmVABOn43A= Date: Thu, 8 Aug 2024 17:41:48 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=8a5f3bc2-1702-443d-84a2-a63e5af27909;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=true;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=Internal;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2024-08-07T16:33:32Z;MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BL1PR21MB3160:EE_|MWHPR21MB4454:EE_ x-ms-office365-filtering-correlation-id: 65b212ca-4e2b-4f58-de1f-08dcb7d16132 x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?us-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pZz7s/E/BrLmx?= =?us-ascii?Q?GqNMRg7a+1CZ71OFS0/J5hC2Qg5If963JvKRd6RYf6cPTts/CJ5ODiG5e2+r?= =?us-ascii?Q?9tEeZDgMQKt9wa0t5A9+YJjebGU1FJURMJqESLvSo0a9q6NhL5yNwPNg0OUk?= =?us-ascii?Q?ZCk76hrq6s42aBfNUvu/LnWuBAmWc4bHq6dDUvhtJ+kRYXmnCO+/3Dqhmm5Y?= =?us-ascii?Q?kCdFAE7PUtD6ridQUxc+w70LuPK32ovcBoj15M8EojIgoJX1wECBpOB2TezX?= =?us-ascii?Q?ThI0+HDWiaM/iOyEvE84gfG0x5Z/nAUFGPZ+RrbYzlBkrkld5QRltJX4IFJi?= =?us-ascii?Q?/xcn91ISbNLpd2JYR3ByeK4HvnX0u+P2/Agdvxfgk9ZVszn9X4XNAPfFlSh3?= =?us-ascii?Q?Aj5eHWcH9u6tInlNZIzAK7L7I3fqFHoZiXPS+U2j0EaGB4KtLWZJ3SXm5ZI/?= =?us-ascii?Q?MbqTMOwAmzpKUOsTHZDPmDZxOhn84PqTwUle0lLDND/0XZKWpNMqxEjdjSUA?= =?us-ascii?Q?rpCUVXE=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xpOsyqtmj/yjxA3BgmEfEHbGhLk67y0RQDYkVCYipkE4QLXVwR/PU/Rdcf3M?= =?us-ascii?Q?ypGDoa8OIzglDT0Y+UyHgbamufmDH9Y3E6389gHuYARns+4fHK0Zbvh5zLsA?= =?us-ascii?Q?gl9qS0oKEf3iADAX+n0phrrs82YI1vrXc5gA8jOdc1v6zyOJ2mDDERg7xVez?= =?us-ascii?Q?zSWRFL7bKk8tdj/lSvviS7NgEMtvHmQug6prPp+bCVd6uuAbJpATGGq5jAHC?= =?us-ascii?Q?S1Uf/gJqIHUPcCXnY4W/+jAVhBhmXfOPMgC2pAdnmLLbdysSZ14RQ3DhwtPr?= =?us-ascii?Q?dVZg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TJe?= =?us-ascii?Q?8g/60Cx7EqtIlsWaQswcYtGEEEExBUvPDuuNgoiQEojCMEtTVL1Npzhx4rrG?= =?us-ascii?Q?2gghC5u+8Yk/yKOWb/WU+namKgcVn0kdDWG4j4Vb3Rp1xIaFAZcH5G6yogE7?= =?us-ascii?Q?DwXPWaP0UrV5eQhDh8wSjBskHOUkdF7i1pdvLzf7gOBIkhbXRPbwbMbc9hD+?= =?us-ascii?Q?3EiSAPK81o/w1OW+I9Wp+QYdSOYms809HsftmjSPfj2GYQcpVmySh4ImgO7z?= =?us-ascii?Q?KqFbY3C5ftf4so9Z5Wfnm736uH77fZWXzl8w/8CGjMD/MfGMtQxBTnaHiuEv?= =?us-ascii?Q?nEGITSTbCtZAjtvZKX4bGwWcIOCulDEL5UHz43lGSyplbWXHHlCpdglG+E5f?= =?us-ascii?Q?TqJbKm8xabZi2bUjy6NRAjK9rOAli/O76Fx0uoN78N6AUkYF5KXy/wnOV4HS?= =?us-ascii?Q?iYpeTsRijuVTGtEFecL3XQM=3D?= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL1PR21MB3160.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65b212ca-4e2b-4f58-de1f-08dcb7d16132 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Aug 2024 17:41:48.6493 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Ude2nClUGdlZARvmEf2N8Rr1gJkEUHb1xVX49UOCU8HMtW8Aot9/ER0UoHOrU3OpmUOcuO21MyfNnJux3MAIdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR21MB4454 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 Resent-Date: Thu, 08 Aug 2024 23:59:49 -0700 Resent-From: Kun.Qin@microsoft.com Reply-To: devel@edk2.groups.io,Kun.Qin@microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Ji7Pv5dd6No06zFEujcSQPCOx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BL1PR21MB3160535474514AF6B7A9144EE9B92BL1PR21MB3160namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=PKDWV+br; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_BL1PR21MB3160535474514AF6B7A9144EE9B92BL1PR21MB3160namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ray, Thanks for your feedback. The ARM platforms I was exposed to have consisten= t operation mode is only AARCH64, so this proposal is not particularly atta= ched to any ARM problem. I agree that 32bit PEI/DXE communicate into MM will have issue on x86 platf= orms as of today. But I have only heard Intel processors moving to support = x64 PEI/DXE. I think introducing a new MM communicate header will help to p= revent the issue to propagate much further as it might take non-Intel x86 p= latforms years to fully move away from 32bit PEI/DXE. Please let me know if= you have any thoughts. Regards, Kun P.S. Project MU have a thunking module that can launch x64 MM core from 32b= it environment: mu_feature_mm_supv/MmSupervisorPkg/Drivers/MmPeiLaunchers/M= mIplX64Relay.inf at main * microsoft/mu_feature_mm_supv (github.com). We can upstream it to edk2 if folks thi= nk it will help. From: Ni, Ray Sent: Thursday, August 8, 2024 1:15 AM To: devel@edk2.groups.io; Kun Qin Cc: Wu, Jiaxin ; Tan, Dun ; Xu, Wei= 6 ; Zhang, Hongbin1 ; Ni, Ray = ; Kinney, Michael D Subject: [EXTERNAL] Re: Proposing v3 of MM communicate buffer Kun, I like your proposed solution as it is backward compatible. But, I think the new PPI/Protocol is only useful when the CPU mode where PP= I/Protocol is produced does not match the CPU mode in MM. In X86, it could be: 32bit PEI + 64bit MM, 32bit DXE + 64bit MM, or vice ve= rsa. But I doubt the value of support these combinations in X86. Because th= at means the IPL (either PEI or DXE module) needs to support invoking MM Co= re in a different CPU mode. And the latest X86 platforms are switching to 64bit PEI + 64bit DXE + 64bit= MM. Does the proposal try to solve some ARM problem? Can you explain the necess= ity? I would like to avoid the complicated interfaces which do not solve a = practical problem. Thanks, Ray ________________________________ From: devel@edk2.groups.io > on behalf of Kun Qin via groups.io > Sent: Thursday, August 8, 2024 2:14 To: devel@edk2.groups.io > Subject: [edk2-devel] Proposing v3 of MM communicate buffer Hi all, I am trying to propose a change into PI spec and would like to gather some = feedback in this forum. Essentially, the current communicate header contains a UINTN field in place= , which is causing programing errors when trying to communicate the message between different operation m= ode (i.e. PEI in IA32 communicate into MM in x64). There are various implementations at large to = compensate for this size discrepancy through the edk2 codebase, thus fixing the existing commun= icate buffer definition will be less feasible. Thus I think proposing a new structure and implement= the corresponding header parser will be a simpler approach, which also allows a bit more flexibility= to inject new features/checks into the communication channel. The proposed change for the spec is detailed here: https://github.com/kuqin12/edk2/blob/BZ3398-MmCommunicate-Length-v4/CodeFir= st/BZ3430-SpecChange.md And the code first change is listed here: https://github.com/kuqin12/edk2/blob/BZ3398-MmCommunicate-Length-v4/ Could you please provide me with any feedback that you think might be helpf= ul for future usage of MM communicate? Any input is appreciated. Regards, Kun -=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 (#120307): https://edk2.groups.io/g/devel/message/120307 Mute This Topic: https://groups.io/mt/107775882/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- --_000_BL1PR21MB3160535474514AF6B7A9144EE9B92BL1PR21MB3160namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Ray,

 

Thanks for your feedback. The ARM platforms I was e= xposed to have consistent operation mode is only AARCH64, so this proposal = is not particularly attached to any ARM problem.

 

I agree that 32bit PEI/DXE communicate into MM will= have issue on x86 platforms as of today. But I have only heard Intel proce= ssors moving to support x64 PEI/DXE. I think introducing a new MM communicate header will help to prevent the issue to propagate mu= ch further as it might take non-Intel x86 platforms years to fully move awa= y from 32bit PEI/DXE. Please let me know if you have any thoughts.

 

Regards,

Kun

 

P.S. Project MU have a thunking module that can lau= nch x64 MM core from 32bit environment: mu_feature_mm_supv/MmSupervisorPkg/Drivers/MmPeiLaunchers/MmIplX64Relay.inf= at main · microsoft/mu_feature_mm_supv (github.com). We can ups= tream it to edk2 if folks think it will help.

 

From: Ni, Ray <ray.ni@intel.com&g= t;
Sent: Thursday, August 8, 2024 1:15 AM
To: devel@edk2.groups.io; Kun Qin <Kun.Qin@microsoft.com>
Cc: Wu, Jiaxin <jiaxin.wu@intel.com>; Tan, Dun <dun.tan@int= el.com>; Xu, Wei6 <wei6.xu@intel.com>; Zhang, Hongbin1 <hongbin= 1.zhang@intel.com>; Ni, Ray <ray.ni@intel.com>; Kinney, Michael D = <michael.d.kinney@intel.com>
Subject: [EXTERNAL] Re: Proposing v3 of MM communicate buffer

 

Kun,

I like = your proposed solution as it is backward compatible.

&n= bsp;

But, I = think the new PPI/Protocol is only useful when the CPU mode where PPI/Proto= col is produced does not match the CPU mode in MM.

&n= bsp;

In X86,= it could be: 32bit PEI + 64bit MM, 32bit DXE + 64bit MM, or vice versa. Bu= t I doubt the value of support these combinations in X86. Because that mean= s the IPL (either PEI or DXE module) needs to support invoking MM Core in a different CPU mode.

And the= latest X86 platforms are switching to 64bit PEI + 64bit DXE + 64bit MM.

&n= bsp;

Does th= e proposal try to solve some ARM problem? Can you explain the necessity? I = would like to avoid the complicated interfaces which do not solve a practic= al problem.

&n= bsp;

Thanks,=

Ray

&n= bsp;


From: <= /span>devel@edk2.groups.io<= /a> <devel@edk2.groups.io> on behalf of Kun Qin via groups.io <Kun.Qin=3Dmicrosoft.com= @groups.io>
Sent: Thursday, August 8, 2024 2:14
To: 
devel@edk2= .groups.io <devel@edk2.groups.io>
Subject: [edk2-devel] Proposing v3 of MM communicate buffer

 

Hi all,

 

I am trying to propose a change into PI spec and would like to gather s= ome feedback in this forum.

 

Essentially, the current communicate header contains a UINTN field in p= lace, which is causing programing

errors when trying to communicate the message between different operati= on mode (i.e. PEI in IA32

communicate into MM in x64). There are various implementations at large= to compensate for this

size discrepancy through the edk2 codebase, thus fixing the existing co= mmunicate buffer definition

will be less feasible. Thus I think proposing a new structure and imple= ment the corresponding header

parser will be a simpler approach, which also allows a bit more flexibi= lity to inject new features/checks

into the communication channel.

 

The proposed change for the spec is detailed here:

https://github.com/ku= qin12/edk2/blob/BZ3398-MmCommunicate-Length-v4/CodeFirst/BZ3430-SpecChange.= md

 

And the code first change is listed here:

https://github.com/kuqin12= /edk2/blob/BZ3398-MmCommunicate-Length-v4/

 

Could you please provide me with any feedback that you think might be h= elpful for future usage of MM

communicate? Any input is appreciated.

 

Regards,

Kun

 

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#120307) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_BL1PR21MB3160535474514AF6B7A9144EE9B92BL1PR21MB3160namp_--