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 1DFA87803DB for ; Tue, 5 Dec 2023 11:47:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=nUoT/yAcNBNHVE8or2dctHPnMlXt0NizqbRrenMZ18Q=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Authentication-Results-Original:Message-ID:Date:User-Agent:From:Subject:To:Cc:References:In-Reply-To:MIME-Version:NoDisclaimer:Original-Authentication-Results:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1701776865; v=1; b=hqt4GvoFl+gNVKj4fxhTn/maCdWCIHOSxLttCXFqF8tRivfvkXZmwAdEVJQV1d9bxiCvScuD ye6oK5pUnFW+e1YnUuIYCdcPoNwmVF60WST8lMm4MrIL3kox6A7rXfdoaA+atjPhx7rGE0KgD3g Q/YkjqHXahFSIOrFVfbsVHN4= X-Received: by 127.0.0.2 with SMTP id EtWGYY7687511xifewCXIvhN; Tue, 05 Dec 2023 03:47:45 -0800 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.84]) by mx.groups.io with SMTP id smtpd.web10.98455.1701776864317225247 for ; Tue, 05 Dec 2023 03:47:45 -0800 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=VB/tVsrWRyCRut0Xo6VkHZ4DL1cZD500EKwruwPBgBziu0Jb50fbKsDyDDndupM4c4chqK1MLMrp9plz7ez4+6RBqARvBKagrT/5UF3LXZdROBnvVnvKrK1yYkn26S8X3vAHvokJLr60c863NBxSqppqw7baOBvJDWCGdGkwH8FaWp/yUy1gam+QCabe/EVkUeH3VMo8tEImYAuaSeY4khjlKaB+U0CGh71N29Cv9FykpjPFx2j3OUAyFDVbgcljPbNsG+YtvTsNVx1livVIZe1/KLhQtL0xicWTznrnYiomuxOH1DxYVMe3zL2mPLKhuQFahYRR+lJDlBjGtXA4jA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fDbza72XtQsMqiw5xSUr+PObtrt7eJAOat9VODy6l1g=; b=BYu4e2soJxu0vt5BJoMXq3fHNVAqpqcmF5jiQ2WooY5mKYqguWuF1hKUkZVXvD0Zw6c5UNmtTCyAT935OfjzklkAv3+79VeQCwaE8zBG15MUsxthDDx8elxdww3B/o25otkpjT9VGn9XLJePtIQhMCDd08h6vTKuTVsCD25MDRXf322IARE5szqJ+p95qkgSD2FYI9yFS04g1a6xYJ4E8p61q0ZgJ5/XyHxujxfe8KQYlFxFGqPp1AsVVNsdEfVDZIPmV/fCiCZ6fbkxlbZEpkrR9MuhTtGoBTmTJTLr5WXVvUGeBG3kNYxffCo7kSxOItxk8yoLbkfQlNAT4MJc8g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) X-Received: from AS9PR06CA0176.eurprd06.prod.outlook.com (2603:10a6:20b:45c::14) by GV2PR08MB8269.eurprd08.prod.outlook.com (2603:10a6:150:b9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34; Tue, 5 Dec 2023 11:47:35 +0000 X-Received: from AM3PEPF00009BA0.eurprd04.prod.outlook.com (2603:10a6:20b:45c:cafe::60) by AS9PR06CA0176.outlook.office365.com (2603:10a6:20b:45c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.34 via Frontend Transport; Tue, 5 Dec 2023 11:47:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM3PEPF00009BA0.mail.protection.outlook.com (10.167.16.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.24 via Frontend Transport; Tue, 5 Dec 2023 11:47:34 +0000 X-Received: ("Tessian outbound 7671e7ddc218:v228"); Tue, 05 Dec 2023 11:47:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8e763b6b2f72bec7 X-CR-MTA-TID: 64aa7808 X-Received: from ea6dc15a8c37.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 162DF1DA-B60F-4D9D-9219-266506C9A836.1; Tue, 05 Dec 2023 11:47:24 +0000 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ea6dc15a8c37.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 05 Dec 2023 11:47:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JvgTi3uFJcTivb6Yf1Z/Wt+MZzoMjfAm6bDE6/AIoClIgfbD8Y2lZjnctKgbHX8IcXQaMl2syqAQQaSCoQllzgVZtPTSsjoGj36O4V9jccGXZdPx2xfQAhC1XMof78u9qCgAT99mNYrTUU3T49x2e6KIDk6cufVZcU7HA9qhzR04/zxQF8n2MSg365F4gg9Lb4mooocF2e2rXrcWCya+XNa1T9cShX7L10McHon+0nSnnLuVRL6iCKXraMtZFqnlAtRmawj7rIuQwU55KymZZejdX9aEkHQxIbIcEeU1qqYb7M0lv0gw2pmjxN5AggjoS0Nsj/YBeCTkaez+nQLPqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fDbza72XtQsMqiw5xSUr+PObtrt7eJAOat9VODy6l1g=; b=EhH6Gqr3TAUuxLwqs5nNkYjRjlJgFaugwlsxC1/Zo0ekxnZxXDicJo9efwsa5/6p9fSFN261zmjSxzDiKLPPVv0Olcdi94DjfiOwgz+7lqcF5DorR41YoMx6Nt3GWoBIMTmI80jGmWGp6yihIddaRJxcSxqaVhF5c7KoCTtbi2cdyWfVFihfS7SLUFK00C+LgW8bf5W4o2TuFmqI84tb0ppdCne/p/yvj/oSyllmy1Nhyotaw4pgMdKKUlAEPUkrlUd5k7iAnHFLjD8CttkyubEolyug+Ouzc2xNom3J6sYscgL39FwhwMmpEiCKFHNa48LXuAe5pgk9lg9kiNBQmQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by DU0PR08MB7836.eurprd08.prod.outlook.com (2603:10a6:10:3b3::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.33; Tue, 5 Dec 2023 11:47:21 +0000 X-Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::f36e:3882:2fce:d775]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::f36e:3882:2fce:d775%4]) with mapi id 15.20.7046.034; Tue, 5 Dec 2023 11:47:18 +0000 Message-ID: <97994f97-55bd-41a2-a31a-c650dd2d7ebb@arm.com> Date: Tue, 5 Dec 2023 11:47:13 +0000 User-Agent: Mozilla Thunderbird From: "Sami Mujawar" Subject: Re: [edk2-devel] [PATCH v5 2/6] ShellPkg/AcpiView: Update field-validator prototype To: Rohit Mathew , devel@edk2.groups.io Cc: James Morse , Thomas Abraham , Zhichao Gao , "nd@arm.com" References: <20231002171550.901005-1-Rohit.Mathew@arm.com> In-Reply-To: <20231002171550.901005-1-Rohit.Mathew@arm.com> X-ClientProxiedBy: LO2P123CA0030.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600::18) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6806:EE_|DU0PR08MB7836:EE_|AM3PEPF00009BA0:EE_|GV2PR08MB8269:EE_ X-MS-Office365-Filtering-Correlation-Id: 66055bfe-91a8-4cae-d2dd-08dbf587f907 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: UzJCRhd9m1lcWd/Rv5RcPRyEuRpWtzRxl5J7qwILDfjabJaPJ4VRHM9DPmx8RtMbJY6i3bTZUnvMjZDwyt5cpUmt6Vx1Nd0rx1ROjfXInxEQZnUAnhjLSfZq5aYidIZElnP6/aHsccyZBoI1XasLYmM0HrReNUyUkum+fvfrbDzDgOiZFSnOYt9E4vfuJIew3rsWzYAxTKnMVRbNKeyWi3dDhljiyUDRbJVPfCiJDJn0HFI+/VaGRM8hlH2lsglftW1Z7P9WbW2dwuxblP11EgW9CuewnVU6FpZnbfyI/KfL0g6aHTDEu3yNZJ0n9DmQau5pk3EAJ7M27ISs4CLHWc0tGI5ksHKweLF1CZ0S+TWX2iRzbl+9xzOx1a47cxyv/4N6qz6TIIP79241ptQ5j6r+mBT/R34y+1ipK6VWL31D8+U5d6W44g+s9T64/YtNQ8sWeX1hIJ1p4FYMeqkOsFgZeJvQ2Kj2gZjt1dnbvgOarYen8FHIPfEkyfKRaR7+XI8IO+M4owNzCy/+cM9k87uLjuXs55Wrav1+9EIiqq0wXz4xyrKIk3gwNfRs6E3U7VenW5kK6xDLbglVPCjlzvr3uq8s4tP7oS0BCHEpHiWiMZuKYj0iZc5TCvYyK5D3hyQr9+YlY7aTv03ORQAtdg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(396003)(39860400002)(346002)(136003)(366004)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(31686004)(2616005)(8936002)(4326008)(8676002)(6512007)(6506007)(53546011)(83380400001)(26005)(31696002)(6486002)(478600001)(6666004)(54906003)(66946007)(66556008)(316002)(38100700002)(66476007)(2906002)(41300700001)(36756003)(44832011)(86362001)(15650500001)(19627235002)(5660300002)(30864003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7836 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF00009BA0.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b192e157-7e90-4540-0d8b-08dbf587ed92 X-Microsoft-Antispam-Message-Info: yDymrO2IAoo9X5R+ndr+F4rG/vHDOS7kwYBFe0liOp7HKdveXM+Ekr3k8z7vaTEKQE+YcLdTIpOMMWK5auUcRYWG4N1TgU6Yr9+ncLLE+/eP1o4A/5bek+j7oYuuhrbKW8pcT6srz8gWIV5wODsXD75Hqev0Dg8TzcwUkzFQz1N0GCJqtfacu2q0KVZRKlH/j0dAit4KuLaNUKLDaN3mPV/weE8Up9ML8rtXG+lL6uy+sblMJ1yB/ZU9qZc3hXdcGhqQIKBXKOo6le00jlSjwrI34o5a+mlGkjkK6fcnxY2iPqk3Q4gEL5zKcMP+3b2QDyx1M7xfbBZFGwcBc/yP0rSXoHDmT2P4xVeYOWR+riamBm+TGHW7/G/RdsApmy2D2RQgFyOyxEQjAVeY4EH7hbTWtHTMAl0ZcG0K/T8D/IUNWMyVN1TjFLjSHrV7UD1lZeSPuNKaRvJ6IlieBo0roCn+6p2X06z4Su3j9YmspL6prsi6G1gTBNwYItzgyXBHaCve2pWgPAC6rafjvWhZnIdGoAwMV4C5kvqfJXdN22g6NTM0z61hQtBwUkiJB/fLzyRz87bCD4zB+ypN6ZeRxcYVP3M6wn5KyQ3oR1CfY7J3jlaBMnVESmAfg+xHdhuL/HIgtIBUQ9Oqh46nENHRsTZjhPB4ET3LAv9ngj9GjEnQ9x1IOnnIeVq9/i65AyvEB4+/zOKid3IerM9yI7ABRJKNCUxH3yBraKVAGBlPYwjlubUWoI5DSf+5WIlikNkiG1neB4gIoumUjU2Owv6rZw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Dec 2023 11:47:34.9705 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 66055bfe-91a8-4cae-d2dd-08dbf587f907 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM3PEPF00009BA0.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB8269 Precedence: Bulk 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,sami.mujawar@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: kPZPJV4OzyVa7e6wFklCYhWRx7686176AA= Content-Language: en-GB 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=hqt4GvoF; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); 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 Hi Rohit, Thank you for this patch. I haev a minor suggestion to marked inline as [SAMI] which involves=20 moving the Length as the second parameter in the validator function. Unfortunately this would mean changes across the entire patch. But I=20 think it provides better grouping of parameters. With that addressed, Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 02/10/2023 06:15 pm, Rohit Mathew wrote: > As of now, the field-validator implemented by FNPTR_FIELD_VALIDATOR > function pointer takes two parameters, the pointer to the field and a > context pointer. For cases where the validator has to have access to the > length of the field, there is no clean way to currently do it. In order > to resolve this, this commit updates the field-validator's prototype to > take the length of the field as a third parameter. > > This enhancement allows field validators to perform more comprehensive > validation, especially when the length of the field is critical to the > validation logic. This change should improve the overall robustness and > flexibility of AcpiView. > > Signed-off-by: Rohit Mathew > Cc: James Morse > Cc: Sami Mujawar > Cc: Thomas Abraham > Cc: Zhichao Gao > --- > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c = | 6 +-- > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h = | 5 +- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Aest/AestParser.c = | 32 +++++++---- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c = | 8 +-- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/ErstParser.c = | 20 ++++--- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c = | 20 ++++--- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c = | 14 +++-- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hmat/HmatParser.c = | 8 +-- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c = | 32 +++++++---- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c = | 14 +++-- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c = | 56 +++++++++++++------- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c = | 38 ++++++++----- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c = | 14 +++-- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c = | 14 +++-- > ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c = | 14 +++-- > 15 files changed, 190 insertions(+), 105 deletions(-) > > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/= ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > index eac9286176..6823ba60cf 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 > **/ > @@ -616,7 +616,7 @@ ParseAcpi ( > if (GetConsistencyChecking () && > (Parser[Index].FieldValidator !=3D NULL)) > { > - Parser[Index].FieldValidator (Ptr, Parser[Index].Context); > + Parser[Index].FieldValidator (Ptr, Parser[Index].Context, Parser= [Index].Length); > } > =20 > Print (L"\n"); > @@ -927,7 +927,7 @@ ParseAcpiBitFields ( > if (GetConsistencyChecking () && > (Parser[Index].FieldValidator !=3D NULL)) > { > - Parser[Index].FieldValidator ((UINT8 *)&Data, Parser[Index].Cont= ext); > + Parser[Index].FieldValidator ((UINT8 *)&Data, Parser[Index].Cont= ext, Parser[Index].Length); > } > =20 > Print (L"\n"); > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h b/= ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > index 4b4397961b..6d8b44d94a 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 > **/ > @@ -237,8 +237,9 @@ typedef VOID (EFIAPI *FNPTR_PRINT_FORMATTER)(CONST CH= AR16 *Format, UINT8 *Ptr); > @param [in] Context Pointer to context specific information as specif= ied by > the 'Context' member of the ACPI_PARSER. > e.g. this could be a pointer to the ACPI table he= ader. > + @param [in] Length Length of the field. > **/ > -typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8 *Ptr, VOID *Context); > +typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8 *Ptr, VOID *Context, = UINT32 Length); [SAMI] I would prefer the Length field to be the second parameter. > =20 > /** > The ACPI_PARSER structure describes the fields of an ACPI table and > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Aest/Ae= stParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Aest/Aest= Parser.c > index 48f71484fb..a37927b107 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Aest/AestParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Aest/AestParse= r.c > @@ -1,7 +1,7 @@ > /** @file > AEST table parser > =20 > - Copyright (c) 2020, Arm Limited. > + Copyright (c) 2023, Arm Limited. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > @@ -35,13 +35,15 @@ STATIC UINT8 *ProcessorResour= ceType; > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. th= is > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateProcessorFlags ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > // If the global or shared node flag is set then the ACPI Processor I= D > @@ -61,13 +63,15 @@ ValidateProcessorFlags ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. th= is > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateGicInterfaceType ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > UINT32 GicInterfaceType; > @@ -85,13 +89,15 @@ ValidateGicInterfaceType ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. th= is > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateInterfaceType ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*Ptr > 1) { > @@ -106,13 +112,15 @@ ValidateInterfaceType ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. th= is > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateInterruptType ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*Ptr > 1) { > @@ -127,13 +135,15 @@ ValidateInterruptType ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. th= is > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateInterruptFlags ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if ((*Ptr & 0xfe) !=3D 0) { > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Db= g2Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2= Parser.c > index d25d4d84f8..4400b55553 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parse= r.c > @@ -1,7 +1,7 @@ > /** @file > DBG2 table parser > =20 > - Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. > + Copyright (c) 2016 - 2023, ARM Limited. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > @@ -32,13 +32,15 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; > @param [in] Ptr Pointer to the start of the buffer. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateNameSpaceStrLen ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > UINT16 NameSpaceStrLen; > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/Er= stParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/Erst= Parser.c > index f3ae09309c..f9f08732ca 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/ErstParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/ErstParse= r.c > @@ -2,7 +2,7 @@ > ERST table parser > =20 > Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. > - Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. > + Copyright (c) 2016 - 2023, ARM Limited. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > @@ -72,13 +72,15 @@ STATIC CONST CHAR16 *ErstInstructionTable[] =3D { > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. th= is > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateErstAction ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*Ptr > EFI_ACPI_6_4_ERST_GET_EXECUTE_OPERATION_TIMINGS) { > @@ -93,13 +95,15 @@ ValidateErstAction ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. th= is > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateErstInstruction ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*Ptr > EFI_ACPI_6_4_ERST_MOVE_DATA) { > @@ -114,13 +118,15 @@ ValidateErstInstruction ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. th= is > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateErstFlags ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if ((*Ptr & 0xfe) !=3D 0) { > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/Fa= dtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/Fadt= Parser.c > index abc58d6552..f03b99ebde 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParse= r.c > @@ -1,7 +1,7 @@ > /** @file > FADT table parser > =20 > - 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 > =20 > @@ -59,13 +59,15 @@ GetAcpiXsdtHeaderInfo ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateFirmwareCtrl ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) > @@ -85,13 +87,15 @@ ValidateFirmwareCtrl ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateXFirmwareCtrl ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) > @@ -111,13 +115,15 @@ ValidateXFirmwareCtrl ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateFlags ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/Gt= dtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/Gtdt= Parser.c > index e62927098a..29bd781465 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParse= r.c > @@ -1,7 +1,7 @@ > /** @file > GTDT table parser > =20 > - Copyright (c) 2016 - 2021, ARM Limited. All rights reserved. > + Copyright (c) 2016 - 2023, ARM Limited. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > @@ -32,13 +32,15 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateGtBlockTimerCount ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > UINT32 BlockTimerCount; > @@ -61,13 +63,15 @@ ValidateGtBlockTimerCount ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateGtFrameNumber ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > UINT8 FrameNumber; > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hmat/Hm= atParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hmat/Hmat= Parser.c > index 2a1357c853..de8e9cf01f 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hmat/HmatParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hmat/HmatParse= r.c > @@ -1,7 +1,7 @@ > /** @file > HMAT table parser > =20 > - Copyright (c) 2020, Arm Limited. > + Copyright (c) 2023, Arm Limited. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > @@ -56,13 +56,15 @@ STATIC CONST CHAR16 *SllbiNames[] =3D { > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateCacheAttributes ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > EFI_ACPI_6_4_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES * > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/Io= rtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/Iort= Parser.c > index 599cf0ee8f..122e087eed 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParse= r.c > @@ -1,7 +1,7 @@ > /** @file > IORT table parser > =20 > - Copyright (c) 2016 - 2022, Arm Limited. All rights reserved. > + Copyright (c) 2016 - 2023, Arm Limited. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > @@ -48,13 +48,15 @@ STATIC CONST UINT32 *RmrMemDescOffset; > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateItsIdMappingCount ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*(UINT32 *)Ptr !=3D 0) { > @@ -70,13 +72,15 @@ ValidateItsIdMappingCount ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidatePmcgIdMappingCount ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*(UINT32 *)Ptr > 1) { > @@ -91,13 +95,15 @@ ValidatePmcgIdMappingCount ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateItsIdArrayReference ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*(UINT32 *)Ptr !=3D 0) { > @@ -113,13 +119,15 @@ ValidateItsIdArrayReference ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidatePhysicalRange ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > UINT64 Value; > @@ -137,13 +145,15 @@ ValidatePhysicalRange ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateRmrMemDescCount ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*(UINT32 *)Ptr =3D=3D 0) { > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/Ma= dtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/Madt= Parser.c > index 41edcb9ffd..3633329bea 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParse= r.c > @@ -1,7 +1,7 @@ > /** @file > MADT table parser > =20 > - 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 > =20 > @@ -30,13 +30,15 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateGICDSystemVectorBase ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*(UINT32 *)Ptr !=3D 0) { > @@ -53,13 +55,15 @@ ValidateGICDSystemVectorBase ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateSpeOverflowInterrupt ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > UINT16 SpeOverflowInterrupt; > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/Pc= ctParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/Pcct= Parser.c > index 8ad39090af..5d350ae16d 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParse= r.c > @@ -1,7 +1,7 @@ > /** @file > PCCT table parser > =20 > - Copyright (c) 2021, Arm Limited. > + Copyright (c) 2023, Arm Limited. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > @@ -30,13 +30,15 @@ STATIC UINT8 *ExtendedPccSubspaceInterruptFlags; > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateRangeLength4 ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*(UINT32 *)Ptr < MIN_EXT_PCC_SUBSPACE_MEM_RANGE_LEN) { > @@ -56,13 +58,15 @@ ValidateRangeLength4 ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateRangeLength8 ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*(UINT64 *)Ptr <=3D MIN_MEMORY_RANGE_LENGTH) { > @@ -82,13 +86,15 @@ ValidateRangeLength8 ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidatePccMemoryIoGas ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > switch (*(UINT8 *)Ptr) { > @@ -109,13 +115,15 @@ ValidatePccMemoryIoGas ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidatePccGas ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > switch (*(UINT8 *)Ptr) { > @@ -137,13 +145,15 @@ ValidatePccGas ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidatePccDoorbellGas ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > // For responder subspaces this field is optional, if not present the= field > @@ -158,7 +168,7 @@ ValidatePccDoorbellGas ( > } > } > =20 > - ValidatePccGas (Ptr, Context); > + ValidatePccGas (Ptr, Context, Length); > } > =20 > /** > @@ -168,13 +178,15 @@ ValidatePccDoorbellGas ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidatePccIntAckGas ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > // If the subspace does not support interrupts or the interrupt is > @@ -196,7 +208,7 @@ ValidatePccIntAckGas ( > } > } > =20 > - ValidatePccGas (Ptr, Context); > + ValidatePccGas (Ptr, Context, Length); > } > =20 > /** > @@ -205,13 +217,15 @@ ValidatePccIntAckGas ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidatePccErrStatusGas ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > // This field is ignored by the OSPM on responder channels. > @@ -219,7 +233,7 @@ ValidatePccErrStatusGas ( > return; > } > =20 > - ValidatePccGas (Ptr, Context); > + ValidatePccGas (Ptr, Context, Length); > } > =20 > /** > @@ -228,13 +242,15 @@ ValidatePccErrStatusGas ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidatePlatInterrupt ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > // If a responder subspace is present in the PCCT, then the global Pl= atform > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/Pp= ttParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/Pptt= Parser.c > index 5377764458..a079d2498f 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParse= r.c > @@ -1,7 +1,7 @@ > /** @file > PPTT table parser > =20 > - Copyright (c) 2019 - 2021, ARM Limited. All rights reserved. > + Copyright (c) 2019 - 2023, ARM Limited. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > @@ -54,13 +54,15 @@ LogCacheFlagError ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateCacheFlags ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) > @@ -117,13 +119,15 @@ ValidateCacheFlags ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. th= is > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateCacheNumberOfSets ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > UINT32 NumberOfSets; > @@ -168,13 +172,15 @@ ValidateCacheNumberOfSets ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. th= is > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateCacheAssociativity ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > UINT8 Associativity; > @@ -194,13 +200,15 @@ ValidateCacheAssociativity ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateCacheLineSize ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) > @@ -239,13 +247,15 @@ ValidateCacheLineSize ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateCacheId ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > UINT32 CacheId; > @@ -278,13 +288,15 @@ ValidateCacheId ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateCacheAttributes ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > // Reference: Advanced Configuration and Power Interface (ACPI) Speci= fication > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/Rs= dpParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/Rsdp= Parser.c > index bddf276356..8d58392b08 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParse= r.c > @@ -1,7 +1,7 @@ > /** @file > RSDP table parser > =20 > - Copyright (c) 2016 - 2019, ARM Limited. All rights reserved. > + Copyright (c) 2016 - 2023, ARM Limited. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > @@ -21,13 +21,15 @@ STATIC CONST UINT64 *XsdtAddress; > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateRsdtAddress ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) > @@ -57,13 +59,15 @@ ValidateRsdtAddress ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateXsdtAddress ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/Sp= crParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/Spcr= Parser.c > index e5267b1d04..60522dd408 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParse= r.c > @@ -1,7 +1,7 @@ > /** @file > SPCR table parser > =20 > - Copyright (c) 2016 - 2019, ARM Limited. All rights reserved. > + Copyright (c) 2016 - 2023, ARM Limited. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > @@ -24,13 +24,15 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateInterruptType ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) > @@ -57,13 +59,15 @@ ValidateInterruptType ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateIrq ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > #if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/Sr= atParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/Srat= Parser.c > index 2980704479..76534ccee3 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParse= r.c > @@ -1,7 +1,7 @@ > /** @file > SRAT table parser > =20 > - Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. > + Copyright (c) 2016 - 2023, ARM Limited. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent > =20 > @par Reference(s): > @@ -27,13 +27,15 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateSratReserved ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > if (*(UINT32 *)Ptr !=3D 1) { > @@ -49,13 +51,15 @@ ValidateSratReserved ( > @param [in] Ptr Pointer to the start of the field data. > @param [in] Context Pointer to context specific information e.g. this > could be a pointer to the ACPI table header. > + @param [in] Length Length of the field. > **/ > STATIC > VOID > EFIAPI > ValidateSratDeviceHandleType ( > - IN UINT8 *Ptr, > - IN VOID *Context > + IN UINT8 *Ptr, > + IN VOID *Context, > + IN UINT32 Length > ) > { > UINT8 DeviceHandleType; -=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 (#112075): https://edk2.groups.io/g/devel/message/112075 Mute This Topic: https://groups.io/mt/101716935/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-