Commit Graph

6 Commits

Author SHA1 Message Date
Heyi Guo f423d76021 MdeModulePkg/SerialDxe: Set FIFO depth with PCD
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>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-03-29 15:00:30 +08:00
Laszlo Ersek ea01261940 MdeModulePkg: SerialDxe: sync EFI_SERIAL_IO_MODE.Timeout with the spec
In "11.8 Serial I/O Protocol", UEFI 2.5 requires:

  The default attributes for all UART-style serial device interfaces are:
  (a) 115,200 baud,
  (b) a 1 byte receive FIFO,
  (c) a 1,000,000 microsecond timeout per character,
  (d) no parity,
  (e) 8 data bits,
  (f) and 1 stop bit.

It also says, about the EFI_SERIAL_IO_MODE.ControlMask member:

  (g) A mask of the Control bits that the device supports. The device must
      always support the Input Buffer Empty control bit.

SerialDxe complies with requirement (b) via hard-coded constants. It
complies with requirements (a), (d), (e) and (f) through PCD defaults (see
MdePkg/MdePkg.dec):

(a) 115,200 baud:
  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200|UINT64|0x00000020

(d) no parity:
  # 1 - No Parity.<BR>
  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|1|UINT8|0x00000022

(e) 8 data bits:
  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|8|UINT8|0x00000021

(f) 1 stop bit:
  # 1 - One Stop Bit.<BR>
  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|1|UINT8|0x00000023

SerialDxe does not comply with requirements (c) and (g). In this patch, we
fix (c), and leave (g) for later.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19700 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-21 00:29:07 +00:00
Laszlo Ersek c0beed6de1 MdeModulePkg: SerialDxe: lay out mSerialIoMode initializer more nicely
This patch doesn't change behavior; it only modifies whitespace and
comments.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19699 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-21 00:29:03 +00:00
Liming Gao b46354d6dd MdeModulePkg: Update SerialDxe inf to include the module uni
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19509 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-24 02:30:22 +00:00
Jordan Justen 3f5287971f MdeModulePkg: Convert all .uni files to utf-8
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py MdeModulePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19257 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15 04:56:23 +00:00
Star Zeng bf6b810fca MdeModulePkg: Upstream SerialDxe from EmbeddedPkg
This Serial driver layers on top of a Serial Port Library instance
to produce serial IO protocol.

There is also another SerialDxe implementation in CorebootPayloadPkg,
but SerialDxe from EmbeddedPkg should be better that also consumes
the extended interfaces GetControl/SetControl/SetAttributes in
EmbeddedPkg/Include/Library/SerialPortExtLib.h for serial IO protocol.
And the extended interfaces GetControl/SetControl/SetAttributes in
EmbeddedPkg/Include/Library/SerialPortExtLib.h has been upstream to
MdePkg/Include/Library/SerialPortLib.h.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18966 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-26 08:48:10 +00:00