diff options
Diffstat (limited to 'DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib')
-rw-r--r-- | DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.c | 14 | ||||
-rw-r--r-- | DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf | 4 |
2 files changed, 14 insertions, 4 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:
diff --git a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf index af3d404393..54bf71a3b7 100644 --- a/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf +++ b/DynamicTablesPkg/Library/Common/SsdtSerialPortFixupLib/SsdtSerialPortFixupLib.inf @@ -1,7 +1,7 @@ ## @file
# SSDT Serial Port fixup Library
#
-# Copyright (c) 2020, Arm Limited. All rights reserved.<BR>
+# Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
@@ -28,3 +28,5 @@ AmlLib
BaseLib
+[Pcd]
+ gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdNonBsaCompliant16550SerialHid
|