From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web10.8219.1676267278173963747 for ; Sun, 12 Feb 2023 21:47:59 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=mvTzwUSs; spf=pass (domain: intel.com, ip: 192.55.52.93, 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=1676267279; x=1707803279; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=8eJ5D4xc44yRb+oB/9bVx5+JMggcZRO39+rKFYD5Sbg=; b=mvTzwUSsbMxukNJTjaYT/S5uxNjzeJGvOwNVDQXvex15sMKLEgqBCviL 0ZXGtIcqpgoqMbszymFO+T17a3GmU+DRFpHAbmzJchaE1Y3iBVi9XZ8la yVg+PP8nNWwe6DajcO1ojwHMrHqoRCmOP0qMcw2YF8tlst5/4NR48XqZf RzLlFHIk4EvJwpqqhvHpFC4zhLcjBnzUxcdU+Fu3I4mpNvWZmLEALmiDu GtXJNyXFKcz87RWoCLRnkivtGbolN5Fyn+LFuPMpeQ0QKVg3EDPhYSC6O VaLpOtRk0KOuLu9594Xoo9z3k8xtDmlBcb5vAszhNrEcJSBSJiw5psBZn w==; X-IronPort-AV: E=McAfee;i="6500,9779,10619"; a="328521075" X-IronPort-AV: E=Sophos;i="5.97,293,1669104000"; d="scan'208";a="328521075" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Feb 2023 21:47:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10619"; a="842649594" X-IronPort-AV: E=Sophos;i="5.97,293,1669104000"; d="scan'208";a="842649594" Received: from sh1gapp1009.ccr.corp.intel.com ([10.239.189.79]) by orsmga005.jf.intel.com with ESMTP; 12 Feb 2023 21:47:57 -0800 From: "Wu, Jiaxin" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Zeng Star , Laszlo Ersek , Gerd Hoffmann , Rahul Kumar Subject: [PATCH v5 1/6] UefiCpuPkg/PiSmmCpuDxeSmm: Fix invalid InitializeMpSyncData call Date: Mon, 13 Feb 2023 13:47:46 +0800 Message-Id: <20230213054751.8692-2-jiaxin.wu@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20230213054751.8692-1-jiaxin.wu@intel.com> References: <20230213054751.8692-1-jiaxin.wu@intel.com> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4338 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c index 655175a2c6..2ac655d032 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c @@ -1,9 +1,9 @@ /** @file Agent Module to load other modules to deploy SMM Entry Vector for X86 CPU. -Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2023, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -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