From patchwork Wed Oct 25 17:59:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 117153 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1120944qgn; Wed, 25 Oct 2017 11:01:43 -0700 (PDT) X-Google-Smtp-Source: ABhQp+ST8Taj3Hwnz2vx28G2tYaOlHN276DGx5n/dQmqrEKMcVxn14DQ7+mmEQpRhrqfcohCcApw X-Received: by 10.159.207.131 with SMTP id z3mr2388868plo.191.1508954503605; Wed, 25 Oct 2017 11:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508954503; cv=none; d=google.com; s=arc-20160816; b=FpmavVV4/dJ6Eg6YDXDpUDFn9KWDHYVNZFR9mttdYe4tFC84Ulq5j1DJYMEVWghHC3 rVnc3GBZWipLVEizvCLyE/acRT15M+HywQ4mMAZXeA3dOAlJyr7bQJihtKI/cPH+W0zW 9NNPPx7F7cTpgkKgkmdhDFayROfxHOJ3kTn6kHD2eNn9gzyouVM/J+VJxJiNnRgD4hML dd9V/VFAHq9InZbAyCjgpd1JCrs9/jyR50kgBnFhCS2cqgHTspysmCKtqAK8ACKE4jeu aiccCTzfB/LXzLx31Ctt4xIuFS4jJGVRGz+LiJbXRBdOfAWIjoQFPUg0G6dq2iUkqGQH rUgw== 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=ChLSOVdcAu/JWCHsyZQ5OlREQ8Tont39wmqKDtPGz90=; b=rK4RuKEBNC5oW256WwCvZOHgGQG2tZ8uqY/A09pCakq20fiGin/xF+4xWIxrLTwuQh h1w8bvUdyflOM7DAFCzPEMCqiGbQ8agyX8DzWfDova492uS89IAoj5JHPR4hMCGpf78N BXMfzGRI9AniRdqPYpFhbauZsH8qUWVUouGnGfyKzoTIlXvcc/QPL4shrszW60lQLlzE lVRzk26O20teuG+2REQgmpPQder2yMnCCbLHGSX+AkjDfVWIAUCxXlNbxh124dYgAFqK 7Ig29a7zQZyRS+Iyl1hoC6MyNAmoLIHNpHStGmArA+GtYkEEFEDr4sNzJC158x9HJrBi iWjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=WaoOw7Tw; 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 v9si1866599plz.833.2017.10.25.11.01.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 11:01:43 -0700 (PDT) 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=WaoOw7Tw; 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 2E1F6203525F8; Wed, 25 Oct 2017 10:57:00 -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:c09::244; helo=mail-wm0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 B535620352613 for ; Wed, 25 Oct 2017 10:56:57 -0700 (PDT) Received: by mail-wm0-x244.google.com with SMTP id p75so3456941wmg.3 for ; Wed, 25 Oct 2017 11:00:43 -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=jsf5dzgOG/KJ9rDk2dkZHIXzl/EaXtdHkxQJSRjn9Pc=; b=WaoOw7Tw5jZrrdXvPHRC4tN6uY1cG0PtOQXHtJNKo3kFxS3iDisu3GypqtJf7dRWqb W4jEbSisR8sugh+9pHdgDUERjFRvAvwnrl1BlADcyKp1lkMrBRRX18VkiGKpA0rZZz9S uwPFSGHMok36LcvC0qW3ilLqJe5g3mmVx4wn4= 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=jsf5dzgOG/KJ9rDk2dkZHIXzl/EaXtdHkxQJSRjn9Pc=; b=I18Dp7AcqkrTfA64huKfg47jkxK/eZ41H26GbCN8i7R9SIq66deXPutgSo0LZ36ewF HljwbjNpr0zm3oltDoatFkM60yZR/aU5Jv7sRzVT0jvZj07h1+GWiWeLHs0dQHDY+JR3 MwzJz3/8LA0buDWPPOQ2CFVO7wPXZeJPiwtTGzLdeRr2EN2w1B6wb7QYEOg1ruDYemeq 43sLhbBkqzh4CAaOqYucyF0VcHDcVpEDM/L1lrw14YGqGTyGT1W7dB3wOb5NcN3KWZrR rRYzbkD6GA5+hUQBy7c7QA9FQEEJ2sW/OE7X3chXFlD2Wuvn3EH25br0hGXrUT9bIT+A DwzA== X-Gm-Message-State: AMCzsaWeil6OsvG1ysQfZp8Lt6UwLVH3QgTaYXCe7FJlmdNjfxEdWcAS bhET2YDrScvt2DrS0/lvJVoNvXq68Mc= X-Received: by 10.28.13.135 with SMTP id 129mr2697520wmn.24.1508954441474; Wed, 25 Oct 2017 11:00:41 -0700 (PDT) Received: from localhost.localdomain ([160.161.173.60]) by smtp.gmail.com with ESMTPSA id y29sm3255305wrd.3.2017.10.25.11.00.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Oct 2017 11:00:40 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Wed, 25 Oct 2017 18:59:45 +0100 Message-Id: <20171025175947.22798-22-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171025175947.22798-1-ard.biesheuvel@linaro.org> References: <20171025175947.22798-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms v2 21/23] 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 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. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- 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 Reviewed-by: Leif Lindholm diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c index 3c6eff602f74..dd6c9bf90223 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c @@ -31,10 +31,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 @@ -296,8 +299,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,