From patchwork Sat Apr 8 17:14:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 97051 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp744174qgd; Sat, 8 Apr 2017 10:15:15 -0700 (PDT) X-Received: by 10.200.54.13 with SMTP id m13mr44632221qtb.214.1491671715056; Sat, 08 Apr 2017 10:15:15 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id d13si8806914qkj.119.2017.04.08.10.15.14; Sat, 08 Apr 2017 10:15:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id BF9EF62C8F; Sat, 8 Apr 2017 17:15:10 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id AB60861C8F; Sat, 8 Apr 2017 17:15:08 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0D868607A9; Sat, 8 Apr 2017 17:15:07 +0000 (UTC) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by lists.linaro.org (Postfix) with ESMTPS id CBDFB606A0 for ; Sat, 8 Apr 2017 17:15:04 +0000 (UTC) Received: by mail-wm0-f49.google.com with SMTP id u2so11420714wmu.0 for ; Sat, 08 Apr 2017 10:15:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aAPf4QGKQ414Sk1O4AyHO0aFYlfB4JnI4S6+pfD4d7o=; b=BlB9+utjeqPbxtSQnHI6ahfN82qIo4i+nkpZkpFlaV17AfBcfyeMjJxAFRQjy7rqXm ceymlPwi4cEedgJJg3YJEYzHbPfoKQQha0vXsPPiRAsg85F5eIIg6ZxoYBRj+ORV/d08 FidkKXXZd9proB6vFVRZvPD/KrLVbPoRpMUD8KFmZeGAa5Z5+W1b1GAYP2vRMZdHV/MN t0298m4NWB/iYkQn6OQnIxJsTbAnooTKftto27BiGWevI2pY17s2ljE2Ix6hrxg1nbl/ wgoIKgjtr/TU9HX90RG6GyHWEW3jdTE0KpJP4d6l8iYO4LIW0VtMoHGIMYyni/UbI+zM B92w== X-Gm-Message-State: AN3rC/4NPW9JdKaZoZqhcotZG4eUzvUgRCRYmKj3RdqwNfeL5RjunvcFMZQ+Qjwzsilw0eDEFls= X-Received: by 10.28.152.70 with SMTP id a67mr3869996wme.89.1491671703857; Sat, 08 Apr 2017 10:15:03 -0700 (PDT) Received: from localhost.localdomain ([196.81.139.226]) by smtp.gmail.com with ESMTPSA id n13sm3369155wmi.28.2017.04.08.10.15.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Apr 2017 10:15:03 -0700 (PDT) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org Date: Sat, 8 Apr 2017 18:14:52 +0100 Message-Id: <20170408171453.13450-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170408171453.13450-1-ard.biesheuvel@linaro.org> References: <20170408171453.13450-1-ard.biesheuvel@linaro.org> Cc: alan@softiron.co.uk, lorenzo.pieralisi@arm.com Subject: [Linaro-uefi] [PATCH v2 1/2] Platforms/AMD: correct legacy PCI interrupt routing in DSDT X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" The _PRT method in the PCI0 object describes something that resembles the legacy interrupt routing of the first slot only, but applies it to all PCI-PCI bridges, which means the wrong interrupt is reported for devices in slots 2 and 3. Since most devices support MSI, this is not actually a big deal, but it would be nice to fix this nonetheless. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Graeme Gregory --- Platforms/AMD/Styx/AcpiTables/Dsdt.asl | 63 +++++++++++--------- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/Platforms/AMD/Styx/AcpiTables/Dsdt.asl b/Platforms/AMD/Styx/AcpiTables/Dsdt.asl index 3bfa26acea07..4741bb487cc7 100644 --- a/Platforms/AMD/Styx/AcpiTables/Dsdt.asl +++ b/Platforms/AMD/Styx/AcpiTables/Dsdt.asl @@ -508,40 +508,45 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "AMDINC", "SEATTLE ", 3) Name (_SEG, 0x00) // _SEG: PCI Segment Name (_BBN, 0x00) // _BBN: BIOS Bus Number Name (_CCA, 0x01) // _CCA: Cache Coherency Attribute - Name (_PRT, Package (0x04) // _PRT: PCI Routing Table + Name (_PRT, Package () // _PRT: PCI Routing Table { - Package (0x04) - { - 0xFFFF, - 0x00, - 0x00, - 0x0140 - }, + // INTA of the bridge device itself + Package () { 0x2FFFF, 0x0, 0x0, 0x140 } + }) - Package (0x04) + Device (EXP1) + { + Name (_ADR, 0x20001) // _ADR: Address + Name (_PRT, Package () // _PRT: PCI Routing Table { - 0xFFFF, - 0x01, - 0x00, - 0x0141 - }, - - Package (0x04) + Package () { 0xFFFF, 0x0, 0x0, 0x140 }, + Package () { 0xFFFF, 0x1, 0x0, 0x141 }, + Package () { 0xFFFF, 0x2, 0x0, 0x142 }, + Package () { 0xFFFF, 0x3, 0x0, 0x143 } + }) // _PRT + } + Device (EXP2) + { + Name (_ADR, 0x20002) // _ADR: Address + Name (_PRT, Package () // _PRT: PCI Routing Table { - 0xFFFF, - 0x02, - 0x00, - 0x0142 - }, - - Package (0x04) + Package () { 0xFFFF, 0x0, 0x0, 0x144 }, + Package () { 0xFFFF, 0x1, 0x0, 0x145 }, + Package () { 0xFFFF, 0x2, 0x0, 0x146 }, + Package () { 0xFFFF, 0x3, 0x0, 0x147 } + }) // _PRT + } + Device (EXP3) + { + Name (_ADR, 0x20003) // _ADR: Address + Name (_PRT, Package () // _PRT: PCI Routing Table { - 0xFFFF, - 0x03, - 0x00, - 0x0143 - } - }) // _PRT + Package () { 0xFFFF, 0x0, 0x0, 0x148 }, + Package () { 0xFFFF, 0x1, 0x0, 0x149 }, + Package () { 0xFFFF, 0x2, 0x0, 0x14A }, + Package () { 0xFFFF, 0x3, 0x0, 0x14B } + }) // _PRT + } Method (_CRS, 0, Serialized) // _CRS: Current Resource Settings { From patchwork Sat Apr 8 17:14:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 97053 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp744176qgd; Sat, 8 Apr 2017 10:15:15 -0700 (PDT) X-Received: by 10.55.150.1 with SMTP id y1mr41128934qkd.311.1491671715178; Sat, 08 Apr 2017 10:15:15 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 14si8803002qtp.215.2017.04.08.10.15.14; Sat, 08 Apr 2017 10:15:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 44B6562CC5; Sat, 8 Apr 2017 17:15:13 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 31F7462CAE; Sat, 8 Apr 2017 17:15:11 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 530A462C8B; Sat, 8 Apr 2017 17:15:09 +0000 (UTC) Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) by lists.linaro.org (Postfix) with ESMTPS id 1E1F4606A0 for ; Sat, 8 Apr 2017 17:15:07 +0000 (UTC) Received: by mail-wr0-f169.google.com with SMTP id t20so125911115wra.1 for ; Sat, 08 Apr 2017 10:15:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VYZV4glYwb2y4/mfCjG3SLuUq/ISD5kjWCg10F2hO2E=; b=IQ+8XSt4HI5FqCZqpPJSqI0kNKnKclyZPKmajbF6CMXU35aWL0c7wBIB1V+FFslk5c EgJB4C/bNo2oECVMtF97WuTvrUGLj5v6i4378pUyf542y8tEp3H6yuGSvYqjghRjj34I cWdqZ3TUvww0NqrPYh4LSl7pLT6pTWfvvUucWKFbGjMwNBiwIoakG//MNkavHx6E+kLI qPCQGa3L2rbJ/NMznkx7YGP0zdVefUkkE2bHC9qi5WFozOdqRzPbR+oJ3VjIdWDRI3tN 0dIbHk42aFkPNXhdNy0LfKp5D+ODVw7vFItosjjOyd+DHl7SBx/Hz7t9AnIzs5x8pH3d R6Dw== X-Gm-Message-State: AFeK/H01sp14SsAos2W/4F/RioNLj3c0c/xvkAb90rS2eUewJNFFElUWvJmsIvT0LPyEC6p7vNE= X-Received: by 10.223.164.2 with SMTP id d2mr37789347wra.47.1491671706150; Sat, 08 Apr 2017 10:15:06 -0700 (PDT) Received: from localhost.localdomain ([196.81.139.226]) by smtp.gmail.com with ESMTPSA id n13sm3369155wmi.28.2017.04.08.10.15.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Apr 2017 10:15:05 -0700 (PDT) From: Ard Biesheuvel To: linaro-uefi@lists.linaro.org Date: Sat, 8 Apr 2017 18:14:53 +0100 Message-Id: <20170408171453.13450-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170408171453.13450-1-ard.biesheuvel@linaro.org> References: <20170408171453.13450-1-ard.biesheuvel@linaro.org> Cc: alan@softiron.co.uk, lorenzo.pieralisi@arm.com Subject: [Linaro-uefi] [PATCH v2 2/2] Platforms/AMD: correct legacy PCI interrupt routing in DTS X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" The interrupt map in the PCIe node describes something that resembles the legacy interrupt routing of the first slot only, but applies it to all PCI-PCI bridges, which means the wrong interrupt is reported for devices in slots 2 and 3. Since most devices support MSI, this is not actually a big deal, but it would be nice to fix this nonetheless. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- Platforms/AMD/Styx/OverdriveBoard/FdtBlob/styx-overdrive.dtb | Bin 7973 -> 8123 bytes Platforms/AMD/Styx/OverdriveBoard/FdtBlob/styx-overdrive.dts | 20 +++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Platforms/AMD/Styx/OverdriveBoard/FdtBlob/styx-overdrive.dtb b/Platforms/AMD/Styx/OverdriveBoard/FdtBlob/styx-overdrive.dtb index ba4de560d279d79fde086c6e3f79626bd17a108f..8b538d72a243244cbf0895cc7094a605a1403338 100644 GIT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1b)~&3~NgG2bj@BWNh`?PCg4$ z+Adu8vt~?tKwvayt16)aRCn2$C&V*e>NJ(6%UR^XeQ5u7#lP>`rdt+kNOD zBI8YSFJp!t#*FnWt;4(Kew2wQ1MO?!v#!{3Qt19@laQltIzjuE8wp*cC z(-q@&GMON!t-U3D<3j4WPXCji8=v2o-Xiz>fMH zU@654h^Pkx&PyePoX&y+xTDb_mX4IHP0)r`x*zJ5Scfe6c0s?>$#21gvr$Ap3=OWM z|0P3d0cBV$+z;agt<@u$8Z=npv|?cJ{(~XZr0c>b#AuY&$Y>X}(q9!v+3l`=gAxrd zbwJ(=7b5Yfcz$Uej-KKR+UVy`7@~Q2RCrKiANecu=veCMxWEur%1q}+GU?W4md$y7s871xojtvT7!+L5}vX*d4`{O1_> diff --git a/Platforms/AMD/Styx/OverdriveBoard/FdtBlob/styx-overdrive.dts b/Platforms/AMD/Styx/OverdriveBoard/FdtBlob/styx-overdrive.dts index 36474a26c9c6..b462910b3bf0 100644 --- a/Platforms/AMD/Styx/OverdriveBoard/FdtBlob/styx-overdrive.dts +++ b/Platforms/AMD/Styx/OverdriveBoard/FdtBlob/styx-overdrive.dts @@ -261,11 +261,21 @@ bus-range = <0x0 0x7f>; msi-parent = <0x4>; reg = <0x0 0xf0000000 0x0 0x10000000>; - interrupt-map-mask = <0xf800 0x0 0x0 0x7>; - interrupt-map = <0x1000 0x0 0x0 0x1 0x1 0x0 0x0 0x0 0x120 0x1>, - <0x1000 0x0 0x0 0x2 0x1 0x0 0x0 0x0 0x121 0x1>, - <0x1000 0x0 0x0 0x3 0x1 0x0 0x0 0x0 0x122 0x1>, - <0x1000 0x0 0x0 0x4 0x1 0x0 0x0 0x0 0x123 0x1>; + interrupt-map-mask = <0xff00 0x0 0x0 0x7>; + interrupt-map = <0x1100 0x0 0x0 0x1 0x1 0x0 0x0 0x0 0x120 0x1>, + <0x1100 0x0 0x0 0x2 0x1 0x0 0x0 0x0 0x121 0x1>, + <0x1100 0x0 0x0 0x3 0x1 0x0 0x0 0x0 0x122 0x1>, + <0x1100 0x0 0x0 0x4 0x1 0x0 0x0 0x0 0x123 0x1>, + + <0x1200 0x0 0x0 0x1 0x1 0x0 0x0 0x0 0x124 0x1>, + <0x1200 0x0 0x0 0x2 0x1 0x0 0x0 0x0 0x125 0x1>, + <0x1200 0x0 0x0 0x3 0x1 0x0 0x0 0x0 0x126 0x1>, + <0x1200 0x0 0x0 0x4 0x1 0x0 0x0 0x0 0x127 0x1>, + + <0x1300 0x0 0x0 0x1 0x1 0x0 0x0 0x0 0x128 0x1>, + <0x1300 0x0 0x0 0x2 0x1 0x0 0x0 0x0 0x129 0x1>, + <0x1300 0x0 0x0 0x3 0x1 0x0 0x0 0x0 0x12a 0x1>, + <0x1300 0x0 0x0 0x4 0x1 0x0 0x0 0x0 0x12b 0x1>; dma-coherent; dma-ranges = <0x43000000 0x0 0x0 0x0 0x0 0x100 0x0>; ranges = <0x1000000 0x0 0x00000000 0x0 0xefff0000 0x00 0x00010000>, /* I/O Memory (size=64K) */