Commit Graph

8 Commits

Author SHA1 Message Date
Sami Mujawar 1c03498a25 MdeModulePkg: Fix constructor invocation ordering
The BaseSerialPortLib16550 library does not implement
a constructor. This prevents the correct constructor
invocation order for dependent libraries.
e.g. A PlatformHookLib (for the Serial Port) may have
a dependency on retrieving data from a Hob. A Hob
library implementation may configure its initial state
in the HobLib constructor. Since BaseSerialPortLib16550
does not implement a constructor, the Basetools do not
resolve the correct order for constructor invocation.

To fix this, add an empty constructor to the serial port
library BaseSerialPortLib16550.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Ard Biesheuvel <Ard.Biesheuvel@arm.com>
Acked-by: Hao A Wu <hao.a.wu@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
2020-10-16 17:21:04 +00:00
Tien Hock, Loh 8a472b1915 MdeModulePkg: BaseSerialPortLib16550: Add Mmio32 support
Some buses doesn't allow 8 bit MMIO read/write, this adds support for
32 bits read/write

Signed-off-by: "Tien Hock, Loh" <tien.hock.loh@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2019-04-29 15:50:16 +08:00
Michael D Kinney 9d510e61fc MdeModulePkg: Replace BSD License with BSD+Patent License
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2019-04-09 10:58:08 -07:00
Liming Gao d1102dba72 MdeModulePkg: Clean up source files
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2018-06-28 11:19:45 +08:00
Michael Kinney cd68e4a8de MdePkg/BaseSerialPortLib16550: Support UARTs with a register stride greater than 1 byte.
Add stride PCD to MdeModulePkg to support 16550 UARTs with a register stride that is not 1 byte.
The default value is 1 byte.
Quark SoC uses a stride of 4 bytes.

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



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17215 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-27 19:44:40 +00:00
Gao, Liming 31122d8c9a MdeModulePkg: BaseSerialPortLib16550 library to support PCI UART device.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Kinney, Michael D <michael.d.kinney@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15783 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-11 06:38:28 +00:00
mdkinney 784ce12727 1) Add PcdSerialDetectCable to MdeModulePkg to enable/disable cable detection if hardware flow control is enabled. The default is to not perform cable detection.
2) Update BaseSerialPortLib16550 to use this new PCD.

This addresses an issue that was introduced on Feb 3, 2011 when all references to Carrier Detect(CD) were removed from the BaseSerialPortLib16550.  When that change was made, a target would block on the first Tx operation if hardware flow control was enabled and no cable or serial application was running on a host. Now the behavior when no cable is connected or no serial app is running on the host is controlled through a PCD.  The default is for the target to continue execution even if there is no cable or serial app running.  If PcdSerialDetectCable is set to TRUE, then the target will block on any transmit that does not have a cable connected or a serial app running in the host.

If hardware flow control is disabled, then this update will have no impact on behavior.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11301 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-10 23:27:12 +00:00
mdkinney 467d15ae63 Add generic SerialPortLib instance for 16550 UARTs configured through PCDs. Depends on new library class called PlatformHookLib to perform platform specific initialization of the UART.
Add PlatformHookLib.h that defines the PlatformHookLib class
Add PlatformHookLibNull instance that is a Null implementation of the PlatformHookLib class





git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11184 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-18 01:02:59 +00:00