From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.4231.1665393686833861912 for ; Mon, 10 Oct 2022 02:21:26 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) 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 B283C1AED; Mon, 10 Oct 2022 02:21:32 -0700 (PDT) Received: from pierre123.arm.com (unknown [10.57.34.234]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BE4B53F792; Mon, 10 Oct 2022 02:21:25 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Alexei Fedorov Subject: [PATCH 09/14] DynamicTablesPkg: Fix Ssdt PCI generation comments Date: Mon, 10 Oct 2022 11:20:53 +0200 Message-Id: <20221010092058.118714-10-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221010092058.118714-1-Pierre.Gondois@arm.com> References: <20221010092058.118714-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Pierre Gondois The second model of the _PRT object is used. Indeed: - the interrupts described are not re-configurable - OSes are aware of the polarity of PCI legacy interrupts, so there is no need to accurately describe the polarity. Also, fix a comment for the CM_ARM_PCI_INTERRUPT_MAP_INFO obj. Signed-off-by: Pierre Gondois --- DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 2 +- .../Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTabl= esPkg/Include/ArmNameSpaceObjects.h index cd39e609d6c4..d711f3ec5938 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -1014,7 +1014,7 @@ typedef struct CmArmPciInterruptMapInfo { /// Value on 8 bits (max 255). UINT8 PciBus; =20 - /// Pci Bus. + /// Pci Device. /// Value on 5 bits (max 31). UINT8 PciDevice; =20 diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPci= eGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtP= cieGenerator.c index 85098752c614..c54ae6f551f6 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenera= tor.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenera= tor.c @@ -288,12 +288,6 @@ GeneratePciDeviceInfo ( =20 Cf. ACPI 6.4 specification, s6.2.13 "_PRT (PCI Routing Table)" =20 - The first model (defining a _CRS object) is used. This is necessary be= cause - PCI legacy interrupts are active low and GICv2 SPI interrupts are acti= ve - high. - Even though PCI interrupts cannot be re-routed, only the first model a= llows - to specify the activation state (low/high). - @param [in] Generator The SSDT Pci generator. @param [in] CfgMgrProtocol Pointer to the Configuration Manager Protocol interface. @@ -397,6 +391,8 @@ GeneratePrt ( High word-Device #, Low word-Function #. (for example, device 3, function 2 is 0x00030002). To refer to all the functions on a dev= ice #, use a function number of FFFF). + + Use the second model for _PRT object and describe a hardwired inte= rrupt. */ Status =3D AmlAddPrtEntry ( (IrqMapInfo->PciDevice << 16) | 0xFFFF, --=20 2.25.1