From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.10224.1676277864494251584 for ; Mon, 13 Feb 2023 00:44:26 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=NMF1YVd9; spf=pass (domain: intel.com, ip: 192.55.52.136, 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=1676277866; x=1707813866; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=8eJ5D4xc44yRb+oB/9bVx5+JMggcZRO39+rKFYD5Sbg=; b=NMF1YVd9OmDAFCtZ8s+qc/6f8FTDoR+YxofbeQy7UuTJsJIFbWc+QCVP zQRc3eQ8Y5TNnRklHnkH+tCq01SO0iDy39338FyAJ2J6j5svC/H9jUuwz ItlmmGJy3SCwmz3+i9HcJDf8bq/eh09GGGMEiIXPoF90FTVr8LkAgYmvJ 3JEwebbN/K8e3QT7CB7MJrrKkH1vxx3S4tnGh+1Tb4FzYaQGqUxWQodAd CQ8ljyI1S+jV/2aYvPayKUCy47Q+hsGb75E2a7uJNVz/J9VGoNvic+5Hm /0N64sAdWOnJ0hVPnuAbOrOq57eYabzVUk+QpbsnGMr+lfWADLF3ATEzN w==; X-IronPort-AV: E=McAfee;i="6500,9779,10619"; a="310474662" X-IronPort-AV: E=Sophos;i="5.97,293,1669104000"; d="scan'208";a="310474662" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2023 00:44:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10619"; a="646309670" X-IronPort-AV: E=Sophos;i="5.97,293,1669104000"; d="scan'208";a="646309670" Received: from sh1gapp1009.ccr.corp.intel.com ([10.239.189.79]) by orsmga006.jf.intel.com with ESMTP; 13 Feb 2023 00:44:23 -0800 From: "Wu, Jiaxin" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Zeng Star , Laszlo Ersek , Gerd Hoffmann , Rahul Kumar Subject: [PATCH v6 1/6] UefiCpuPkg/PiSmmCpuDxeSmm: Fix invalid InitializeMpSyncData call Date: Mon, 13 Feb 2023 16:44:12 +0800 Message-Id: <20230213084417.9232-2-jiaxin.wu@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20230213084417.9232-1-jiaxin.wu@intel.com> References: <20230213084417.9232-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