]> git.proxmox.com Git - mirror_edk2.git/commitdiff
DynamicTablesPkg: Fix serial port namespace path in DBG2
authorSami Mujawar <sami.mujawar@arm.com>
Thu, 10 Mar 2022 17:39:27 +0000 (17:39 +0000)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 15 Mar 2022 14:33:03 +0000 (14:33 +0000)
According to the Debug Port Table 2 (DBG2) specification,
February 17, 2021, the NamespaceString is a NULL terminated
ASCII string that consists of a fully qualified reference
to the object that represents the serial port device in the
ACPI namespace.

The DBG2 table generator did not populate the full device
path for the serial port device, and this results in a FWTS
test failure.

Therefore, populate the full namespace device path for the
serial port in DBG2 table.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Tested-by: Jagadeesh Ujja <Jagadeesh.Ujja@arm.com>
Tested-by: Sunny Wang <sunny.wang@arm.com>
DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c

index 3d513dbd1fbe8c47d270a9e639b2797098201d91..f6dfb3d94c10980a0e7712ce9427648b69974061 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   DBG2 Table Generator\r
 \r
-  Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.<BR>\r
+  Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.<BR>\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
@@ -55,13 +55,17 @@ Requirements:
 */\r
 #define NAME_STR_DBG_PORT0  "COM0"\r
 \r
+/** A string representing the full path name of the debug port 0.\r
+*/\r
+#define NAMESPACE_STR_DBG_PORT0  "\\_SB_.COM0"\r
+\r
 /** An UID representing the debug port 0.\r
 */\r
 #define UID_DBG_PORT0  0\r
 \r
 /** The length of the namespace string.\r
 */\r
-#define DBG2_NAMESPACESTRING_FIELD_SIZE  sizeof (NAME_STR_DBG_PORT0)\r
+#define DBG2_NAMESPACESTRING_FIELD_SIZE  sizeof (NAMESPACE_STR_DBG_PORT0)\r
 \r
 /** The PL011 UART address range length.\r
 */\r
@@ -166,7 +170,7 @@ DBG2_TABLE  AcpiDbg2 = {
       0,                    // {Template}: Serial Port Subtype\r
       0,                    // {Template}: Serial Port Base Address\r
       PL011_UART_LENGTH,\r
-      NAME_STR_DBG_PORT0\r
+      NAMESPACE_STR_DBG_PORT0\r
       )\r
   }\r
 };\r