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 100CE7803E7 for ; Tue, 12 Sep 2023 09:55:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=1CdR7RhNNueWZ9peczlzj/xQRz5WlB7rvHHRKnUmGKs=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To: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=1694512525; v=1; b=w6l75fRp1IQxxuYSD74JzZW3awCAxkls9CD9YZo/Ba0qUlUlsBGVsNM7THn8Ux5jUOwzoFLc cYVFhWXAu6KzO3kvopQcuAlz6iVZoeuWRuOIMLJcZr4/kb3auW/d7JfOHHm08UVX+lJrg1QC27/ mUUmJ3tHziERYr48U1qf1Z4w= X-Received: by 127.0.0.2 with SMTP id BFT6YY7687511xK7xO0X32PO; Tue, 12 Sep 2023 02:55:25 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.21211.1694512524285310405 for ; Tue, 12 Sep 2023 02:55:24 -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 CA947C15; Tue, 12 Sep 2023 02:56:00 -0700 (PDT) X-Received: from [10.34.100.121] (e126645.nice.arm.com [10.34.100.121]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A2E6D3F738; Tue, 12 Sep 2023 02:55:22 -0700 (PDT) Message-ID: Date: Tue, 12 Sep 2023 11:55:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [edk2-devel] [PATCH 1/2] DynamicTablesPkg: AML Code generation for I/O ranges To: Leif Lindholm , Jeff Brasen Cc: devel@edk2.groups.io, ardb+tianocore@kernel.org, Sami.Mujawar@arm.com, Vidya Sagar , Shanker Donthineni References: <64a84c1fedd66114f46ddd5d47ff922d68169d4c.1694475927.git.jbrasen@nvidia.com> From: "PierreGondois" In-Reply-To: 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,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: s14oydwKxcMzK3LAU02xWQwTx7686176AA= 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=w6l75fRp; 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 Hello Leif, On 9/12/23 11:35, Leif Lindholm wrote: > Hi Jeff, >=20 > On Mon, Sep 11, 2023 at 23:48:57 +0000, Jeff Brasen wrote: >> From: Vidya Sagar >> >> Add helper functions to generate AML Resource Data describing I/O >> ranges of four words long. API AmlCodeGenRdQWordIo () is exposed. >> >> Reviewed-by: Shanker Donthineni >=20 > The above isn't really applicable to upstream. > Although I feel less strongly about that than >=20 >> Signed-off-by: Vidya Sagar >=20 > The DCO is a statement that you have performed basic legal due > diligence on the provenance of the change. I'm uncomfortable with > people making such statements on behalf of others. >=20 > If this is being upstreamed from a downstream repository, such that > the review trail is available there, then both of these could be fine. > But I think it would be useful to include a link to the patch in that > repository in the commit message in that case. >=20 > One technical, but not necessarily for this set (it just made me spot > it), note below. >=20 >> Signed-off-by: Jeff Brasen >> --- >> .../Include/Library/AmlLib/AmlLib.h | 67 ++++++++++++++ >> .../AmlLib/CodeGen/AmlResourceDataCodeGen.c | 90 +++++++++++++++++++ >> 2 files changed, 157 insertions(+) >> >> diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h b/DynamicT= ablesPkg/Include/Library/AmlLib/AmlLib.h >> index 9210c5091548..8e24cecdd77b 100644 >> --- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h >> +++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h >> @@ -683,6 +683,73 @@ AmlCodeGenRdWordBusNumber ( >> OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL >> ); >> =20 >> +/** Code generation for the "QWordIO ()" ASL function. >> + >> + The Resource Data effectively created is a QWord Address Space Resour= ce >> + Data. Cf ACPI 6.4: >> + - s6.4.3.5.1 "QWord Address Space Descriptor". >> + - s19.6.109 "QWordIO". >> + >> + The created resource data node can be: >> + - appended to the list of resource data elements of the NameOpNode. >> + In such case NameOpNode must be defined by a the "Name ()" ASL sta= tement >> + and initially contain a "ResourceTemplate ()". >> + - returned through the NewRdNode parameter. >> + >> + See ACPI 6.4 spec, s19.6.109 for more. >> + >> + @param [in] IsResourceConsumer ResourceUsage parameter. >> + @param [in] IsMinFixed Minimum address is fixed. >> + @param [in] IsMaxFixed Maximum address is fixed. >> + @param [in] IsPosDecode Decode parameter >> + @param [in] IsaRanges Possible values are: >> + 0-Reserved >> + 1-NonISAOnly >> + 2-ISAOnly >> + 3-EntireRange >=20 > This is an existing antipattern which this patch (rightly) adheres to > when adding an additional variant of an existing API. But this also > pushes the count to three functions in the same file where we're doing > enum-but-in-doxygen and then keep magic values in the code. >=20 > I think someone should rewrite this as an enum and get rid of the > magic values in the callers. >=20 > An additional antipattern is that because the doxygen stanza becomes > exessively bulky, it leaves out actually documenting the parameter at > all. >=20 > But as I said, that's not the fault of this set, and does not need to > be fixed by it. Ok yes, I'll make the modifications where required, Thanks for the review, Regards, Pierre -=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 (#108525): https://edk2.groups.io/g/devel/message/108525 Mute This Topic: https://groups.io/mt/101305535/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-