From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.6774.1602220971016501550 for ; Thu, 08 Oct 2020 22:22:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=cFnePVVJ; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: siyuan.fu@intel.com) IronPort-SDR: B+nxq86+P1uenJ/cKXatc8f4F9vOvFuRuTQVXhqPFza42pHYVaPT7ofwKR3DAT0b2tRlkKKua3 qxydNsxAceAw== X-IronPort-AV: E=McAfee;i="6000,8403,9768"; a="227092806" X-IronPort-AV: E=Sophos;i="5.77,353,1596524400"; d="scan'208";a="227092806" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 22:22:49 -0700 IronPort-SDR: tbKcbSsYhLNo85OfF8HXW786YNdYFD3LbJYkgxVoOJgVjVLkQ8n2qZ+HB4BCQFhNi1i7/rv55j r1KcajhDnf4A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,353,1596524400"; d="scan'208";a="344956163" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga008.jf.intel.com with ESMTP; 08 Oct 2020 22:22:49 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 8 Oct 2020 22:22:49 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 8 Oct 2020 22:22:49 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.46) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 8 Oct 2020 22:22:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ni4Jt+KzLMVn8XF2Ejq37ECXydeqpju1lQ2g8VibZCQYx17Ad5nZ1wZhI4U2GH3Mx3NaJUgyPMNDGhGMWIwtQGD8+bsYtnpTpEaCoascDtaA/tJko40elB/QCrVUNHWiJhNC13xoiaGUQoj1YTLYBcOYG8i56prRpXzG1003bDiphyVoPHPE2VlgBvatxkXBJrhxRnS7nBfjzzeSTGUm1Amy+PRpbG+Mr2kyHMvSn6IYYtwBTNsNBKvBbxIw4OYHOCy4DnAs8nXIDSWg1ECFQ9sgL/iFURG9amxk4B6AhgWt22PSUeAsk05cHXqKe1tS2kCxn/TPpakdVQUnPd6rxg== 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=EhuBKrCzOkHKDBq+GoL5dEFWni+HNX79/fhnfhcP9VA=; b=VTfbzWMr1Alvo0eQB1qF30dTxUlG4qP4QzdQYGoJHeIgVl3vJtx061bCYocC6cblk7i07xsAxy3jt6V8b3oRZoPNoDdUpOipODZBn3mw6hqVD1kjgHUwuR2CEeV7c/K6L72lW7aRglrLOCyJYxLwVkAilNTBBFZuEMnKpGysvvTUPESNBk20I55JAxszEn76AR9MYhpLHBzv6bkcwHEk6NlKVXVnga0AzKciUpunjXlMIxWuYHKJWYqRYM6JjZ9QrZilXeb+lpPDEvc/xtBmAj+dztQWyNXkk3UNR8LDKAioqlSWMsJXCQzw1xq6C0lplYA+UIAnUsTgx8S67Sc8HA== 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=EhuBKrCzOkHKDBq+GoL5dEFWni+HNX79/fhnfhcP9VA=; b=cFnePVVJUZO00pOoJlJIVFD5Vw4s+U6SgbWkUsnSIb7eGbwUMyDWGwCvWLVLz5JACDcLDxw9gm9uk+QYIL3+Nk34VBHB/f9VCX8eHcTSDXi9fau3qrpfxotIoRYli4HJFv5LSJO3bMpw1DXh3BxatfuMn2HAbSdTj/7zaWBoQS8= Received: from SN6PR11MB2863.namprd11.prod.outlook.com (2603:10b6:805:5c::25) by SN6PR11MB3038.namprd11.prod.outlook.com (2603:10b6:805:cd::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.21; Fri, 9 Oct 2020 05:22:48 +0000 Received: from SN6PR11MB2863.namprd11.prod.outlook.com ([fe80::cc74:c3ef:13c8:5ae6]) by SN6PR11MB2863.namprd11.prod.outlook.com ([fe80::cc74:c3ef:13c8:5ae6%5]) with mapi id 15.20.3433.045; Fri, 9 Oct 2020 05:22:47 +0000 From: "Siyuan, Fu" To: "devel@edk2.groups.io" , "rfc@edk2.groups.io" CC: "Dong, Eric" , "Ni, Ray" , "ard.biesheuvel@arm.com" , "sami.mujawar@arm.com" , "Yao, Jiewen" , "supreeth.venkatesh@arm.com" Subject: [RFC] Support Both MM Traditional and Standalone Drivers with One MM Core Thread-Topic: [RFC] Support Both MM Traditional and Standalone Drivers with One MM Core Thread-Index: Adad/BvDcwINIpsnRk6CdDy+J9zhMg== Date: Fri, 9 Oct 2020 05:22:47 +0000 Message-ID: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action 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.198.147.195] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 15c66481-c4d1-4522-7592-08d86c135c2d x-ms-traffictypediagnostic: SN6PR11MB3038: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ZYytnvSOzPT9YqtDBrcanLe4ysr/rw+nYCmDk+OSlaw47CphPdbcwzgc61Urxcs7/aYgkrG+xFgoi2Zm1SrYv4CcXji4tU8lKok6j3r3hESgUGArdmlnbWwQ5eW5UgNzkro1z0oHhtiZ1A6TghUtuQ2sla471FI5YMDjxezwvjrJiSf3hTK7cqU89gaj/nTiKIhMoStMuUvlC47Va44IZqqfT6z/THElgAnRxzccNdCOtOPjVBNkSnqBJQF3brq/c8QH3Hl1YDFv1/tdqIMt9ov8FDhrwmeOzmH10zncRQFazNStUQ8VL93tVD3u2iK7WWUa8N82VOpNdyUfDnrWfw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2863.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(39860400002)(136003)(366004)(376002)(346002)(64756008)(54906003)(26005)(8936002)(66946007)(316002)(83380400001)(33656002)(5660300002)(66446008)(76116006)(55016002)(66476007)(71200400001)(2906002)(478600001)(66556008)(4326008)(52536014)(9686003)(110136005)(186003)(8676002)(6506007)(7696005)(86362001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: VwdsjABEeX5OWQSLTyJ5i6TO7yzYRK1kBjBa007ncI7x5Lpqhf13vDelr6VRfOPD6dFj+/Utgh5MocU/evr0UU5Jo7B94dLfJ5EwDlNZPswI/ycp18jvorZNy6KUnIWa7ndfTRw+eLBWXfDXRVJvCKEfRy6AxbQqb6v0uqTUeZGWa4MYbkgFf84DYxKi3Zxzp3lKKeKm+mgtR93GVElGc8Dwd4POuqR5k07f8nF14B5CLeSTpRy/PUlyTc2IT7dFfMRkCJh5UcaaG+HuHjQeZLVRE+xkHFaeV+qwXfetwIN2PeUdFDwAjgUX+ENUabmY4OxBZL4yRwSXfgkUMgq73cp1lSc2o5V/M/cT5f3C74N6vuspA88JG2kMvN0cUr9NtelNym7uu9qUZAMpqCIncZpUI0eyf07gUKVC8CU6js07PBTVCYIoEul7qanksNf6LJaBi4OnlkfRgjFf5+rrBHZtbXoOPY1g1r54fb4d8NZu/PRe5LDkCQGCMHpEVj1MoEUTtVhf6FB4p3qbix3omziHc3v5PIz00jIXCqKFBuZS09o9rhm4dr95mnsxD1tHRfKRQNdhNBbNmI9ibW/ULtk0pQPtUZ9DGc5dvjvWJzcyF3Py30Xd+5Uozn6ApUPjPTAz6G3reuhulHGcxvCLGg== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2863.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15c66481-c4d1-4522-7592-08d86c135c2d X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Oct 2020 05:22:47.4509 (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: eyvQFQPd2S/C214rXpy0bdmjOhxU2AuCr8ARl0s0Jl11Eflo4qroDacgQiusUBgWdFGHiEesi5TwYxFN40lzkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3038 Return-Path: siyuan.fu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, All This email is to collect feedback about making one common EDK2 MM Core driv= er to support both MM Traditional drivers and MM Standalone drivers. We know that PI Spec defines two types of MM-related drivers: MM Traditiona= l Drivers and MM Standalone Drivers. There are two MM Core modules exist in= EDK2 but each of them can only support one single type of MM drivers: - PiSmmCore in MdeModulePkg supports MM Traditional driver dispatch. It= doesn't have FV parsing logic and relies on EFI Firmware Volume2 Protocol = for driver discovery. It doesn't support MM Standalone driver. - StandaloneMmCore in StandaloneMmPkg supports MM Standalone driver dis= patch. It has FV parsing and decompress logic but only limited to one singl= e firmware volume (called standalone BFV in code). It doesn't support MM Tr= aditional driver. However, a platform may want to have both of the two types of MM drivers co= exist in its firmware, for example, when it tries to transfer from Traditio= nal MM mode to Standalone MM mode, in a stage by stage manner. However, it'= s not possible with current EDK2 MM Core because of above limitations. Thus= , here we propose to have a common MM Core module in EDK2, which could: - Support both MM Traditional drivers and MM Standalone drivers. - Use shared Depex evaluation when dispatching all the MM drivers. - Use a shared MM System Table when invoking all the MM drivers' entry = point, which mean handle/protocol database is shared. - Have self-contained FV parsing and driver discovery capability. We realized there could be 2 possible options to make this happen: - Option 1: Update the MdeModulePkg Core. In this approach, we will nee= d to add the FV decompress, driver discovery and MM Standalone driver dispa= tcher to the PiSmmCore module in MdeModulePkg. - Option 2: Update the StandaloneMmPkg Core. Which means adding MM Trad= itional dispatcher and multiple FV support to existing standalone Core in S= tandaloneMmPkg. Will also need to add PEI/DXE IPL module to invoke the Stan= dalone MM Core and pass UEFI System Table to it. The option 1 will have less impact to those platforms which only use MM Sta= ndalone drivers currently, because those platforms can stay with the unchan= ged Standalone MM Core. While option 2 looks more like a clean solution bec= ause it could support all the cases (Traditional MM only, Standalone MM onl= y, and mix-used platform). So I'd like to hear the community's feedback abo= ut which option is preferred, and let me know if you have any concerns with= this change. Thanks! Best Regards Siyuan=20