@@ -41,10 +41,11 @@
gEfiDevicePathProtocolGuid ## PRODUCES
[Pcd]
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate ## CONSUMES
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits ## CONSUMES
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity ## CONSUMES
- gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits ## CONSUMES
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate ## CONSUMES
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits ## CONSUMES
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity ## CONSUMES
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits ## CONSUMES
+ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth ## CONSUMES
[Depex]
TRUE
@@ -236,7 +236,7 @@ SerialReset (
//
// Set the Serial I/O mode
//
- This->Mode->ReceiveFifoDepth = 1;
+ This->Mode->ReceiveFifoDepth = PcdGet32 (PcdUartDefaultReceiveFifoDepth);
This->Mode->Timeout = 1000 * 1000;
This->Mode->BaudRate = PcdGet64 (PcdUartDefaultBaudRate);
This->Mode->DataBits = (UINT32) PcdGet8 (PcdUartDefaultDataBits);
@@ -508,6 +508,7 @@ SerialDxeInitialize (
mSerialIoMode.DataBits = (UINT32) PcdGet8 (PcdUartDefaultDataBits);
mSerialIoMode.Parity = (UINT32) PcdGet8 (PcdUartDefaultParity);
mSerialIoMode.StopBits = (UINT32) PcdGet8 (PcdUartDefaultStopBits);
+ mSerialIoMode.ReceiveFifoDepth = PcdGet32 (PcdUartDefaultReceiveFifoDepth);
mSerialDevicePath.Uart.BaudRate = PcdGet64 (PcdUartDefaultBaudRate);
mSerialDevicePath.Uart.DataBits = PcdGet8 (PcdUartDefaultDataBits);
mSerialDevicePath.Uart.Parity = PcdGet8 (PcdUartDefaultParity);
Set UART receive FIFO depth with PCD instead of fixed number "1". The default value of PCD is also 1, so it makes no difference for platforms which do not explicitly set this PCD. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Cc: Feng Tian <feng.tian@intel.com> Cc: Star Zeng <star.zeng@intel.com> --- MdeModulePkg/Universal/SerialDxe/SerialDxe.inf | 9 +++++---- MdeModulePkg/Universal/SerialDxe/SerialIo.c | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) -- 2.7.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel