From patchwork Tue Oct 31 10:52: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: 117557 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3794958edm; Tue, 31 Oct 2017 03:54:31 -0700 (PDT) X-Google-Smtp-Source: ABhQp+S/BfEg5wWtag8lmfpDGoaiiPPmjGsH+OyepfYLNlk+Hd11gQxcIWOytJB5f0KSdldzL2u9 X-Received: by 10.98.103.143 with SMTP id t15mr1635924pfj.270.1509447271002; Tue, 31 Oct 2017 03:54:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509447270; cv=none; d=google.com; s=arc-20160816; b=exPh7NZ88j1XCYxvRs29GxViPOSfuohijjrvueYu51mA3vIR0AfB7XKT0p2SWYnPRn eR4HnECPXwnx1RfsFmbXAWbZwVzkysuMBapEuWG3cZIpZ8S/u6NBJVVqgZ/YEsFjRvdJ p4kofw/LYHt7pgMrBbG0gn3ryn8gGoEINagRlrWs1YmOJLYWUBXDFdTpW7OsMcO2qWlI OKOuoyMZIZSfv2dHUlNztcqZ2p7TStvT/UZlGZV6MeKYkZcUQLrbhu1lHX5aY/zOqWXP QpTmyBpWoVZoxIKHaKGpbIM5PBNl3LALAGgoMVIL89Z6iIJgFgSMRpw6eLsJc0rwb5/P eUsA== 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=HwiI2zzNxANLTTL7xGfuWDuIaTwxvId60g7LDbwKPtIlKwVNtUaOlb3+VyOPfHHMWS SK0NjilAfVTjWHDYx5hqgYktJ8O6h4ev/8umnJelmP4YhAQhQdEObB0ZXbtE71sai9tR r5Q4nu5s8UQzW/lfOhfVb0B3mANJYmKWc5whK8X+p1uGeRg/lEf8DXNFcraoXMakYPDJ 1Wz+vErm9vsDp2AsUxbNYj+88lcPxK9nEtatLR7godnJfLP9OgzJRlAOOjQOzdWd1P7m ZBzH05zM1fCPPB3GqIudADpG2xAqr4drs61SIIM266IIusCP3vHsW9Iqaz1NdX7mQHNm CF3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IyY0/8ac; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 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. [198.145.21.10]) by mx.google.com with ESMTPS id k82si1369024pfg.374.2017.10.31.03.54.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Oct 2017 03:54:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=IyY0/8ac; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 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 7CD382035D10D; Tue, 31 Oct 2017 03:49:38 -0700 (PDT) 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 05D7E2035D10D for ; Tue, 31 Oct 2017 03:49:37 -0700 (PDT) Received: by mail-wr0-x241.google.com with SMTP id z55so15530354wrz.1 for ; Tue, 31 Oct 2017 03:53:28 -0700 (PDT) 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=IyY0/8acVfrqxVtCky5ejxVC72RN2mxkzg6RxYkk/GzPGd0MyIsrpfpuULcQZ0FGpE ioqbxApQgDEW3yIj1ogmHb2Gpn7Q1rA7/VQ1ASXOgA0mAed9s/V+YURktnB0L+CTMYqu UWbxoJ1EmCCzIWx6hAEpHZErTT0xPvfI0Rtqw= 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=Z6btwKOCdH7VOMXm8YilY+GERNMJILbYQkAKT9wfNU5n40oJaZ6k6sI7v2yENOzs5D HW6DzYiUIALSVWr5azysSrDt8Kz6i0cMyS8uScEcYSwBqkK1gYI1hle8MstqLfn/Rniu 8AZBXEnVt+To4svxWH+JBsjFlqGdxPig6fC9pIYUdcYke1F4jmaWR/vE/Q3CwrZZSCOU ASQ7p0PhkWkzooAXmgxyj4erLvd3KTCuO/T6WrmWZnn1XJmG/kev44yYMRZTUos+F09M Gvz1bLb93erDtLtkktnCaxuayWTDJgn5kspGY5kgemmDsbXxjmA93Yhl4vrJ7DioqS1n Lc2Q== X-Gm-Message-State: AMCzsaX9cC/kyOzdjlAR5436Y6rN4bJTy8LXZCVO0qB3mBGeZ4xA1GDM SXXWztcxZpdlqgvK5K5TmfYpY0xtwVg= X-Received: by 10.223.147.135 with SMTP id 7mr1469606wrp.237.1509447207154; Tue, 31 Oct 2017 03:53:27 -0700 (PDT) Received: from localhost.localdomain ([105.129.222.2]) by smtp.gmail.com with ESMTPSA id o14sm460985wra.54.2017.10.31.03.53.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Oct 2017 03:53:26 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Tue, 31 Oct 2017 10:52:14 +0000 Message-Id: <20171031105218.30208-24-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171031105218.30208-1-ard.biesheuvel@linaro.org> References: <20171031105218.30208-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms v3 23/27] 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: daniel.thompson@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,