From patchwork Fri Jul 21 07:35:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 791942 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 3xDMxw21xJz9t0F for ; Fri, 21 Jul 2017 17:35:48 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xDMxw0k4qzDqtM for ; Fri, 21 Jul 2017 17:35:48 +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 3xDMxr1WBtzDqrw for ; Fri, 21 Jul 2017 17:35:44 +1000 (AEST) Received: from vpl2.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 1BAE23A60085; Fri, 21 Jul 2017 03:36:34 -0400 (EDT) From: Alexey Kardashevskiy To: slof@lists.ozlabs.org Date: Fri, 21 Jul 2017 17:35:36 +1000 Message-Id: <20170721073537.16095-3-aik@ozlabs.ru> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170721073537.16095-1-aik@ozlabs.ru> References: <20170721073537.16095-1-aik@ozlabs.ru> Subject: [SLOF] [PATCH slof 2/3] pci-scan: Fix handling of 32bit windows 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: , Cc: Thomas Huth MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" From: Thomas Huth This zeroes bottom 4 bits of the prefetchable memory limit and prefetchable memory base registers for 32bit windows (the first hunk). This simplifies updating of the prefetchable memory limit (the second hunk). Signed-off-by: Thomas Huth [aik: moved to a separate patch] Signed-off-by: Alexey Kardashevskiy --- slof/fs/pci-scan.fs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/slof/fs/pci-scan.fs b/slof/fs/pci-scan.fs index 7bc6b98..d8f7c02 100644 --- a/slof/fs/pci-scan.fs +++ b/slof/fs/pci-scan.fs @@ -146,7 +146,8 @@ here 100 allot CONSTANT pci-device-vec ELSE pci-next-mem-align-1mb 10 rshift \ | keep upper 16 bits - pci-max-mem @ 1- FFFF0000 and or \ | and Insert mmem Limit (set it to max) + FFF0 and + pci-max-mem @ 1- FFF00000 and or \ | and Insert mmem Limit (set it to max) swap 24 + rtas-config-l! \ | and write it into the bridge THEN ; @@ -173,10 +174,8 @@ here 100 allot CONSTANT pci-device-vec \ Update current variable (add space for hot-plugging and align it) pci-next-mem-extend-1mb 1- \ | make limit one less than boundary - FFFF0000 and \ | keep upper 16 bits - over 24 + rtas-config-l@ - 0000FFFF and \ | fetch original Value - or swap 24 + rtas-config-l! \ | and write it into the bridge + 10 rshift \ | keep upper 16 bits + swap 26 + rtas-config-w! THEN ;