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 90E8274004C for ; Fri, 10 May 2024 10:09:05 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=gp21oVeVKmMA07TwGQivCNd6YLB91/DgCCCSj/GN0Qc=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: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-Transfer-Encoding; s=20240206; t=1715335744; v=1; b=W5d+Waai4f6RO8zDgoFS3QoYM+O6BX5wkIMbezO8hyhkao3HE8MnlYYl11JQaQvH2Sl9g9Yd wIM36uVl3GRLHTiL0mXUKw8j0fkQuBTPY/XjaeahtutmZ1o4aS35477yAZrtW9RU3Tjj58kSE0/ dLmImmwrptgqwG2zDxJYyhOnf0fJqHRfVSLrGSRgUcOfHAUnJiAmiiJoHBoan8XhHPafyiuVCeA I1VUp+lW3PnY+122Nz9nQdCAJfc1pKu0GUQAHRFDxXEjKHHO/6uNelVIHwnsApEzJI1J4BuygLc ekJeouZlvx1PSHp+s1owTnYkbjT4iBRmOqc4GCXAxqISA== X-Received: by 127.0.0.2 with SMTP id kifdYY7687511xjt4YjJPfrn; Fri, 10 May 2024 03:09:04 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mx.groups.io with SMTP id smtpd.web10.9485.1715335727366928454 for ; Fri, 10 May 2024 03:09:03 -0700 X-CSE-ConnectionGUID: h7pIkYQqQ5aAHhdwFysmNg== X-CSE-MsgGUID: BMHf38Q9QyO1r8p8KnazLQ== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="28819146" X-IronPort-AV: E=Sophos;i="6.08,150,1712646000"; d="scan'208";a="28819146" X-Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 03:09:03 -0700 X-CSE-ConnectionGUID: pietf2ZeRRyKoIzXAZalHg== X-CSE-MsgGUID: DqOknr7xQXmoINzh6APf/w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,150,1712646000"; d="scan'208";a="60424255" X-Received: from unknown (HELO shwdeopenlab702.ccr.corp.intel.com) ([10.239.55.43]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2024 03:09:02 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Ray Ni , Rahul Kumar , Gerd Hoffmann , Jiaxin Wu Subject: [edk2-devel] [PATCH 06/18] UefiCpuPkg: Remove the duplicated mpservice locate Date: Fri, 10 May 2024 18:08:15 +0800 Message-Id: <20240510100827.1903-7-dun.tan@intel.com> In-Reply-To: <20240510100827.1903-1-dun.tan@intel.com> References: <20240510100827.1903-1-dun.tan@intel.com> MIME-Version: 1.0 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: Fri, 10 May 2024 03:09:03 -0700 Resent-From: dun.tan@intel.com Reply-To: devel@edk2.groups.io,dun.tan@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: kGf5YhnHO8Ja83YWDwRaKv2Tx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=W5d+Waai; 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 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Remove the duplicated mpservice locate in the code logic. Previously, when the execution combination of PEI and DXE are the same, the pointer of mpservice ppi will be passed to CpuS3.c in smm cpu driver to wakeup all APs, instead of init-sipi-sipi. Currently, CpuS3.c doesn't need to wakeup Aps anymore. So remove the duplicated mpservice locate and the assignment to MpService2Ppi field in SmmS3ResumeState. Signed-off-by: Dun Tan Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Jiaxin Wu --- UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c index 3e85eab28f..a8e9c92a93 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c @@ -1139,7 +1139,6 @@ S3RestoreConfig2 ( SmmS3ResumeState->ReturnContext1 = (EFI_PHYSICAL_ADDRESS)(UINTN)AcpiS3Context; SmmS3ResumeState->ReturnContext2 = (EFI_PHYSICAL_ADDRESS)(UINTN)EfiBootScriptExecutorVariable; SmmS3ResumeState->ReturnStackPointer = (EFI_PHYSICAL_ADDRESS)STACK_ALIGN_DOWN (&Status); - SmmS3ResumeState->MpService2Ppi = 0; DEBUG ((DEBUG_INFO, "SMM S3 Signature = %x\n", SmmS3ResumeState->Signature)); DEBUG ((DEBUG_INFO, "SMM S3 Stack Base = %x\n", SmmS3ResumeState->SmmS3StackBase)); @@ -1168,19 +1167,6 @@ S3RestoreConfig2 ( if (((SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_32) && (sizeof (UINTN) == sizeof (UINT32))) || ((SmmS3ResumeState->Signature == SMM_S3_RESUME_SMM_64) && (sizeof (UINTN) == sizeof (UINT64)))) { - // - // Get MP Services2 Ppi to pass it to Smm S3. - // - Status = PeiServicesLocatePpi ( - &gEdkiiPeiMpServices2PpiGuid, - 0, - NULL, - (VOID **)&MpService2Ppi - ); - ASSERT_EFI_ERROR (Status); - SmmS3ResumeState->MpService2Ppi = (EFI_PHYSICAL_ADDRESS)(UINTN)MpService2Ppi; - DEBUG ((DEBUG_INFO, "SMM S3 MpService2Ppi Point = %lx\n", SmmS3ResumeState->MpService2Ppi)); - SwitchStack ( (SWITCH_STACK_ENTRY_POINT)(UINTN)SmmS3ResumeState->SmmS3ResumeEntryPoint, (VOID *)AcpiS3Context, -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118798): https://edk2.groups.io/g/devel/message/118798 Mute This Topic: https://groups.io/mt/106018127/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-