n Brogan
> ; Michael Turner
> ; Bret Barkelew ;
> Kinney, Michael D ;
> Dong, Eric ; Laszlo Ersek ; Andrew
> Fish (af...@apple.com)
> Subject: RE: [edk2-devel] [PATCH 0/6] Fix race condition and add event
> protocol
>
> I think there is a bigger problem with the idle ev
y; Eric Dong; Laszlo Ersek
Subject: [edk2-devel] [PATCH 0/6] Fix race condition and add event protocol
There is a race condition in CoreWaitForEvent function:
If an interrupt happens between CheckEvent and gIdleLoopEvent,
there would be a event pending during cpu sleep.
So it is required to check
On 05/24/19 07:04, Gao, Zhichao wrote:
> There is a race condition in CoreWaitForEvent function:
> If an interrupt happens between CheckEvent and gIdleLoopEvent,
> there would be a event pending during cpu sleep.
> So it is required to check the gEventPending with the interrupt
> disabled.
> Imple
Sorry I didn't add the BZ link.
https://bugzilla.tianocore.org/show_bug.cgi?id=1400
"If an interrupt happens between CheckEvent and gIdleLoopEvent, there would be
a event pending during cpu sleep."
Here is the wait for event flow:
Result = CheckEvent
(interrupt happens here, and set the gEvent
Zhichao,
Did your detailed patch commit message describe the consequence of the race
condition? (I haven't checked.)
If no, could you please describe in detail about the consequence?
Thanks,
Ray
> -Original Message-
> From: Gao, Zhichao
> Sent: Friday, May 24, 2019 1:05 PM
> To: devel@ed
There is a race condition in CoreWaitForEvent function:
If an interrupt happens between CheckEvent and gIdleLoopEvent,
there would be a event pending during cpu sleep.
So it is required to check the gEventPending with the interrupt
disabled.
Implement a gEfiCpu2ProtocolGuid to fix that. The protoc