From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.11831.1674035783379019296 for ; Wed, 18 Jan 2023 01:56:27 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ZMkCn4KY; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: jiaxin.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674035787; x=1705571787; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=UrSJQC59ypMT1E/Fq0aKYrxu/u+7JytuzWWiZj7p6Ig=; b=ZMkCn4KYk1Oyb7X2RyM+KRZz0tPEM9bPzLU3565B2W7WAYDGUYwb2phY vSxAcEaVGWgmzusK9ipik/jgTJZkhoOghWoydUFWjdGVMDY8FnB0HUHrh nj0hppAYsKppP1gj58e2tUPbunF3q4uld3kMBiP3zHrsGN+svwiXItU4O Vj0kST4tZx3ryhsd3cUpUxLeuBa5WQ+SVAg8Q9mXf4d/T/BVXc40DZjMi cLby+gZw2T1RiBKIEAaVnSlkTDafAaerU+yVJKglEJCmYdlP5JNFjU2gZ ObHD3tFQCTAmZ5Pjvuxv7xRJKIdfu9yYp5ZaDz+6BtDp1BReiLglknsMQ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="411184065" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="411184065" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2023 01:56:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10593"; a="723026331" X-IronPort-AV: E=Sophos;i="5.97,224,1669104000"; d="scan'208";a="723026331" Received: from sh1gapp1009.ccr.corp.intel.com ([10.239.189.79]) by fmsmga008.fm.intel.com with ESMTP; 18 Jan 2023 01:56:25 -0800 From: "Wu, Jiaxin" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Zeng Star , Laszlo Ersek , Gerd Hoffmann , Rahul Kumar Subject: [PATCH v3 2/5] UefiCpuPkg/PiSmmCpuDxeSmm: Fix invalid InitializeMpSyncData call Date: Wed, 18 Jan 2023 17:56:17 +0800 Message-Id: <20230118095620.9860-3-jiaxin.wu@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20230118095620.9860-1-jiaxin.wu@intel.com> References: <20230118095620.9860-1-jiaxin.wu@intel.com> No need call InitializeMpSyncData during normal boot SMI init, because mSmmMpSyncData is NULL at that time. mSmmMpSyncData is allocated in InitializeMpServiceData, which is invoked after normal boot SMI init (SmmRelocateBases). Cc: Eric Dong Cc: Ray Ni Cc: Zeng Star Cc: Laszlo Ersek Cc: Gerd Hoffmann Cc: Rahul Kumar Signed-off-by: Jiaxin Wu --- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c index 655175a2c6..f723b1d253 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c @@ -369,13 +369,11 @@ SmmInitHandler ( if (!mSmmS3Flag) { // // Check XD and BTS features on each processor on normal boot // CheckFeatureSupported (); - } - - if (mIsBsp) { + } else if (mIsBsp) { // // BSP rebase is already done above. // Initialize private data during S3 resume // InitializeMpSyncData (); -- 2.16.2.windows.1