[edk2-devel] [PATCH 06/13] OvmfPkg/Tcg2PhysicalPresenceLib: Use pcd for user response wait time
Laszlo Ersek
lersek at redhat.com
Mon Jan 20 08:06:28 UTC 2020
On 01/19/20 08:03, Gao, Zhichao wrote:
> Hi Laszlo,
>
> Sorry for misunderstanding the logic in read key function. That makes the incorrect analysis.
> The read key function is waiting for "specific" key press not a key press. We should drop all the other pressing-key.
> That means we should create a hotkey service like BDS one. It is not simple. I think that is why the original use the busy loop.
> I don't think it makes sense to port the function from BDS for such a simple function. If there is a requirement for the hot key service to be public and common, it makes sense.
> So I prefer to keep the original busy loop instead of porting hot key service.
I don't understand why the fact that we're interested in a specific key
only, changes *how* we should wait for keys. In both approaches (wait
for event, vs. busy wait), we should consume and drop keys until we find
what we need. Yes, the wait-for-event approach needs another loop around
it, but that still doesn't make it a "busy" loop -- it only runs when
there's an event to process (keypress or timeout). This is a standard
event loop mechanism; block/sleep in the loop body until something
occurs, then process the event; lather, rinse, repeat.
Anyway, I don't feel strongly about this. If your original approach is
accepted for SecurityPkg, I can live with it in OvmfPkg too.
Thanks
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#53393): https://edk2.groups.io/g/devel/message/53393
Mute This Topic: https://groups.io/mt/69392333/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