Re: [edk2] [PATCH] MdeModulePkg SerialDxe: Process timeout consistently in SerialRead

2017-08-16 Thread Laszlo Ersek
Lib implements these functions; we should use them. Thanks! Laszlo > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Wednesday, August 16, 2017 10:02 AM > To: Kinney, Michael D ; Zeng, Star > ; edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Heyi Guo ; &g

Re: [edk2] [PATCH] MdeModulePkg SerialDxe: Process timeout consistently in SerialRead

2017-08-15 Thread Zeng, Star
Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Wednesday, August 16, 2017 10:02 AM To: Kinney, Michael D ; Zeng, Star ; edk2-devel@lists.01.org Cc: Ni, Ruiyu ; Heyi Guo ; Ard Biesheuvel Subject: Re: [edk2] [PATCH] MdeModulePkg SerialDxe: Process timeout consistently in SerialRead

Re: [edk2] [PATCH] MdeModulePkg SerialDxe: Process timeout consistently in SerialRead

2017-08-15 Thread Laszlo Ersek
On 08/16/17 01:59, Kinney, Michael D wrote: > Laszlo, > > gBS->Stall() layers on top of the Metronome Architectural Protocol. > > armvirtqemu.dsc: EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf > > And this implementation layers on top of a TimerLib > > armvirtqemu.dsc: TimerLib|ArmPkg/Library/Arm

Re: [edk2] [PATCH] MdeModulePkg SerialDxe: Process timeout consistently in SerialRead

2017-08-15 Thread Kinney, Michael D
lo Ersek > Sent: Tuesday, August 15, 2017 4:31 PM > To: Zeng, Star ; edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Heyi Guo > ; Ard Biesheuvel > > Subject: Re: [edk2] [PATCH] MdeModulePkg SerialDxe: Process > timeout consistently in SerialRead > > Hi Star, > > On 08/04

Re: [edk2] [PATCH] MdeModulePkg SerialDxe: Process timeout consistently in SerialRead

2017-08-15 Thread Laszlo Ersek
Hi Star, On 08/04/17 10:29, Star Zeng wrote: > https://lists.01.org/pipermail/edk2-devel/2017-July/012385.html > reported the timeout processing in SerialRead is not consistent. > > Since SerialPortPoll only checks the status of serial port and > returns immediately, and SerialPortRead does not re

Re: [edk2] [PATCH] MdeModulePkg SerialDxe: Process timeout consistently in SerialRead

2017-08-04 Thread Ni, Ruiyu
I thought unit of Stall is 100ns. Then no issues now. Reviewed-by: Ruiyu Ni Thanks/Ray > -Original Message- > From: Zeng, Star > Sent: Friday, August 4, 2017 5:25 PM > To: Ni, Ruiyu ; edk2-devel@lists.01.org > Cc: Heyi Guo ; Laszlo Ersek ; > Zeng, Star > Subject: RE: [PATCH] MdeModuleP

Re: [edk2] [PATCH] MdeModulePkg SerialDxe: Process timeout consistently in SerialRead

2017-08-04 Thread Zeng, Star
Thanks for the comments. EFI_TIMER_PERIOD_MICROSECONDS is used for timer event according to its definition, and its unit is 100ns. But the unit of mSerialIoMode.Timeout and gBS->Stall() is 1us. +1 may cause more polling of SerialPortPoll(). How about keeping using +10? :) Thanks, Star -Ori

Re: [edk2] [PATCH] MdeModulePkg SerialDxe: Process timeout consistently in SerialRead

2017-08-04 Thread Ni, Ruiyu
Star, 3 minor comments below. Thanks/Ray > -Original Message- > From: Zeng, Star > Sent: Friday, August 4, 2017 4:29 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Heyi Guo ; Ni, > Ruiyu ; Laszlo Ersek > Subject: [PATCH] MdeModulePkg SerialDxe: Process timeout consistently in > Seri

[edk2] [PATCH] MdeModulePkg SerialDxe: Process timeout consistently in SerialRead

2017-08-04 Thread Star Zeng
https://lists.01.org/pipermail/edk2-devel/2017-July/012385.html reported the timeout processing in SerialRead is not consistent. Since SerialPortPoll only checks the status of serial port and returns immediately, and SerialPortRead does not really implement a time out mechanism and will always wai