From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.4945.1647004114410584008 for ; Fri, 11 Mar 2022 05:08:34 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3BA60175D; Fri, 11 Mar 2022 05:08:33 -0800 (PST) Received: from [10.34.125.51] (e126645.nice.arm.com [10.34.125.51]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A6A4C3FA27; Fri, 11 Mar 2022 05:08:31 -0800 (PST) Message-ID: Date: Fri, 11 Mar 2022 14:08:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v1 1/1] DynamicTablesPkg: Fix serial port namespace path in DBG2 To: Sami Mujawar , devel@edk2.groups.io Cc: Alexei.Fedorov@arm.com, Jagadeesh.Ujja@arm.com, Matteo.Carlini@arm.com, Akanksha.Jain2@arm.com, Ben.Adderson@arm.com References: <20220310173927.105596-1-sami.mujawar@arm.com> From: "PierreGondois" In-Reply-To: <20220310173927.105596-1-sami.mujawar@arm.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Sami, The patch looks good to me: Reviewed-by: Pierre Gondois On 3/10/22 18:39, Sami Mujawar wrote: > 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 > --- > The changes can be seen at: > https://github.com/samimujawar/edk2/tree/2105_dbg2_generator_namestring_issue_v1 > > DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c > index 3d513dbd1fbe8c47d270a9e639b2797098201d91..f6dfb3d94c10980a0e7712ce9427648b69974061 100644 > --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c > +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c > @@ -1,7 +1,7 @@ > /** @file > DBG2 Table Generator > > - Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
> + Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.
> > SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -55,13 +55,17 @@ Requirements: > */ > #define NAME_STR_DBG_PORT0 "COM0" > > +/** A string representing the full path name of the debug port 0. > +*/ > +#define NAMESPACE_STR_DBG_PORT0 "\\_SB_.COM0" > + > /** An UID representing the debug port 0. > */ > #define UID_DBG_PORT0 0 > > /** The length of the namespace string. > */ > -#define DBG2_NAMESPACESTRING_FIELD_SIZE sizeof (NAME_STR_DBG_PORT0) > +#define DBG2_NAMESPACESTRING_FIELD_SIZE sizeof (NAMESPACE_STR_DBG_PORT0) > > /** The PL011 UART address range length. > */ > @@ -166,7 +170,7 @@ DBG2_TABLE AcpiDbg2 = { > 0, // {Template}: Serial Port Subtype > 0, // {Template}: Serial Port Base Address > PL011_UART_LENGTH, > - NAME_STR_DBG_PORT0 > + NAMESPACE_STR_DBG_PORT0 > ) > } > };