From patchwork Fri Apr 28 06:04:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 756230 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wDjw02Vc1z9s8c for ; Fri, 28 Apr 2017 16:05:04 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3wDjw01dVSzDqC6 for ; Fri, 28 Apr 2017 16:05:04 +1000 (AEST) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Received: from ozlabs.ru (ozlabs.ru [107.173.13.209]) by lists.ozlabs.org (Postfix) with ESMTP id 3wDjvt5dSdzDq7Z for ; Fri, 28 Apr 2017 16:04:58 +1000 (AEST) Received: from vpl2.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 4136D3A600FE; Fri, 28 Apr 2017 02:04:45 -0400 (EDT) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Fri, 28 Apr 2017 16:04:24 +1000 Message-Id: <20170428060424.18631-1-aik@ozlabs.ru> X-Mailer: git-send-email 2.11.0 Subject: [SLOF] [PATCH slof] pci: Fix assigned-addresses for 64bit nonprefetchable BAR X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" 975b31f80aff "pci: Put non-prefetchable 64bit BARs into 32bit MMIO window" moved 64bit non-prefetchable BARs into 32bit non-prefetchable window of a bridge. However the resource would still be advertised as 64bit in the "assigned-addresses" property so fix the resource type. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Thomas Huth --- slof/fs/pci-properties.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slof/fs/pci-properties.fs b/slof/fs/pci-properties.fs index 8594e5d..d446473 100644 --- a/slof/fs/pci-properties.fs +++ b/slof/fs/pci-properties.fs @@ -257,7 +257,7 @@ >r dup rtas-config-l@ \ | save size and fetch lower 32 bits ( paddr plen baddr val.lo R: size) over 4 + rtas-config-l@ \ | fetch upper 32 bits ( paddr plen baddr val.lo val.hi R: size) 20 lshift + -10 and >r \ | calc 64 bit value and save it ( paddr plen baddr R: size val ) - 83000000 or encode-int+ \ | Encode config addr ( paddr plen R: size val ) + 82000000 or encode-int+ \ | Encode config addr ( paddr plen R: size val ) r> encode-64+ \ | Encode assigned addr ( paddr plen R: size ) r> encode-64+ \ | Encode size ( paddr plen ) ELSE \ ELSE