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 4D4B4941462 for ; Wed, 22 Nov 2023 09:02:21 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=xhJ+pZieKRwg45Sf8onEfaES8nfie4ve958fWOWoM9A=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1700643740; v=1; b=OdTJTerasLS5lpY42KA3bELMJwxWLZGYQ44dgPKvv1R8Goy0BOeklcs2+P4iY6raXUpsYTWy Ci1ZDJ97Xh1oNpU/7U4iek0aNapCYBSxnCS2nNGu0X6J5JLBsoU8RmNWe/uVI3Wl2Vt0S1TE5wE C7qMu4KecFI6e8JJl6Hh0bfM= X-Received: by 127.0.0.2 with SMTP id KTpwYY7687511xp9J5etKAgV; Wed, 22 Nov 2023 01:02:20 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.15268.1700643739370140989 for ; Wed, 22 Nov 2023 01:02:19 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-375-hUPvzefoNEuYu0ILvTe8cg-1; Wed, 22 Nov 2023 04:02:17 -0500 X-MC-Unique: hUPvzefoNEuYu0ILvTe8cg-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D25961C04B58; Wed, 22 Nov 2023 09:02:16 +0000 (UTC) X-Received: from [10.39.193.187] (unknown [10.39.193.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0238B10E45; Wed, 22 Nov 2023 09:02:15 +0000 (UTC) Message-ID: <50f078fd-3427-d797-621c-fa7d49ce3617@redhat.com> Date: Wed, 22 Nov 2023 10:02:14 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v2] UefiCpuPkg/PiSmmCpuDxeSmm: Use NonSmm BSP as default SMM BSP. To: devel@edk2.groups.io, zhiguang.liu@intel.com Cc: Ray Ni , Rahul Kumar , Gerd Hoffmann References: <20231120031004.1525-1-zhiguang.liu@intel.com> From: "Laszlo Ersek" In-Reply-To: <20231120031004.1525-1-zhiguang.liu@intel.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.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,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: nc4j8zSfs7R69lfLXlmo9Ssix7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=OdTJTera; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 11/20/23 04:10, Zhiguang Liu wrote: > Currently, if BSP election is not enabled, will use Core0 as SMM BSP. > However, Core0 does not always have the highest performance. > So, we can used NonSmm BSP as default BSP. > This will take effect in normal SMM init flow and S3 boot flow >=20 > Cc: Ray Ni > Cc: Rahul Kumar > Cc: Gerd Hoffmann > Cc: Laszlo Ersek > Signed-off-by: Zhiguang Liu > --- > UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) >=20 > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c b/UefiCpuPkg/PiSmmCpuD= xeSmm/MpService.c > index 25d058c5b9..b279f5dfcc 100644 > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > @@ -1953,6 +1953,16 @@ InitializeMpSyncData ( > // Enable BSP election by setting BspIndex to -1 > // > mSmmMpSyncData->BspIndex =3D (UINT32)-1; > + } else { > + // > + // Use NonSMM BSP as SMM BSP > + // > + for (CpuIndex =3D 0; CpuIndex < gSmmCpuPrivate->SmmCoreEntryContex= t.NumberOfCpus; CpuIndex++) { > + if (GetApicId () =3D=3D gSmmCpuPrivate->ProcessorInfo[CpuIndex].= ProcessorId) { > + mSmmMpSyncData->BspIndex =3D (UINT32)CpuIndex; > + break; > + } > + } > } > =20 > mSmmMpSyncData->EffectiveSyncMode =3D mCpuSmmSyncMode; Reviewed-by: Laszlo Ersek -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111599): https://edk2.groups.io/g/devel/message/111599 Mute This Topic: https://groups.io/mt/102701170/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-