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

43 lines
1.4 KiB
INI

## @file
# SerialPortLib instance for 16550 UART
#
# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = BaseSerialPortLib16550
FILE_GUID = 9E7C00CF-355A-4d4e-BF60-0428CFF95540
MODULE_TYPE = BASE
VERSION_STRING = 1.0
LIBRARY_CLASS = SerialPortLib
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
[LibraryClasses]
PcdLib
IoLib
PlatformHookLib
[Sources]
BaseSerialPortLib16550.c
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialDetectCable
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialLineControl
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl