diff options
author | Joey Gouly <joey.gouly@arm.com> | 2021-01-22 12:51:12 +0000 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-02-11 10:35:35 +0000 |
commit | 42c0019f27516c4927a2729a0086833cf5425fff (patch) | |
tree | e6df2b822656feb91e7a0abdababa56a271fe7e1 /DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c | |
parent | 7766ebd5adf90b0eab63c57ca6b273ee4d3b2669 (diff) | |
download | edk2-42c0019f27516c4927a2729a0086833cf5425fff.tar.gz edk2-42c0019f27516c4927a2729a0086833cf5425fff.tar.bz2 edk2-42c0019f27516c4927a2729a0086833cf5425fff.zip |
DynamicTablesPkg: Add an override for 16550 HID in SSDT
Some platforms advertise support for a 16550 UART, but are not
compatible with the PNP0500 HID. Allow them to override the HID by
setting PcdNonBsaCompliant16550SerialHid.
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Diffstat (limited to 'DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c')
-rw-r--r-- | DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c index 0ff071485e..3c4356097c 100644 --- a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c +++ b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c @@ -1,7 +1,7 @@ /** @file
SSDT Serial Port Fixup Library.
- Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.<BR>
+ Copyright (c) 2019 - 2021, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -139,13 +139,21 @@ FixupIds ( AML_OBJECT_NODE_HANDLE NameOpIdNode;
CONST CHAR8 * HidString;
CONST CHAR8 * CidString;
+ CONST CHAR8 * NonBsaHid;
// Get the _CID and _HID value to write.
switch (SerialPortInfo->PortSubtype) {
case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_FULL_16550:
{
- HidString = "PNP0501";
- CidString = "PNP0500";
+ // If there is a non-BSA compliant HID, use that.
+ NonBsaHid = (CONST CHAR8*)PcdGetPtr (PcdNonBsaCompliant16550SerialHid);
+ if ((NonBsaHid != NULL) && (AsciiStrLen (NonBsaHid) != 0)) {
+ HidString = NonBsaHid;
+ CidString = "";
+ } else {
+ HidString = "PNP0501";
+ CidString = "PNP0500";
+ }
break;
}
case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART:
|