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 1E301740038 for ; Tue, 12 Sep 2023 19:32:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=2dQm0plNGjMC3ZZ4ynXyEcPZbFBxYizb51jSI9utsu4=; c=relaxed/simple; d=groups.io; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1694547132; v=1; b=PVaQNNK4z13T9g6sJ0RqXV8SfmTZT83VU9e+NqZPrLHIbEp/I6xSwwBVCoDhlBjjmYksuDuA uOUrn3GW97ZJM4efYV9Xmljrx2QgZgUyXZoY1JWln8P2hhur0YQBTvYNBfoBpf7n4fbo2EhRBCX 9bxgOt6fKpk0w33nzbnlGpt4= X-Received: by 127.0.0.2 with SMTP id ftGyYY7687511xGFxcakpXP0; Tue, 12 Sep 2023 12:32:12 -0700 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web11.4202.1694547132317955091 for ; Tue, 12 Sep 2023 12:32:12 -0700 X-Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38CJUlmH011019; Tue, 12 Sep 2023 19:32:09 GMT X-Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t268fkmjy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 19:32:08 +0000 X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38CJW8sN021113 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Sep 2023 19:32:08 GMT X-Received: from qc-i7.hemma.eciton.net (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Tue, 12 Sep 2023 12:32:05 -0700 Date: Tue, 12 Sep 2023 20:32:02 +0100 From: "Leif Lindholm" To: Pierre Gondois CC: Jeff Brasen , , , , Vidya Sagar , Shanker Donthineni Subject: Re: [edk2-devel] [PATCH 1/2] DynamicTablesPkg: AML Code generation for I/O ranges Message-ID: References: <64a84c1fedd66114f46ddd5d47ff922d68169d4c.1694475927.git.jbrasen@nvidia.com> MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-GUID: 9q3P9j2ZeVzGpVNltbDTqU4Lel7_v_MC X-Proofpoint-ORIG-GUID: 9q3P9j2ZeVzGpVNltbDTqU4Lel7_v_MC 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,quic_llindhol@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: DnV4izbRHGiXJ6ok4fBjK0R4x7686176AA= Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=PVaQNNK4; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=quicinc.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 On Tue, Sep 12, 2023 at 11:55:18 +0200, Pierre Gondois wrote: > Hello Leif, > > On 9/12/23 11:35, Leif Lindholm wrote: > > > diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h b/DynamicTablesPkg/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 > > > ); > > > +/** Code generation for the "QWordIO ()" ASL function. > > > + > > > + The Resource Data effectively created is a QWord Address Space Resource > > > + 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 statement > > > + 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 > > > > 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. > > > > I think someone should rewrite this as an enum and get rid of the > > magic values in the callers. > > > > An additional antipattern is that because the doxygen stanza becomes > > exessively bulky, it leaves out actually documenting the parameter at > > all. > > > > 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, Thanks, I appreciate that. Best Regards, Leif -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108553): https://edk2.groups.io/g/devel/message/108553 Mute This Topic: https://groups.io/mt/101305535/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-