From patchwork Fri Nov 10 14:21:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 118555 Delivered-To: patch@linaro.org Received: by 10.80.225.132 with SMTP id k4csp2259441edl; Fri, 10 Nov 2017 06:23:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMYM96sTOJevr2f8cSsWXt/nZoOriN+P7lsEBvq5v0dav55wec00YgnYq5t82KINW40o1C43 X-Received: by 10.159.216.140 with SMTP id s12mr555603plp.318.1510323815518; Fri, 10 Nov 2017 06:23:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510323815; cv=none; d=google.com; s=arc-20160816; b=Gn1RIGinVHFWrGA4lMSmEdAN/6FoUWFBKi+1tdgX8nuNx7v7GQlzYQcgQp+ilzOe3f s+fUR0hNodab7XguvRy2glU5w18Inogmq8Sx5xuPXLTAwM4CaZ9psDJMkYSMBXhpAVEL JiDMgE2khOKf9aCJx/fZ8TdZAIk64aPdM0uyAUIc/WumVh/e1RiOhXc6m0Z9j7rN6cA5 BarSTwt/advv1wHNxMWYX8Vi84Z/n9BEu0GyFPe6EMgkenhtJDtvqwFjWtuE8loNKtM0 nhsfexwwAES8cZck2YUaAXlFqCM1L/hcdNEZwPYCsMFMJY8b/XYtn4H5yFStJmplkOKG IuiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=IxSthMBTB9dqkYGIlt29hXhnSOsk9JT02z2J3LtOXSA=; b=zsVg7lCPF6x+U1lGJkxNGbckm0LF7NyW+hmDg3AZG5rFzUk1CavB8W12l7S/S4S/57 cxRmk2/L0p3sCXGzGQaSBdl2CdBujsxT0q91yFabRvAd7dhe9mv8TT+S4hDCoBJCiQBj mJm2KmC94HpnN/jHK0U2o4DavRrt7gXaoLnXh/CHoBuoELvCPpk306zBpGZb3qztkV3v fREJe1iAVp62kDWSvrAotfWZ4wCFy7j3+eYeeBHpYAVDPlb6ba/F+Bbh0sV4i/cSHvPr ffEyKGpyEZZLQbZYcCr+pHUYuBkxO7t+dbj7llZURiNtnny5gwTqqtfcJJbXcEdJC/3/ Vz2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XL4pv01Q; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id 198si8615123pgd.292.2017.11.10.06.23.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Nov 2017 06:23:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XL4pv01Q; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3C71E2035522C; Fri, 10 Nov 2017 06:18:42 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::241; helo=mail-wr0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9CDD82035521F for ; Fri, 10 Nov 2017 06:18:40 -0800 (PST) Received: by mail-wr0-x241.google.com with SMTP id y9so8758086wrb.2 for ; Fri, 10 Nov 2017 06:22:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=its2kpmC9jMrjP++ef6qSkrsn5mU0zjDLrsOXXhd76s=; b=XL4pv01QhoAWCXvESwNLC2KnGUaPrYWqeCFZ0QBhA6DppcMDzw7Z8HzcKOGuH4YbX4 1F6eyJpqcfpEEmsqv2Dszw5Xkb0lqxsFZb/tO5vGgwkn2ss62g5h5Iw2BFQv9KwHME+C pjYT7gesSFDsjMfdsMvNiei6C9ju53Sgu4/Yk= 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=its2kpmC9jMrjP++ef6qSkrsn5mU0zjDLrsOXXhd76s=; b=nGK/xNsqH3yxnSSuj9Znd50WuN45C7dKYbwuhvo2ziFwsjb0HBQuKFsBg8YGHhUYkA JEKBpuG9DsQqYvJAQGKEOjgnhZ6J3KsFwtUhwFBGlHoaVLwZzt2md/8qEQMzK4UPIOOH SWb1TFRSX/0d+wojeO9bLuMzWao0k5D6jEYqk1gkMuJVBpRL3AGWXIZUifpwygN+ffVv Kutj1l32jlC7h/+QXiwAEjWsg/ZDwpo31eQrqRgHpiwYmtjNJyxcKq7Ezfzm1v6Wif8z krlwuhpIGDLZI26uZcTAxGXReEJSVdS7n4w4X4QN6K9Rov+OupnpTMCRySS4EkRmUzYV Xm3Q== X-Gm-Message-State: AJaThX76N9SmayiQ96I2PiNqcj0drxvLlZkHqk2FNVXQX8Nm+cY2vY0C z4exuMtffM426r/AGqh/0XyTpz3N/8s= X-Received: by 10.223.160.230 with SMTP id n35mr517395wrn.116.1510323762112; Fri, 10 Nov 2017 06:22:42 -0800 (PST) Received: from localhost.localdomain ([160.167.170.128]) by smtp.gmail.com with ESMTPSA id e131sm1036477wmg.15.2017.11.10.06.22.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Nov 2017 06:22:41 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, daniel.thompson@linaro.org Date: Fri, 10 Nov 2017 14:21:14 +0000 Message-Id: <20171110142127.12018-22-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171110142127.12018-1-ard.biesheuvel@linaro.org> References: <20171110142127.12018-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms v4 21/34] Silicon/SynQuacerPciHostBridgeLib: add workaround to support 32-bit only cards X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: masahisa.kojima@linaro.org, masami.hiramatsu@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Implement workaround suggested by Socionext to get legacy endpoints with 32-bit BARs working. This fixes the issue on Developer Box with the onboard ASM1061 SATA controller. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c index b5bfea8e0e75..1bbef5b6cf98 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c @@ -32,10 +32,13 @@ #define IATU_REGION_CTRL_1_OFF_OUTBOUND_0_TYPE_IO 0x2 #define IATU_REGION_CTRL_1_OFF_OUTBOUND_0_TYPE_CFG0 0x4 #define IATU_REGION_CTRL_1_OFF_OUTBOUND_0_TYPE_CFG1 0x5 +#define IATU_REGION_CTRL_1_OFF_OUTBOUND_0_TH BIT12 #define IATU_REGION_CTRL_2_OFF_OUTBOUND_0 0x908 #define IATU_REGION_CTRL_2_OFF_OUTBOUND_0_REGION_EN BIT31 #define IATU_REGION_CTRL_2_OFF_OUTBOUND_0_CFG_SHIFT_MODE BIT28 +#define IATU_REGION_CTRL_2_OFF_OUTBOUND_0_MSG_CODE_32BIT 0xF +#define IATU_REGION_CTRL_2_OFF_OUTBOUND_0_MSG_CODE_64BIT 0xFF #define IATU_LWR_BASE_ADDR_OFF_OUTBOUND_0 0x90C #define IATU_UPPER_BASE_ADDR_OFF_OUTBOUND_0 0x910 @@ -297,8 +300,9 @@ PciInitController ( RootBridge->Mem.Base, RootBridge->Mem.Base, RootBridge->Mem.Limit - RootBridge->Mem.Base + 1, - IATU_REGION_CTRL_1_OFF_OUTBOUND_0_TYPE_MEM, - 0); + IATU_REGION_CTRL_1_OFF_OUTBOUND_0_TYPE_MEM | + IATU_REGION_CTRL_1_OFF_OUTBOUND_0_TH, + IATU_REGION_CTRL_2_OFF_OUTBOUND_0_MSG_CODE_32BIT); // Region 1: Type 0 config space ConfigureWindow (DbiBase, 1,