audk/MdeModulePkg
Star Zeng 4cf3f37c87 MdeModulePkg SerialDxe: Process timeout consistently in SerialRead
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 wait for enough input,
it will cause below results:
1. If there is no serial input at all, this interface will return
timeout immediately without any waiting;
2. If there is A characters in serial port FIFO, and caller requires
A+1 characters, it will wait until a new input is coming and timeout
will not really occur.

This patch is to update SerialRead() to check SerialPortPoll() and
read data through SerialPortRead() one byte by one byte, and check
timeout against mSerialIoMode.Timeout if no input.

Cc: Heyi Guo <heyi.guo@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-08-08 14:16:28 +08:00
..
Application MdeModulePkg CapsuleApp: Fix print info in BuildGatherList() 2017-07-03 17:53:16 +08:00
Bus MdeModulePkg/Ufs: Set 'Data Segment Length' field for Write Descriptor 2017-08-02 20:56:53 +08:00
Core MdeModulePkg PeiCore: Install SEC HOB data 2017-08-04 08:56:05 +08:00
Include MdeModulePkg SmmAccess: Update comments to follow PI spec. 2017-07-20 14:11:15 +08:00
Library MdeModulePkg/DxeHttpLib: Fix spelling typo in EFI_HTTP_STATUS_CODE 2017-08-02 15:31:21 +08:00
Logo MdeModulePkg/LogoDxe: Return error if HII Package not present 2017-05-22 16:30:11 -07:00
Universal MdeModulePkg SerialDxe: Process timeout consistently in SerialRead 2017-08-08 14:16:28 +08:00
MdeModulePkg.dec MdeModulePkg/Include: Add IOMMU protocol definition. 2017-05-17 16:05:12 +08:00
MdeModulePkg.dsc MdeModulePkg: Update DEC/DSC version from 0.96 to 0.97 2017-05-05 15:55:09 +08:00
MdeModulePkg.uni MdeModulePkg: Add PROMPT&HELP string of pcd to UNI file 2017-03-07 21:47:19 +08:00
MdeModulePkgExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00