Re: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService.

2019-01-10 Thread Laszlo Ersek
default value to zero, I'd suggest moving >> "PcdSpinLockTimeout" from section >> >> [PcdsFixedAtBuild,PcdsPatchableInModule] >> >> to section >> >> [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] >> &

Re: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService.

2019-01-09 Thread Dong, Eric
Agree to do both changes, will submit BZ for it if we get the agreement in this mailing list. Thanks, Eric > > Thanks > Laszlo > > >> -Original Message----- > >> From: Brian J. Johnson [mailto:brian.john...@hpe.com] > >> Sent: Friday, December

Re: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService.

2019-01-09 Thread Laszlo Ersek
ewen wrote: >>> Yes, I agree, if we don't have any real case. >>> >>> >>>> -Original Message- >>>> From: Ni, Ruiyu >>>> Sent: Thursday, December 20, 2018 10:07 AM >>>> To: Dong, Eric ; Yao, Jiewen >>>> ; ed

Re: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService.

2019-01-08 Thread Dong, Eric
ao, Jiewen ; Ni, Ruiyu ; > Dong, Eric ; edk2-devel@lists.01.org > Cc: Laszlo Ersek > Subject: Re: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid > AP calls PeiService. > > Agreed. We've seen issues on real platforms with timed-out spinlocks in DXE > causing cal

Re: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService.

2018-12-20 Thread Dong, Eric
December 20, 2018 10:07 AM > >> To: Dong, Eric ; Yao, Jiewen > >> ; edk2-devel@lists.01.org > >> Cc: Laszlo Ersek > >> Subject: RE: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: > >> Avoid AP calls PeiService. > >> > >> Can you ju

Re: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService.

2018-12-20 Thread Brian J. Johnson
case. -Original Message- From: Ni, Ruiyu Sent: Thursday, December 20, 2018 10:07 AM To: Dong, Eric ; Yao, Jiewen ; edk2-devel@lists.01.org Cc: Laszlo Ersek Subject: RE: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService. Can you just change the AcquireSpinLock

Re: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService.

2018-12-19 Thread Yao, Jiewen
nal Message- > > From: Dong, Eric > > Sent: Thursday, December 20, 2018 9:23 AM > > To: Yao, Jiewen ; edk2-devel@lists.01.org > > Cc: Ni, Ruiyu ; Laszlo Ersek > > Subject: RE: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid > > AP calls PeiService

Re: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService.

2018-12-19 Thread Ni, Ruiyu
Yao, Jiewen ; edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Laszlo Ersek > Subject: RE: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid > AP calls PeiService. > > > Agreed, Maybe it's time to add a new API like > AcquireSpinLockWithoutTimeOut? > > Thanks, > Er

Re: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService.

2018-12-19 Thread Dong, Eric
[edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid > AP calls PeiService. > > Hi > If we think below code is generic, can we have an API for that? > > + // > + // Wait for the AP to release the MSR spin lock. > + // > + while (!AcquireSpinLockOr

Re: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService.

2018-12-19 Thread Yao, Jiewen
ilto:edk2-devel-boun...@lists.01.org] On Behalf Of > Eric Dong > Sent: Thursday, December 20, 2018 9:16 AM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Laszlo Ersek > Subject: [edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP > calls PeiService. > > In A

[edk2] [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiService.

2018-12-19 Thread Eric Dong
In AcquireSpinLock function, it calls GetPerformanceCounter which final calls PeiService service. This patch avoid to call AcquireSpinLock function. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1411 Cc: Ruiyu Ni Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1