From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 0FE88D811AF for ; Wed, 6 Dec 2023 10:01:33 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Qddqur5LIxImX54oqyFFa+I+Xyu4/dAVN9AdG4Dq5eg=; c=relaxed/simple; d=groups.io; h=From:To:Subject:Date:Message-Id:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe; s=20140610; t=1701856892; v=1; b=BJP9m95SpQWo/emPliZcI0HAruOYQ6xhM106s5Ne2lqgrnWIcPDbBWXlIng524E367UVAezT b9DtUyl0E+q0dx/mlj1FeX46aIG0dIXO4PbaF30gYk2I/dPK6R2cE6fWD2L8F8zjEy5IHymxYub wrdFhe/9l2gykY88W0mmDli0= X-Received: by 127.0.0.2 with SMTP id nr5EYY7687511xEhR3kRvSJV; Wed, 06 Dec 2023 02:01:32 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mx.groups.io with SMTP id smtpd.web11.28132.1701856892226271583 for ; Wed, 06 Dec 2023 02:01:32 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="1130560" X-IronPort-AV: E=Sophos;i="6.04,254,1695711600"; d="scan'208";a="1130560" X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 02:01:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="841775233" X-IronPort-AV: E=Sophos;i="6.04,254,1695711600"; d="scan'208";a="841775233" X-Received: from sh1gapp1009.ccr.corp.intel.com ([10.239.189.219]) by fmsmga004.fm.intel.com with ESMTP; 06 Dec 2023 02:01:25 -0800 From: "Wu, Jiaxin" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v3 0/6] Refine SMM CPU Sync flow and abstract SmmCpuSyncLib Date: Wed, 6 Dec 2023 18:01:16 +0800 Message-Id: <20231206100122.8028-1-jiaxin.wu@intel.com> 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 Reply-To: devel@edk2.groups.io,jiaxin.wu@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: xZUeOdJCsSSe0z8TY0xNUL7Ix7686176AA= X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=BJP9m95S; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none) The series patches are to refine SMM CPU Sync flow. After the refinement, SmmCpuSyncLib is abstracted for any user to provide different SMM CPU Sync implementation. Compared to V2, has following refinement & changes: 1. rename SMM_CPU_SYNC_CXT to SMM_CPU_SYNC_CONTEXT 2. rename SemBlock to SemBuffer, SemBlockPages to SemBufferSize 3. remove empty lines among the local variable declarations 4. add assert before if condition check 5. update the comments for SmmCpuSyncCheckOutCpu, SmmCpuSyncGetArrivedCpuCount and SmmCpuSyncLockDoor. 6. remove unnecessary cxt local variable declarations. Jiaxin Wu (6): UefiCpuPkg/PiSmmCpuDxeSmm: Optimize Semaphore Sync between BSP and AP UefiCpuPkg: Adds SmmCpuSyncLib library class UefiCpuPkg: Implements SmmCpuSyncLib library instance OvmfPkg: Specifies SmmCpuSyncLib instance UefiPayloadPkg: Specifies SmmCpuSyncLib instance UefiCpuPkg/PiSmmCpuDxeSmm: Consume SmmCpuSyncLib OvmfPkg/CloudHv/CloudHvX64.dsc | 2 + OvmfPkg/OvmfPkgIa32.dsc | 2 + OvmfPkg/OvmfPkgIa32X64.dsc | 2 + OvmfPkg/OvmfPkgX64.dsc | 1 + UefiCpuPkg/Include/Library/SmmCpuSyncLib.h | 275 +++++++++ UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.c | 647 +++++++++++++++++++++ UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf | 39 ++ UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 275 ++++----- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h | 6 +- UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf | 1 + UefiCpuPkg/UefiCpuPkg.dec | 3 + UefiCpuPkg/UefiCpuPkg.dsc | 3 + UefiPayloadPkg/UefiPayloadPkg.dsc | 1 + 13 files changed, 1086 insertions(+), 171 deletions(-) create mode 100644 UefiCpuPkg/Include/Library/SmmCpuSyncLib.h create mode 100644 UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.c create mode 100644 UefiCpuPkg/Library/SmmCpuSyncLib/SmmCpuSyncLib.inf -- 2.16.2.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112108): https://edk2.groups.io/g/devel/message/112108 Mute This Topic: https://groups.io/mt/103010162/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-