From nobody Sun May 5 14:09:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+95883+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95883+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1667453883; cv=none; d=zohomail.com; s=zohoarc; b=JFzY6z6AV9BaB2JOr8OrbpmkuxnYlVti1yvo76H3IgYQaY2tzoqHpG8UZnH7XkJjT5d2+mJMEJjV/O19ssZVfmEzy5XBpsbK1qrLO6pDnIdRU4tijsbHHRW7OuTI3NZwvjAzdLnj4vbsbyRHuMPuZxPgGs9yhoTjeZIignN+xv8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667453883; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=khBc63sxks/Klpkx6FxfaJhY/F+I8Xixo2WmlmI93bA=; b=Nx8cw0fXZhIV51ejag3Z3Gz/YON/2JEfvgBzmCNnAl3Qr8TaNV1FmG3XP8f54JNs6PJLhSYvs+Bv9Thslaj+lD7oEsCUdN26dGAvdtZd7acPDr72Eq4W/+wDtrQANJidrpRV2knIdcclRG8COtQopgE+PXVeiG+qHJNyc/X9lQg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95883+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1667453883094690.1482780548833; Wed, 2 Nov 2022 22:38:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LjPGYY1788612xeCWod3umso; Wed, 02 Nov 2022 22:38:02 -0700 X-Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web08.15919.1667453877740586469 for ; Wed, 02 Nov 2022 22:38:01 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10519"; a="307207604" X-IronPort-AV: E=Sophos;i="5.95,235,1661842800"; d="scan'208";a="307207604" X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2022 22:38:01 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10519"; a="963805702" X-IronPort-AV: E=Sophos;i="5.95,235,1661842800"; d="scan'208";a="963805702" X-Received: from shwdeopenlab705.ccr.corp.intel.com ([10.239.56.33]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2022 22:37:59 -0700 From: "Yuanhao Xie" To: devel@edk2.groups.io Cc: Yuanhao , Eric Dong , Ray Ni , Rahul Kumar Subject: [edk2-devel] [PATCH 1/3] UefiCpuPkg: Remove the duplicate loading of microcode in DXE stage Date: Thu, 3 Nov 2022 13:37:45 +0800 Message-Id: <20221103053747.289-2-yuanhao.xie@intel.com> In-Reply-To: <20221103053747.289-1-yuanhao.xie@intel.com> References: <20221103053747.289-1-yuanhao.xie@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,yuanhao.xie@intel.com X-Gm-Message-State: FfVqVqN4UhVetqghi6qe5LjIx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1667453882; bh=2d9ZrebaUQyJ+C8opswJFyhCl/w7PuFSs9/HGxwHxtw=; h=Cc:Date:From:Reply-To:Subject:To; b=iQXuZ9JRikV1qDd5XzhtGGv6l3ZtuSDiZOx4aKSXbm8dF3suulRJOzgq8XxkIb1H/XG HpoREYcHrwRyXK5De0/a46Iu9VQtJPNZ+3e8f2IGsXk1kvAOWCMQqVCeoU4+o3zWsJq0E rA3aQpOfkYYP+gQdHP/wOp5iQHlcyAO9HNk= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1667453884722100007 Content-Type: text/plain; charset="utf-8" From: Yuanhao If both in the DXE and PEI phase Mp initialization is excuted, the microcode loading during Mp initialization of the DXE stage can be removed regardless of the bit modes. Signed-off-by: Yuanhao Xie Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Reviewed-by: Ray Ni --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 58 ++++++++++++++++++++++++++++++++= +++++++++----------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpIn= itLib/MpLib.c index 1c053f87a4..5430688946 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -432,6 +432,27 @@ ApFuncEnableX2Apic ( SetApicMode (LOCAL_APIC_MODE_X2APIC); } =20 +/** + Sync BSP's MTRR table to AP during waking upAp + + @param[in, out] Buffer Pointer to private data buffer. +**/ +VOID +EFIAPI +ApMtrrSync ( + IN OUT VOID *Buffer + ) +{ + CPU_MP_DATA *CpuMpData; + + CpuMpData =3D (CPU_MP_DATA *)Buffer; + + // + // Sync BSP's MTRR table to AP + // + MtrrSetAllMtrrs (&CpuMpData->MtrrTable); +} + /** Do sync on APs. =20 @@ -1977,6 +1998,23 @@ MpInitLibInitialize ( // CollectProcessorCount (CpuMpData); } + + if (!GetMicrocodePatchInfoFromHob ( + &CpuMpData->MicrocodePatchAddress, + &CpuMpData->MicrocodePatchRegionSize + )) + { + // + // The microcode patch information cache HOB does not exist, which m= eans + // the microcode patches data has not been loaded into memory yet + // + ShadowMicrocodeUpdatePatch (CpuMpData); + } + + // + // Detect and apply Microcode on BSP + // + MicrocodeDetect (CpuMpData, CpuMpData->BspNumber); } else { // // APs have been wakeup before, just get the CPU Information @@ -1994,22 +2032,6 @@ MpInitLibInitialize ( } } =20 - if (!GetMicrocodePatchInfoFromHob ( - &CpuMpData->MicrocodePatchAddress, - &CpuMpData->MicrocodePatchRegionSize - )) - { - // - // The microcode patch information cache HOB does not exist, which mea= ns - // the microcode patches data has not been loaded into memory yet - // - ShadowMicrocodeUpdatePatch (CpuMpData); - } - - // - // Detect and apply Microcode on BSP - // - MicrocodeDetect (CpuMpData, CpuMpData->BspNumber); // // Store BSP's MTRR setting // @@ -2026,9 +2048,11 @@ MpInitLibInitialize ( // in DXE. // CpuMpData->InitFlag =3D ApInitReconfig; + WakeUpAP (CpuMpData, TRUE, 0, ApMtrrSync, CpuMpData, TRUE); + } else { + WakeUpAP (CpuMpData, TRUE, 0, ApInitializeSync, CpuMpData, TRUE); } =20 - WakeUpAP (CpuMpData, TRUE, 0, ApInitializeSync, CpuMpData, TRUE); // // Wait for all APs finished initialization // --=20 2.36.1.windows.1 -=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 (#95883): https://edk2.groups.io/g/devel/message/95883 Mute This Topic: https://groups.io/mt/94751256/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 5 14:09:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+95884+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95884+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1667453885; cv=none; d=zohomail.com; s=zohoarc; b=Yr8IH7te/hPpAQGhmFQI3MyJaHIZoOf9xCeCQp3LYEMXIzBtZ7HZccAa1fqw+P/qBuHpuvxN/EM5kCQeOKAlJn1SS0W0xCaxg48O+gO5JwXZhXvKL2XD3d8N0fNyox5dOQZhR6bDlkrhEzkS07Ff/gBp4f3SBRzUOFz+v2vFt6s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667453885; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=B1Y3KaaTnt3z1x6EVN8uJqCpA7Pf6we2WAZVerluhBg=; b=jQ9vAiYZiBCBb03ty7mBtIgGH3NU6AEX2q/zglqVck+vzlHynuFch0l3wH4nCCkLkQ1AmRb8grX8EUlBSheru7VTUA/2EgeO3BzHY7Ye5XQsV42vhG/gwuP3CjqdhL8bqqFsyeHj4Lr2g22fbStR4bOnq4gQ3PHKKesgdM+hj6s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95884+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1667453885969402.2084280313368; Wed, 2 Nov 2022 22:38:05 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id wcIrYY1788612xXcSzLkJ4wi; Wed, 02 Nov 2022 22:38:05 -0700 X-Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web08.15919.1667453877740586469 for ; Wed, 02 Nov 2022 22:38:05 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10519"; a="307207609" X-IronPort-AV: E=Sophos;i="5.95,235,1661842800"; d="scan'208";a="307207609" X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2022 22:38:05 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10519"; a="963805724" X-IronPort-AV: E=Sophos;i="5.95,235,1661842800"; d="scan'208";a="963805724" X-Received: from shwdeopenlab705.ccr.corp.intel.com ([10.239.56.33]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2022 22:38:03 -0700 From: "Yuanhao Xie" To: devel@edk2.groups.io Cc: Yuanhao , Eric Dong , Rahul Kumar , Ray Ni Subject: [edk2-devel] [PATCH 2/3] UefiCpuPkg: Skip Mp initialization in DXE phase Date: Thu, 3 Nov 2022 13:37:46 +0800 Message-Id: <20221103053747.289-3-yuanhao.xie@intel.com> In-Reply-To: <20221103053747.289-1-yuanhao.xie@intel.com> References: <20221103053747.289-1-yuanhao.xie@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,yuanhao.xie@intel.com X-Gm-Message-State: aHUT9nbzglWtvtDySgp2peSxx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1667453885; bh=EnBOuOwUI0nG+MvaAUEDEGPH9xfVEDDJl0llPasFHak=; h=Cc:Date:From:Reply-To:Subject:To; b=Ty00QoA9ciTy9ACSLtpvd0LhUAVApUOOuzGvytJOdVe6PcoKrboJfXyp9MTOO0pkTyz 0VO8jOJu703XswnkrhIUEjDftHdAtJCh8l6CtAJMX5T2/G9lCs+iTUhlAjd8oaoYKZKjw 0eSFxAdjBTaZMnMRuhnP8jzRT1hhwqvl6h4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1667453886947100001 Content-Type: text/plain; charset="utf-8" From: Yuanhao If PEI and DXE stages are in the same bit mode, Mp initialization is removed in DXE phase. Signed-off-by: Yuanhao Xie Cc: Eric Dong Cc: Rahul Kumar Cc: Ray Ni Reviewed-by: Ray Ni --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 128 +++++++++++++++++++++++++++++++= ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------= ---------------------- UefiCpuPkg/Library/MpInitLib/MpLib.h | 1 + 2 files changed, 90 insertions(+), 39 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpIn= itLib/MpLib.c index 5430688946..c7d1e58909 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -1842,12 +1842,36 @@ MpInitLibInitialize ( UINTN ApResetVectorSizeAbove1Mb; UINTN BackupBufferAddr; UINTN ApIdtBase; + BOOLEAN FirstTimeMpInitializing; =20 - OldCpuMpData =3D GetCpuMpDataFromGuidedHob (); - if (OldCpuMpData =3D=3D NULL) { + OldCpuMpData =3D GetCpuMpDataFromGuidedHob (); + FirstTimeMpInitializing =3D (BOOLEAN)(OldCpuMpData =3D=3D NULL); + + if (FirstTimeMpInitializing) { MaxLogicalProcessorNumber =3D PcdGet32 (PcdCpuMaxLogicalProcessorNumbe= r); + // + // The first time Mp is initialized, or the saved CpuMpData is lost, t= he + // complete process including preparing the buffer, filling the CpuMpD= ata, + // loading the microcode, and waking up the Aps needs to be performed. + // } else { MaxLogicalProcessorNumber =3D OldCpuMpData->CpuCount; + // + // If both PEI and DXE phases are 64-bit, CpuMpdata collected in PEI s= tage + // can be reused in DXE stage, thus no need to redo the initialization. + // For the case where DXE is 64-bit and PEI is 32-bit, a partial + // initialization of Mp is required. + // + if (OldCpuMpData->SizeOfUINTN =3D=3D sizeof (UINTN)) { + DEBUG ((DEBUG_INFO, "OldCpuMpData->SizeOfUINTN: %04d, sizeof (UINTN)= : %04d\n", OldCpuMpData->SizeOfUINTN, sizeof (UINTN))); + + OldCpuMpData->NewCpuMpData =3D OldCpuMpData; + // + // Initialize global data for MP support + // + InitMpGlobalData (OldCpuMpData); + return EFI_SUCCESS; + } } =20 ASSERT (MaxLogicalProcessorNumber !=3D 0); @@ -1991,7 +2015,7 @@ MpInitLibInitialize ( // ProgramVirtualWireMode (); =20 - if (OldCpuMpData =3D=3D NULL) { + if (FirstTimeMpInitializing) { if (MaxLogicalProcessorNumber > 1) { // // Wakeup all APs and calculate the processor count in system @@ -2015,58 +2039,84 @@ MpInitLibInitialize ( // Detect and apply Microcode on BSP // MicrocodeDetect (CpuMpData, CpuMpData->BspNumber); + + // + // CpuMpData->CpuCount was updated in CollectProcessorCount() + // during the first time Mp Initialization. + // + if (CpuMpData->CpuCount > 1) { + WakeUpAP (CpuMpData, TRUE, 0, ApInitializeSync, CpuMpData, TRUE); + // + // Wait for all APs to complete initialization. + // + while (CpuMpData->FinishedCount < (CpuMpData->CpuCount - 1)) { + CpuPause (); + } + } + // + // After Mp is initialized, sizeof(UINTN) is saved and will be transfe= rred to DXE. + // It is used to decide whether Mp initialization needs to be done aga= in. + // SizeOfUINTN and other fields (CpuInfoInHob, CpuCount, BspNumber) de= clared at the top of + // the CPU_MP_DATA structure are independent of the bit mode( 32 or 64= ). + // + CpuMpData->SizeOfUINTN =3D sizeof (UINTN); } else { // - // APs have been wakeup before, just get the CPU Information - // from HOB + // For the else case where DXE is 64-bit and PEI is 32-bit, a partial + // initialization of Mp is required. // + OldCpuMpData->NewCpuMpData =3D CpuMpData; - CpuMpData->CpuCount =3D OldCpuMpData->CpuCount; - CpuMpData->BspNumber =3D OldCpuMpData->BspNumber; - CpuMpData->CpuInfoInHob =3D OldCpuMpData->CpuInfoInHob; - CpuInfoInHob =3D (CPU_INFO_IN_HOB *)(UINTN)CpuMpData->Cp= uInfoInHob; + // + // CpuCount\ufffd\ufffd\ufffd BspNumber, CpuInfoInHob as well as SizeO= fUINTN are collected during PEI, + // and need to be saved in HOB for DXE. The rest fields of _CPU_MP_DAT= A is more like the temporary field. + // They will be updated during DXE if the DXE mode is different from P= EI. + // + CpuMpData->CpuCount =3D OldCpuMpData->CpuCount; + CpuMpData->BspNumber =3D OldCpuMpData->BspNumber; + CpuMpData->CpuInfoInHob =3D OldCpuMpData->CpuInfoInHob; + CpuInfoInHob =3D (CPU_INFO_IN_HOB *)(UINTN)CpuMpData->CpuIn= foInHob; for (Index =3D 0; Index < CpuMpData->CpuCount; Index++) { + // + // In PEI phase, or for first time initialization, initializeSpinLoc= k is + // performed during CollectProcessorCount(). In DXE phase, it is don= e during traversal here. + // InitializeSpinLock (&CpuMpData->CpuData[Index].ApLock); CpuMpData->CpuData[Index].CpuHealthy =3D (CpuInfoInHob[Index].Health= =3D=3D 0) ? TRUE : FALSE; CpuMpData->CpuData[Index].ApFunction =3D 0; } - } =20 - // - // Store BSP's MTRR setting - // - MtrrGetAllMtrrs (&CpuMpData->MtrrTable); - - // - // Wakeup APs to do some AP initialize sync (Microcode & MTRR) - // - if (CpuMpData->CpuCount > 1) { - if (OldCpuMpData !=3D NULL) { - // - // Only needs to use this flag for DXE phase to update the wake up - // buffer. Wakeup buffer allocated in PEI phase is no longer valid - // in DXE. - // - CpuMpData->InitFlag =3D ApInitReconfig; - WakeUpAP (CpuMpData, TRUE, 0, ApMtrrSync, CpuMpData, TRUE); - } else { - WakeUpAP (CpuMpData, TRUE, 0, ApInitializeSync, CpuMpData, TRUE); - } + // + // Store BSP's MTRR setting + // + MtrrGetAllMtrrs (&CpuMpData->MtrrTable); =20 // - // Wait for all APs finished initialization + // Wakeup APs to do some AP initialize sync (Microcode & MTRR) // - while (CpuMpData->FinishedCount < (CpuMpData->CpuCount - 1)) { - CpuPause (); - } + if (CpuMpData->CpuCount > 1) { + if (OldCpuMpData !=3D NULL) { + // + // Only needs to use this flag for DXE phase to update the wake up + // buffer. Wakeup buffer allocated in PEI phase is no longer valid + // in DXE. + // + CpuMpData->InitFlag =3D ApInitReconfig; + WakeUpAP (CpuMpData, TRUE, 0, ApMtrrSync, CpuMpData, TRUE); + // + // Wait for all APs to complete initialization. + // + while (CpuMpData->FinishedCount < (CpuMpData->CpuCount - 1)) { + CpuPause (); + } =20 - if (OldCpuMpData !=3D NULL) { - CpuMpData->InitFlag =3D ApInitDone; + CpuMpData->InitFlag =3D ApInitDone; + } } + } =20 - for (Index =3D 0; Index < CpuMpData->CpuCount; Index++) { - SetApState (&CpuMpData->CpuData[Index], CpuStateIdle); - } + for (Index =3D 0; Index < CpuMpData->CpuCount; Index++) { + SetApState (&CpuMpData->CpuData[Index], CpuStateIdle); } =20 // diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h b/UefiCpuPkg/Library/MpIn= itLib/MpLib.h index f5086e497e..d6a416b943 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.h +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h @@ -235,6 +235,7 @@ struct _CPU_MP_DATA { UINT64 CpuInfoInHob; UINT32 CpuCount; UINT32 BspNumber; + UINT32 SizeOfUINTN; // // The above fields data will be passed from PEI to DXE // Please make sure the fields offset same in the different --=20 2.36.1.windows.1 -=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 (#95884): https://edk2.groups.io/g/devel/message/95884 Mute This Topic: https://groups.io/mt/94751258/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 5 14:09:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+95885+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95885+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1667453915; cv=none; d=zohomail.com; s=zohoarc; b=MQ7Iv6UmuTPikPBnizcnIVCI+uYtH0js1FCH+jBxqybiT0b1pQ2PtA2G/+s3HL631Z0WERrYVVl92PhF/2fUXV7on2koKQOB8qLiNpNG0UDpZgefB/crOtQDpFRYu239kLFOSUR0d4n9GFaoXv2Y6pDn63OeF7r9KDMUOP0kExE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667453915; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Y9/VSH2RXwDLRMx9m+DPeA8gCWkLWwffoYRLutaYthI=; b=IECJHeBgZlJrmjQnEVM9/hZ1H+SRVjIRfWbPpVE/L9Nqsl9xq8/UURQD2eaeet+ux3x/cDfCx6zZaI/Wo1+iKfFoKz01OJkvvq0If4pD2gBafoDsu4KIgsE+OPYHYBT8QOGiJtp/PyWoD1jfy/zZFxWmia5Z0F0PWxjbrqmHfG0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+95885+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1667453915594247.89091318595854; Wed, 2 Nov 2022 22:38:35 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 8lzdYY1788612xlawLv6l31Y; Wed, 02 Nov 2022 22:38:35 -0700 X-Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web09.16152.1667453913979818015 for ; Wed, 02 Nov 2022 22:38:34 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10519"; a="307207626" X-IronPort-AV: E=Sophos;i="5.95,235,1661842800"; d="scan'208";a="307207626" X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2022 22:38:08 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10519"; a="963805783" X-IronPort-AV: E=Sophos;i="5.95,235,1661842800"; d="scan'208";a="963805783" X-Received: from shwdeopenlab705.ccr.corp.intel.com ([10.239.56.33]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2022 22:38:07 -0700 From: "Yuanhao Xie" To: devel@edk2.groups.io Cc: Yuanhao , Eric Dong , Rahul Kumar , Ray Ni Subject: [edk2-devel] [PATCH 3/3] UefiCpuPkg: Removed the unused MpLock Date: Thu, 3 Nov 2022 13:37:47 +0800 Message-Id: <20221103053747.289-4-yuanhao.xie@intel.com> In-Reply-To: <20221103053747.289-1-yuanhao.xie@intel.com> References: <20221103053747.289-1-yuanhao.xie@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,yuanhao.xie@intel.com X-Gm-Message-State: K58tYubm9lGml9wpq6hCjI5Xx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1667453915; bh=krxEF5oHyAn5l1Ss7vXzs2NP4hHeg2WQ8znQET1crL4=; h=Cc:Date:From:Reply-To:Subject:To; b=DhOwtLTDkr+8tBOs3ZR5QXRx3EkbrgPeaLdbZls78+fn3YQjDCfGhubpIcOxPe7bMo8 pTS0Pt/0sltYgBr7btvAbjvUh7EHCWCrafj0vPpH11OR4p98f3YyPzwpT3PJZ/mqrAGiY mjJySeFYeGBq7dTIHZXwjwHCS1nAn4DIr04= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1667453916950100002 Content-Type: text/plain; charset="utf-8" From: Yuanhao Signed-off-by: Yuanhao Xie Cc: Eric Dong Cc: Rahul Kumar Cc: Ray Ni Reviewed-by: Ray Ni --- UefiCpuPkg/Library/MpInitLib/MpLib.c | 1 - UefiCpuPkg/Library/MpInitLib/MpLib.h | 1 - 2 files changed, 2 deletions(-) diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpIn= itLib/MpLib.c index c7d1e58909..25e0b3c585 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -1942,7 +1942,6 @@ MpInitLibInitialize ( CpuMpData->SwitchBspFlag =3D FALSE; CpuMpData->CpuData =3D (CPU_AP_DATA *)(CpuMpData + 1); CpuMpData->CpuInfoInHob =3D (UINT64)(UINTN)(CpuMpData->CpuData + Max= LogicalProcessorNumber); - InitializeSpinLock (&CpuMpData->MpLock); CpuMpData->SevEsIsEnabled =3D ConfidentialComputingGuestHas (CCAttrAmd= SevEs); CpuMpData->SevSnpIsEnabled =3D ConfidentialComputingGuestHas (CCAttrAmd= SevSnp); CpuMpData->SevEsAPBuffer =3D (UINTN)-1; diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h b/UefiCpuPkg/Library/MpIn= itLib/MpLib.h index d6a416b943..b5bd695ead 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.h +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h @@ -241,7 +241,6 @@ struct _CPU_MP_DATA { // Please make sure the fields offset same in the different // architecture. // - SPIN_LOCK MpLock; UINTN Buffer; UINTN CpuApStackSize; MP_ASSEMBLY_ADDRESS_MAP AddressMap; --=20 2.36.1.windows.1 -=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 (#95885): https://edk2.groups.io/g/devel/message/95885 Mute This Topic: https://groups.io/mt/94751260/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-