mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
7766ebd5ad
commit
42c0019f27
|
@ -44,5 +44,8 @@
|
||||||
# Maximum number of Custom DT Generators
|
# Maximum number of Custom DT Generators
|
||||||
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdMaxCustomDTGenerators|1|UINT16|0xC0000003
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdMaxCustomDTGenerators|1|UINT16|0xC0000003
|
||||||
|
|
||||||
|
# Non BSA Compliant 16550 Serial HID
|
||||||
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdNonBsaCompliant16550SerialHid|""|VOID*|0x40000008
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gEdkiiDynamicTablesPkgTokenSpaceGuid = { 0xab226e66, 0x31d8, 0x4613, { 0x87, 0x9d, 0xd2, 0xfa, 0xb6, 0x10, 0x26, 0x3c } }
|
gEdkiiDynamicTablesPkgTokenSpaceGuid = { 0xab226e66, 0x31d8, 0x4613, { 0x87, 0x9d, 0xd2, 0xfa, 0xb6, 0x10, 0x26, 0x3c } }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
SSDT Serial Port Fixup Library.
|
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
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
|
@ -139,13 +139,21 @@ FixupIds (
|
||||||
AML_OBJECT_NODE_HANDLE NameOpIdNode;
|
AML_OBJECT_NODE_HANDLE NameOpIdNode;
|
||||||
CONST CHAR8 * HidString;
|
CONST CHAR8 * HidString;
|
||||||
CONST CHAR8 * CidString;
|
CONST CHAR8 * CidString;
|
||||||
|
CONST CHAR8 * NonBsaHid;
|
||||||
|
|
||||||
// Get the _CID and _HID value to write.
|
// Get the _CID and _HID value to write.
|
||||||
switch (SerialPortInfo->PortSubtype) {
|
switch (SerialPortInfo->PortSubtype) {
|
||||||
case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_FULL_16550:
|
case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_FULL_16550:
|
||||||
{
|
{
|
||||||
HidString = "PNP0501";
|
// If there is a non-BSA compliant HID, use that.
|
||||||
CidString = "PNP0500";
|
NonBsaHid = (CONST CHAR8*)PcdGetPtr (PcdNonBsaCompliant16550SerialHid);
|
||||||
|
if ((NonBsaHid != NULL) && (AsciiStrLen (NonBsaHid) != 0)) {
|
||||||
|
HidString = NonBsaHid;
|
||||||
|
CidString = "";
|
||||||
|
} else {
|
||||||
|
HidString = "PNP0501";
|
||||||
|
CidString = "PNP0500";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART:
|
case EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_ARM_PL011_UART:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
## @file
|
## @file
|
||||||
# SSDT Serial Port fixup Library
|
# 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
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
##
|
##
|
||||||
|
@ -28,3 +28,5 @@
|
||||||
AmlLib
|
AmlLib
|
||||||
BaseLib
|
BaseLib
|
||||||
|
|
||||||
|
[Pcd]
|
||||||
|
gEdkiiDynamicTablesPkgTokenSpaceGuid.PcdNonBsaCompliant16550SerialHid
|
||||||
|
|
Loading…
Reference in New Issue