[edk2-devel] [Patch 1/1] UefiCpuPkg/Library/MpInitLib: Fix AP VolatileRegisters race condition

Zeng, Star star.zeng at intel.com
Tue Jan 26 03:34:39 UTC 2021


> -----Original Message-----
> From: Ni, Ray <ray.ni at intel.com>
> Sent: Tuesday, January 26, 2021 10:26 AM
> To: Laszlo Ersek <lersek at redhat.com>; Zeng, Star <star.zeng at intel.com>;
> Kinney, Michael D <michael.d.kinney at intel.com>; devel at edk2.groups.io
> Cc: Dong, Eric <eric.dong at intel.com>; Kumar, Rahul1
> <rahul1.kumar at intel.com>
> Subject: RE: [edk2-devel] [Patch 1/1] UefiCpuPkg/Library/MpInitLib: Fix AP
> VolatileRegisters race condition
> 
> > >     CpuMpData = (CPU_MP_DATA *) (Idtr.Base + Idtr.Limit + 1);
> > > +    ASSERT (CpuMpData != NULL);
> 
> In this case, Idtr.Base, Idtr.Limit both equal to zero and CpuMpData is 1.
> ASSERT () cannot trigger assertion here.

Oh, got it. Then the assert may be like below to check Idtr.Base.
ASSERT (Idtr.Base != 0);

Thanks,
Star



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#70753): https://edk2.groups.io/g/devel/message/70753
Mute This Topic: https://groups.io/mt/80035510/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list