* MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI spec @ 2018-03-22 11:39 Guo Heyi 2018-03-22 11:43 ` Guo Heyi 0 siblings, 1 reply; 5+ messages in thread From: Guo Heyi @ 2018-03-22 11:39 UTC (permalink / raw) To: edk2-devel Hi folks, The SetAttributes() interface of generic SerialDxe driver in MdeModulePkg/Universal does not fully follow UEFI spec. The spec requires to use default time out value when the input "Timeout" is 0, but the current implementation will set timeout to 0 directly. It tries to pass "Timeout" to SerialPortSetAttributes(), but none of SerialPortLib instances in edk2 tree will deal with this parameter. What's more, Timeout is actually a software parameter and is only used in SerialDxe itself, not in SerialPortLib instances, so I think it makes more sense to set Timeout in SerialDxe directly instead of in SerialPortLib. Please advise. Thanks and regards, Heyi ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI spec 2018-03-22 11:39 MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI spec Guo Heyi @ 2018-03-22 11:43 ` Guo Heyi 2018-03-23 0:50 ` Zeng, Star 0 siblings, 1 reply; 5+ messages in thread From: Guo Heyi @ 2018-03-22 11:43 UTC (permalink / raw) To: edk2-devel; +Cc: Star Zeng, Eric Dong, Ruiyu Ni +cc Maintainers of MdeModulePkg. On Thu, Mar 22, 2018 at 07:39:42PM +0800, Guo Heyi wrote: > Hi folks, > > The SetAttributes() interface of generic SerialDxe driver in > MdeModulePkg/Universal does not fully follow UEFI spec. The spec requires to use > default time out value when the input "Timeout" is 0, but the current > implementation will set timeout to 0 directly. It tries to pass "Timeout" to > SerialPortSetAttributes(), but none of SerialPortLib instances in edk2 tree will > deal with this parameter. What's more, Timeout is actually a software parameter > and is only used in SerialDxe itself, not in SerialPortLib instances, so I think > it makes more sense to set Timeout in SerialDxe directly instead of in > SerialPortLib. > > Please advise. > > Thanks and regards, > > Heyi ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI spec 2018-03-22 11:43 ` Guo Heyi @ 2018-03-23 0:50 ` Zeng, Star 2018-03-23 14:32 ` Laszlo Ersek 0 siblings, 1 reply; 5+ messages in thread From: Zeng, Star @ 2018-03-23 0:50 UTC (permalink / raw) To: Guo Heyi, edk2-devel@lists.01.org; +Cc: Dong, Eric, Ni, Ruiyu, Zeng, Star I agree. Thanks, Star -----Original Message----- From: Guo Heyi [mailto:heyi.guo@linaro.org] Sent: Thursday, March 22, 2018 7:43 PM To: edk2-devel@lists.01.org Cc: Zeng, Star <star.zeng@intel.com>; Dong, Eric <eric.dong@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com> Subject: Re: MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI spec +cc Maintainers of MdeModulePkg. On Thu, Mar 22, 2018 at 07:39:42PM +0800, Guo Heyi wrote: > Hi folks, > > The SetAttributes() interface of generic SerialDxe driver in > MdeModulePkg/Universal does not fully follow UEFI spec. The spec > requires to use default time out value when the input "Timeout" is 0, > but the current implementation will set timeout to 0 directly. It > tries to pass "Timeout" to SerialPortSetAttributes(), but none of > SerialPortLib instances in edk2 tree will deal with this parameter. > What's more, Timeout is actually a software parameter and is only used > in SerialDxe itself, not in SerialPortLib instances, so I think it > makes more sense to set Timeout in SerialDxe directly instead of in SerialPortLib. > > Please advise. > > Thanks and regards, > > Heyi ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI spec 2018-03-23 0:50 ` Zeng, Star @ 2018-03-23 14:32 ` Laszlo Ersek 2018-03-26 1:40 ` Zeng, Star 0 siblings, 1 reply; 5+ messages in thread From: Laszlo Ersek @ 2018-03-23 14:32 UTC (permalink / raw) To: Zeng, Star, Guo Heyi, edk2-devel@lists.01.org; +Cc: Ni, Ruiyu, Dong, Eric On 03/23/18 01:50, Zeng, Star wrote: > I agree. Wasn't there a problem with the default timeout being 1 second, and that 1 second slowing down terminal I/O on some platform? I don't remember more precisely. Thanks Laszlo > -----Original Message----- > From: Guo Heyi [mailto:heyi.guo@linaro.org] > Sent: Thursday, March 22, 2018 7:43 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star <star.zeng@intel.com>; Dong, Eric <eric.dong@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com> > Subject: Re: MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI spec > > +cc Maintainers of MdeModulePkg. > > On Thu, Mar 22, 2018 at 07:39:42PM +0800, Guo Heyi wrote: >> Hi folks, >> >> The SetAttributes() interface of generic SerialDxe driver in >> MdeModulePkg/Universal does not fully follow UEFI spec. The spec >> requires to use default time out value when the input "Timeout" is 0, >> but the current implementation will set timeout to 0 directly. It >> tries to pass "Timeout" to SerialPortSetAttributes(), but none of >> SerialPortLib instances in edk2 tree will deal with this parameter. >> What's more, Timeout is actually a software parameter and is only used >> in SerialDxe itself, not in SerialPortLib instances, so I think it >> makes more sense to set Timeout in SerialDxe directly instead of in SerialPortLib. >> >> Please advise. >> >> Thanks and regards, >> >> Heyi > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI spec 2018-03-23 14:32 ` Laszlo Ersek @ 2018-03-26 1:40 ` Zeng, Star 0 siblings, 0 replies; 5+ messages in thread From: Zeng, Star @ 2018-03-26 1:40 UTC (permalink / raw) To: Laszlo Ersek, Guo Heyi, edk2-devel@lists.01.org Cc: Ni, Ruiyu, Dong, Eric, Zeng, Star Yes, there may be slowing down perceived with 1s time out. https://github.com/tianocore/edk2/commit/a7fd8452964c1a6ffeee1fe07537cb900c0ccb07 But, my understanding to Heyi's question is that caller should be aware default time out value (1000000) will be used if the 0 time out value is input. That should follow UEFI spec and the implementation in MdeModulePkg/Bus/Pci/PciSioSerialDxe and IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe. Thanks, Star -----Original Message----- From: Laszlo Ersek [mailto:lersek@redhat.com] Sent: Friday, March 23, 2018 10:32 PM To: Zeng, Star <star.zeng@intel.com>; Guo Heyi <heyi.guo@linaro.org>; edk2-devel@lists.01.org Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Dong, Eric <eric.dong@intel.com> Subject: Re: [edk2] MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI spec On 03/23/18 01:50, Zeng, Star wrote: > I agree. Wasn't there a problem with the default timeout being 1 second, and that 1 second slowing down terminal I/O on some platform? I don't remember more precisely. Thanks Laszlo > -----Original Message----- > From: Guo Heyi [mailto:heyi.guo@linaro.org] > Sent: Thursday, March 22, 2018 7:43 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star <star.zeng@intel.com>; Dong, Eric > <eric.dong@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com> > Subject: Re: MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI > spec > > +cc Maintainers of MdeModulePkg. > > On Thu, Mar 22, 2018 at 07:39:42PM +0800, Guo Heyi wrote: >> Hi folks, >> >> The SetAttributes() interface of generic SerialDxe driver in >> MdeModulePkg/Universal does not fully follow UEFI spec. The spec >> requires to use default time out value when the input "Timeout" is 0, >> but the current implementation will set timeout to 0 directly. It >> tries to pass "Timeout" to SerialPortSetAttributes(), but none of >> SerialPortLib instances in edk2 tree will deal with this parameter. >> What's more, Timeout is actually a software parameter and is only >> used in SerialDxe itself, not in SerialPortLib instances, so I think >> it makes more sense to set Timeout in SerialDxe directly instead of in SerialPortLib. >> >> Please advise. >> >> Thanks and regards, >> >> Heyi > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-03-26 1:33 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-03-22 11:39 MdeModulePkg/SerialDxe: SetAttributes() not follow UEFI spec Guo Heyi 2018-03-22 11:43 ` Guo Heyi 2018-03-23 0:50 ` Zeng, Star 2018-03-23 14:32 ` Laszlo Ersek 2018-03-26 1:40 ` Zeng, Star
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox