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 568A37803D8 for ; Tue, 9 Jan 2024 08:22:24 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Lp9bShEmWR16wujvEbTJJarVARdikwSQBL9vqODwkqk=; 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=1704788543; v=1; b=Gwhs8DfxOW5Bkp4d4cnJvLZxHyxJZF/wSydD39hiNd3Fy9C7vi9jsqRNvLYFhM6iPbdVwGC9 DtUFQ2SyWSv2NKQSJ7AWmTD4pSXJoxDLkP2d/WyY0EtSV52kTubm0TpDKF2fhj0yJmkeHP8cpc1 S5G5LpP1XHZ/KPlbozIGOHUw= X-Received: by 127.0.0.2 with SMTP id WNT6YY7687511xVA8cW7J7M0; Tue, 09 Jan 2024 00:22:23 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.12334.1704788542290031394 for ; Tue, 09 Jan 2024 00:22:22 -0800 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 03D37C15; Tue, 9 Jan 2024 00:23:07 -0800 (PST) X-Received: from [10.34.100.129] (e126645.nice.arm.com [10.34.100.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 169133F5A1; Tue, 9 Jan 2024 00:22:19 -0800 (PST) Message-ID: Date: Tue, 9 Jan 2024 09:22:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH] DynamicTablesPkg/SSDT: Remove incorrect root node check To: Jeshua Smith , devel@edk2.groups.io Cc: ardb+tianocore@kernel.org, quic_llindhol@quicinc.com, Sami.Mujawar@arm.com, sdonthineni@nvidia.com, vsethi@nvidia.com, Ashish Singhal References: 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: DN26q9tKHVzuyEpvfVJl8b3Yx7686176AA= 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=Gwhs8Dfx; 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 Jeshua, On 1/8/24 19:12, Jeshua Smith wrote: > The code was incorrectly assuming that root nodes had to be physical > package nodes and vice versa. This is not always true, so the check > is being removed. Does it mean that you have a topology where the top-level node is not a physical package ? If yes, does it also mean that multiple physical packages share a resource (which belong to the top-level node) ? It is correct that the check is a bit stronger than what the specification states, but it was handling all topologies so far, so would it be possible to describe the topology that you have ? Regards, Pierre >=20 > Signed-off-by: Jeshua Smith > Tested-by: Ashish Singhal > Reviewed-by: Ashish Singhal > --- > .../SsdtCpuTopologyGenerator.c | 23 ++++--------------- > 1 file changed, 5 insertions(+), 18 deletions(-) >=20 > diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/= SsdtCpuTopologyGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuT= opologyLibArm/SsdtCpuTopologyGenerator.c > index 724f33c660..4ad9508f57 100644 > --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpu= TopologyGenerator.c > +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCpuTopologyLibArm/SsdtCpu= TopologyGenerator.c > @@ -983,7 +983,6 @@ CreateAmlProcessorContainer ( > @param [in] NodeFlags Flags of the ProcNode to check. > @param [in] IsLeaf The ProcNode is a leaf. > @param [in] NodeToken NodeToken of the ProcNode. > - @param [in] ParentNodeToken Parent NodeToken of the ProcNode. > =20 > @retval EFI_SUCCESS Success. > @retval EFI_INVALID_PARAMETER Invalid parameter. > @@ -994,26 +993,16 @@ EFIAPI > CheckProcNode ( > UINT32 NodeFlags, > BOOLEAN IsLeaf, > - CM_OBJECT_TOKEN NodeToken, > - CM_OBJECT_TOKEN ParentNodeToken > + CM_OBJECT_TOKEN NodeToken > ) > { > BOOLEAN InvalidFlags; > - BOOLEAN HasPhysicalPackageBit; > - BOOLEAN IsTopLevelNode; > - > - HasPhysicalPackageBit =3D (NodeFlags & EFI_ACPI_6_3_PPTT_PACKAGE_PHYSI= CAL) =3D=3D > - EFI_ACPI_6_3_PPTT_PACKAGE_PHYSICAL; > - IsTopLevelNode =3D (ParentNodeToken =3D=3D CM_NULL_TOKEN); > - > - // A top-level node is a Physical Package and conversely. > - InvalidFlags =3D HasPhysicalPackageBit ^ IsTopLevelNode; > =20 > // Check Leaf specific flags. > if (IsLeaf) { > - InvalidFlags |=3D ((NodeFlags & PPTT_LEAF_MASK) !=3D PPTT_LEAF_MASK)= ; > + InvalidFlags =3D ((NodeFlags & PPTT_LEAF_MASK) !=3D PPTT_LEAF_MASK); > } else { > - InvalidFlags |=3D ((NodeFlags & PPTT_LEAF_MASK) !=3D 0); > + InvalidFlags =3D ((NodeFlags & PPTT_LEAF_MASK) !=3D 0); > } > =20 > if (InvalidFlags) { > @@ -1086,8 +1075,7 @@ CreateAmlCpuTopologyTree ( > Status =3D CheckProcNode ( > Generator->ProcNodeList[Index].Flags, > TRUE, > - Generator->ProcNodeList[Index].Token, > - NodeToken > + Generator->ProcNodeList[Index].Token > ); > if (EFI_ERROR (Status)) { > ASSERT (0); > @@ -1119,8 +1107,7 @@ CreateAmlCpuTopologyTree ( > Status =3D CheckProcNode ( > Generator->ProcNodeList[Index].Flags, > FALSE, > - Generator->ProcNodeList[Index].Token, > - NodeToken > + Generator->ProcNodeList[Index].Token > ); > if (EFI_ERROR (Status)) { > ASSERT (0); -=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 (#113429): https://edk2.groups.io/g/devel/message/113429 Mute This Topic: https://groups.io/mt/103603398/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-