From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 815CEAC0F15 for ; Thu, 20 Jul 2023 15:25:48 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=39X5tJ2KRDDqtVKq29htseLjKAECFnsAU+DzOc5kM6k=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-Received:X-Received:Message-ID:Date:MIME-Version:User-Agent:From:Subject:To:Cc:References:In-Reply-To:Precedence:List-Unsubscribe:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:X-Gm-Message-State:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1689866747; v=1; b=OxMmM2y9FyEV9ZmUEWj8DhuZ+5OyB4yfcHAmaaRzyjDhIPGYiJms5u2Jla3brcoEfl380+Bu Tdv+7Kh7Lp6ywWF7mEYo76GjmnGQLF/GRIZKuV7svN8uKCc/sL3SGLIrasSIB+FcgQs9dzkf4zn OmixlMwRUqnXM+GZSHKGJIvA= X-Received: by 127.0.0.2 with SMTP id TgcqYY7687511xjjxoiEhqMC; Thu, 20 Jul 2023 08:25:47 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.1.1689866721093138860 for ; Thu, 20 Jul 2023 08:25:21 -0700 X-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 EDF942F4; Thu, 20 Jul 2023 08:26:03 -0700 (PDT) X-Received: from [10.34.100.101] (e126645.nice.arm.com [10.34.100.101]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9BC343F738; Thu, 20 Jul 2023 08:25:19 -0700 (PDT) Message-ID: <1fe0c7bd-29f3-c941-d14d-6850ede9bdff@arm.com> Date: Thu, 20 Jul 2023 17:25:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 From: "PierreGondois" Subject: Re: [edk2-devel] [PATCH V3 2/3] ShellPkg: acpiview: Add routine to print 16 chars To: devel@edk2.groups.io, rohit.mathew@arm.com Cc: Thomas Abraham , Sami Mujawar , James Morse , Ray Ni , Zhichao Gao References: <20230522144454.2799102-1-Rohit.Mathew@arm.com> In-Reply-To: <20230522144454.2799102-1-Rohit.Mathew@arm.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: lfsbZO4Lg1c2N3fgvMQxn2bqx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=OxMmM2y9; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: Pierre Gondois On 5/22/23 16:44, Rohit Mathew via groups.io wrote: > Certain ACPI tables like MPAM has fields which are 16 bytes long. > Routines similar to Dump12Chars but for 16 characters are required to > print such fields. Add Dump16Chars routine to satisfy this requirement. >=20 > Signed-off-by: Rohit Mathew > --- > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 39 ++++++++= +++++++++++- > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h | 18 ++++++++= - > 2 files changed, 55 insertions(+), 2 deletions(-) >=20 > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/= ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > index eac9286176..87f55098b8 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > @@ -1,7 +1,7 @@ > /** @file > ACPI parser > =20 > - Copyright (c) 2016 - 2021, Arm Limited. All rights reserved. > + Copyright (c) 2016 - 2023, Arm Limited. All rights reserved. > Copyright (c) 2022, AMD Incorporated. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent > **/ > @@ -449,6 +449,43 @@ Dump12Chars ( > ); > } > =20 > +/** > + This function traces 16 characters which can be optionally > + formated using the format string if specified. > + > + If no format string is specified the Format must be NULL. > + > + @param [in] Format Optional format string for tracing the data. > + @param [in] Ptr Pointer to the start of the buffer. > +**/ > +VOID > +EFIAPI > +Dump16Chars ( > + IN CONST CHAR16 *Format OPTIONAL, > + IN UINT8 *Ptr > + ) > +{ > + Print ( > + (Format !=3D NULL) ? Format : L"%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", > + Ptr[0], > + Ptr[1], > + Ptr[2], > + Ptr[3], > + Ptr[4], > + Ptr[5], > + Ptr[6], > + Ptr[7], > + Ptr[8], > + Ptr[9], > + Ptr[10], > + Ptr[11], > + Ptr[12], > + Ptr[13], > + Ptr[14], > + Ptr[15] > + ); > +} > + > /** > This function indents and prints the ACPI table Field Name. > =20 > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h b/= ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > index 4b4397961b..c9f41650d9 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > @@ -2,7 +2,7 @@ > Header file for ACPI parser > =20 > Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. > - Copyright (c) 2016 - 2020, Arm Limited. All rights reserved. > + Copyright (c) 2016 - 2023, Arm Limited. All rights reserved. > Copyright (c) 2022, AMD Incorporated. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent > **/ > @@ -202,6 +202,22 @@ Dump12Chars ( > IN UINT8 *Ptr > ); > =20 > +/** > + This function traces 16 characters which can be optionally > + formated using the format string if specified. > + > + If no format string is specified the Format must be NULL. > + > + @param [in] Format Optional format string for tracing the data. > + @param [in] Ptr Pointer to the start of the buffer. > +**/ > +VOID > +EFIAPI > +Dump16Chars ( > + IN CONST CHAR16 *Format OPTIONAL, > + IN UINT8 *Ptr > + ); > + > /** > This function indents and prints the ACPI table Field Name. > =20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107103): https://edk2.groups.io/g/devel/message/107103 Mute This Topic: https://groups.io/mt/99066184/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-