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 > > Cc: Ray Ni <ray...@intel.com> > Cc: Rahul Kumar <rahul1.ku...@intel.com> > Cc: Gerd Hoffmann <kra...@redhat.com> > Cc: Laszlo Ersek <ler...@redhat.com> > Signed-off-by: Zhiguang Liu <zhiguang....@intel.com> > --- > UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c > b/UefiCpuPkg/PiSmmCpuDxeSmm/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 = (UINT32)-1; > + } else { > + // > + // Use NonSMM BSP as SMM BSP > + // > + for (CpuIndex = 0; CpuIndex < > gSmmCpuPrivate->SmmCoreEntryContext.NumberOfCpus; CpuIndex++) { > + if (GetApicId () == > gSmmCpuPrivate->ProcessorInfo[CpuIndex].ProcessorId) { > + mSmmMpSyncData->BspIndex = (UINT32)CpuIndex; > + break; > + } > + } > } > > mSmmMpSyncData->EffectiveSyncMode = mCpuSmmSyncMode;
Reviewed-by: Laszlo Ersek <ler...@redhat.com> -=-=-=-=-=-=-=-=-=-=-=- 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/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-