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.8848.1688525315050971773 for ; Tue, 04 Jul 2023 19:48:35 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=KCpPrRHe; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688525315; x=1720061315; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=Y0bFA7dUjsFBFOkR92e9Me2aGSYe5SgJQ6TbkOroqAc=; b=KCpPrRHe0BVelA6DebUjbMV6XdPVeke8ZEm+8+peRbBQsym7u65sxHWi yZWY3EkyocqHpHMunNbSSHx+Fye7MWQczkyPKf8xsoP9ZO1dHdOAsYgXx EOFOwmfRfMexgbr697tq9qrHP6zq7eNpNiCVw3D6YsD8IRmhO87uEnjFA unPcpNGY5/MdF3obSh96AATPfxJlOmhl3STb5ljy6dHSXDl1I9Juo9yo1 I2JMyhaX0jlhufufdlGdT/1qs0ACEvjAzT5D3TcDmJoQBazoWWZvUsMrm ubwXxsUbvtaILLvSZ/ltpRACN+Cc9voUXKBQU20Axu99Ma115a8HeuBmy w==; X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="362095805" X-IronPort-AV: E=Sophos;i="6.01,181,1684825200"; d="scan'208";a="362095805" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2023 19:48:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="832348389" X-IronPort-AV: E=Sophos;i="6.01,181,1684825200"; d="scan'208";a="832348389" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga002.fm.intel.com with ESMTP; 04 Jul 2023 19:48:34 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 4 Jul 2023 19:48:33 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 4 Jul 2023 19:48:33 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Tue, 4 Jul 2023 19:48:33 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Tue, 4 Jul 2023 19:48:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hyWAFiyfgKrftN/7wdqBRDbza3B/apeyPlYpQIN4xgPon+MBtNhol556gR3jVs8IOYfxDPkOjxYArGgGzMLAa/jVEdDk2PL4oq9Il/WTlwfcCwyoKuixJxZKY0H8jxs+5hXh4QzJE9lKUOFeroDn9ncucq8xjvnltn17H6ndLdglNEaf5Lof0VOh0yTcuk6V6GNRCv7k3sqyoKQXOLWr0gJo3u3XeTp2s6NuR16I4mHUT78/2yb0OQ4AeIgXpAYNiVu72xF+JWE8z7wk16xQiGmnlJPVmDREnhmeJidMz+puxj4Ds87YL5UNfJwqBlCiSc1wanv+i5Bc+dz9BwjJbw== 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=OKUMn+3pxSqPRnJwEXC5H8bIbx35QilFwmkqbOE0VlA=; b=N+TovJp5uwyubLO6gSCyeJJyd9tOVia3+EPP1Xh7ujnMyKZpTFcAFMbg1XFZobxnv/Cy/YiXGV8O9cPAI66xALHIQvkj0u0q4VVpFC9iFyDW6ll5dakTK8oxVWwiCZKR1Atl+EOq5gQ06RJJQdbPhcXPebBc1/Nr9PUOGowGVmflMf01yTnPNdUJZhtF6PHxsu2ovgEraojcm3mRDQAxtZRNb950X8DsMlszwgy62VDNcg+qa7qvD/GlaxwLswk7wT90UlCPTTudZqJeqjsIrIsNwDEbAOvHZzq/YeidAzPJSK5hf5BGTl+bcP6/YjnMN4HMJN1JbADHLJQwpFxfQQ== 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 Received: from MN6PR11MB8244.namprd11.prod.outlook.com (2603:10b6:208:470::14) by CO1PR11MB4881.namprd11.prod.outlook.com (2603:10b6:303:91::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 02:48:30 +0000 Received: from MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::5542:6ddb:ea31:33df]) by MN6PR11MB8244.namprd11.prod.outlook.com ([fe80::5542:6ddb:ea31:33df%4]) with mapi id 15.20.6544.024; Wed, 5 Jul 2023 02:48:30 +0000 From: "Ni, Ray" To: "devel@edk2.groups.io" , "Xie, Yuanhao" Subject: Re: [edk2-devel] [Patch V4 0/5] Eliminate the second INIT-SIPI-SIPI sequence Thread-Topic: [edk2-devel] [Patch V4 0/5] Eliminate the second INIT-SIPI-SIPI sequence Thread-Index: AQHZqZ11D8H3ADpkrUWe0zj66pm4bq+qgw5w Date: Wed, 5 Jul 2023 02:48:30 +0000 Message-ID: References: <20230628084724.57574-1-yuanhao.xie@intel.com> In-Reply-To: <20230628084724.57574-1-yuanhao.xie@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN6PR11MB8244:EE_|CO1PR11MB4881:EE_ x-ms-office365-filtering-correlation-id: a962ea55-87d3-4df2-244e-08db7d0250f8 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PVWpMXykteBMqbK/GMqm102B2y6FA4aqQ3qTqYo0o10jFq31HnuVDtpoi6OSlXU5gLJhGTz5RD5ldTcvnVkbqEtOQZrvnCFQy2PDl4iIle9gN0EQiScXTSgtZt5SF7GT69D2rrezIwxVFjRE9LfkpdnIDC30flExUBOsK2knh360Fe/kbqGfpHM54QsoSXkj+wF4sVJBMa5VKUtt8W+/dmrD576l/cNq3pGJ8P8uYNwoaf0xlB7tusRuVg08m+EKkm0uXoAwhlVLgaGMKPHSsV+cRBomyWxRW4lnvtvHc4Iy/+uXyEPG+KmSUaQW9uhQmiOjHilkhE7DBvpsQISldTNPFckHlegjPqFVnK+WY1GDTqBtjv63rNPAqrbvX8BGw3mxbtJbt8/xn+seK4oWLaegmzZ/TcpNkfaRWV8hAjflTBOnrDSIYSR7kiDdiUIyl/LgOiIQVs3kTckctNN31SkvBF6EbnoU9yYS0RlRmrFmpDGd9yjoOgJ2LOHhPloAnZaP5HPT4vcSqyq3RDZU4gobrAdUIz4JY0S7AcxgXCW1z+yUQcSfyifR6qaJcJEY/dmzL8QhRC6Q6ZP7Zp4AoRfGu3RmgTYX6QPRtb0xXiUvVIxIzsYMe9ZjgwtyxH955rilGm1MX+EvQjK0rP/u+A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN6PR11MB8244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(136003)(396003)(376002)(366004)(39860400002)(346002)(451199021)(2906002)(83380400001)(38100700002)(122000001)(33656002)(38070700005)(86362001)(82960400001)(55016003)(71200400001)(53546011)(5660300002)(6506007)(8936002)(7696005)(966005)(41300700001)(8676002)(316002)(76116006)(52536014)(6636002)(66556008)(66946007)(64756008)(66476007)(66446008)(110136005)(9686003)(66899021)(478600001)(19627235002)(186003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?w6+6SfibZXebWwr0tcEULZQ6c3SwZUu7Mr8mpzlu73iuL+8ngkFAx/p+bqfb?= =?us-ascii?Q?PHFCWEzyR6c++GSTbADYKtN317cGMrFRb70Sb1jceVmDk0Gp8SwIdaclrPwC?= =?us-ascii?Q?54YpfYmzvhiv74B9DQ3Cd4MHKLolKOhWQwsMEwhQjQuv0R4TYRIS9nSIh86L?= =?us-ascii?Q?d8FvPiNQ4t4/+AZzUupqYYzPVoF6FSCFeS02gcGSYptFIAidBPzmBfD9RA7I?= =?us-ascii?Q?f0EKaI2Vgtv//O4I4OdRkcBrab+vAuZezjLrdVSb/fohqfN3UeE6pyKHr3az?= =?us-ascii?Q?E3uIkOnletZc/3bSnFje0q992waxZDX0KYPW8TrXOweYBgZ+KN7xm/Qw6hVK?= =?us-ascii?Q?JrC3YhUkNvS9gbNc3NhLeGER9Y1MKQJoBTHxDMSpHaQZt0ZwGBuqm4icNmv7?= =?us-ascii?Q?/Mnrstc4u7q2XUKDtjjbfszK/KgnqHUSjpt3jqhsrnvAGqMsKlvcwfVaPIOv?= =?us-ascii?Q?PtwPPfSa8G2YZ99QjPj+H7CSimPLmCgGwyhSYk18t+TJ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ABK6MKb0DBZbo7eHSlA6vXMuQhFloyQhATiRsSXY?= =?us-ascii?Q?9CbkvLkIAEOrKQtR1GdSIw8X+j4CRXMlmXsgfe00zIEG/LlIuHGHD7QXo+b3?= =?us-ascii?Q?FHAu7yMDt6Ul5sLvB+cP5KBpQRxgQUHFj4Vcn9mLW3muXdTZojeihBhamg?= =?us-ascii?Q?=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN6PR11MB8244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a962ea55-87d3-4df2-244e-08db7d0250f8 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2023 02:48:30.4379 (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: i+gZDu0ck88O+LfxIj6ZdYCdBOvppWZ1hGMupo8IDMna3MzsyEvr39CnVQFDYBJQJ9iKKuVffxAv9rS9fn60Xg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4881 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Yuanhao Xi= e > Sent: Wednesday, June 28, 2023 4:47 PM > To: devel@edk2.groups.io > Subject: [edk2-devel] [Patch V4 0/5] Eliminate the second INIT-SIPI-SIPI > sequence >=20 > To speed up MP initialization, this set of patches replaces the > time-consuming init-sipi-sipi process in the DXE phase. Instead, > a start-up signal is used to wake up the APs and switch context > from the PEI phase to the DXE phase. This optimization is > effective when both PEI and DXE operate in the same bit mode. > The current HOB characterized by mCpuInitMpLibHobGuid has > two purposes: > Acting as a global variable for the PEI phase. > Transferring information from the PEI phase to the DXE phase. > This series of patches creates a new HOB specifically designed > to transfer only the minimal necessary information > (MpHandoff structure) from the PEI phase to the DXE phase. >=20 > YuanhaoXie (5): > UefiCpuPkg: Refactor the logic for placing APs in HltLoop. > UefiCpuPkg: Refactor the logic for placing APs in Mwait/Runloop. > UefiCpuPkg: Create MpHandOff. > UefiCpuPkg: ApWakeupFunction directly use CpuMpData. > UefiCpuPkg: Eliminate the second INIT-SIPI-SIPI sequence. >=20 > UefiCpuPkg/Library/MpInitLib/AmdSev.c | 17 +++++++++++++++++ > UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 1 + > UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm | 4 ++-- > UefiCpuPkg/Library/MpInitLib/MpHandOff.h | 47 > +++++++++++++++++++++++++++++++++++++++++++++++ > UefiCpuPkg/Library/MpInitLib/MpLib.c | 345 > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > ++++++++++++++++++++-----------------------------------------------------= ------------ > UefiCpuPkg/Library/MpInitLib/MpLib.h | 28 > ++++++++++++++++++++++++++++ > UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 2 +- > UefiCpuPkg/Library/MpInitLib/PeiMpLib.c | 32 > +++++++++++++++++++++++++++++++- > UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 3 +-- > 9 files changed, 408 insertions(+), 71 deletions(-) > create mode 100644 UefiCpuPkg/Library/MpInitLib/MpHandOff.h >=20 > -- > 2.36.1.windows.1 >=20 >=20 >=20 >=20 >=20