ArmPlatformPkg/PL011UartLib : Fix incorrect control bit validation

REF: [e092122]
(PR #12085)

The current logic in ArmPlatformPkg/PL011UartLib performs
control-bit checks intended to align with the UEFI specification.
However, it incorrectly validates control bits that
cannot be set through SetControl(), resulting in failures
in the SetControl() SCT test.

According to the UEFI specification,
the valid control bits that can be set are:

EFI_SERIAL_REQUEST_TO_SEND
EFI_SERIAL_DATA_TERMINAL_READY
EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE
EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE
EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE

This patch updates mAllowedControlBits so that only these
valid control bits are accepted during validation.

Cc: Sachin Ganesh <sachinganesh@ami.com>
Signed-off-by: Kavipriyan K P <kavipriyankp@ami.com>
This commit is contained in:
kavipriyankp
2026-02-10 12:57:02 +05:30
committed by mergify[bot]
parent 12f785f106
commit 7baa358e2c
@@ -25,13 +25,11 @@
// Per UEFI spec, only these control bits are allowed to be set.
//
STATIC CONST UINT32 mAllowedControlBits =
EFI_SERIAL_CLEAR_TO_SEND |
EFI_SERIAL_DATA_SET_READY |
EFI_SERIAL_RING_INDICATE |
EFI_SERIAL_CARRIER_DETECT |
EFI_SERIAL_REQUEST_TO_SEND |
EFI_SERIAL_DATA_TERMINAL_READY |
EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE |
EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE |
EFI_SERIAL_OUTPUT_BUFFER_EMPTY |
EFI_SERIAL_INPUT_BUFFER_EMPTY;
EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE;
//
// platform-specific bits that are not supported by this device.