public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org, leif.lindholm@linaro.org
Cc: graeme.gregory@linaro.org, daniel.thompson@linaro.org,
	masami.hiramatsu@linaro.org, methavanitpong.pipat@socionext.com,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH edk2-platforms v3 23/27] Silicon/SynQuacerPciHostBridgeLib: add workaround to support 32-bit only cards
Date: Tue, 31 Oct 2017 10:52:14 +0000	[thread overview]
Message-ID: <20171031105218.30208-24-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20171031105218.30208-1-ard.biesheuvel@linaro.org>

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 <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
---
 Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

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,
-- 
2.11.0



  parent reply	other threads:[~2017-10-31 10:49 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 10:51 [PATCH edk2-platforms v3 00/27] add support for Socionext Synquacer Ard Biesheuvel
2017-10-31 10:51 ` [PATCH edk2-platforms v3 01/27] Silicon/SynQuacer: add package with platform headers Ard Biesheuvel
2017-10-31 10:51 ` [PATCH edk2-platforms v3 02/27] Silicon/Socionext: add driver for NETSEC network controller Ard Biesheuvel
2017-11-01  4:41   ` Leif Lindholm
2017-10-31 10:51 ` [PATCH edk2-platforms v3 03/27] Silicon/Socionext: add PlatformPeilib implementation for SynQuacer Ard Biesheuvel
2017-11-01  4:44   ` Leif Lindholm
2017-10-31 10:51 ` [PATCH edk2-platforms v3 04/27] Silicon/SynQuacer: implement a platform DXE driver Ard Biesheuvel
2017-11-01  4:46   ` Leif Lindholm
2017-10-31 10:51 ` [PATCH edk2-platforms v3 05/27] Silicon/SynQuacer: add MemoryInitPeiLib implementation Ard Biesheuvel
2017-11-01  4:49   ` Leif Lindholm
2017-10-31 10:51 ` [PATCH edk2-platforms v3 06/27] Platform: add support for Socionext SynQuacer eval board Ard Biesheuvel
2017-11-01  4:53   ` Leif Lindholm
2017-10-31 10:51 ` [PATCH edk2-platforms v3 07/27] Silicon/SynQuacer: implement PciSegmentLib to support dual RCs Ard Biesheuvel
2017-10-31 10:51 ` [PATCH edk2-platforms v3 08/27] Silicon/SynQuacer: implement PciHostBridgeLib support Ard Biesheuvel
2017-11-01  4:57   ` Leif Lindholm
2017-10-31 10:52 ` [PATCH edk2-platforms v3 09/27] Silicon/SynQuacer: implement EFI_CPU_IO2_PROTOCOL Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 10/27] Platform/SynQuacerEvalBoard: add PCI support Ard Biesheuvel
2017-11-01  4:59   ` Leif Lindholm
2017-10-31 10:52 ` [PATCH edk2-platforms v3 11/27] Platform/SynQuacerEvalBoard: add NETSEC driver Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 12/27] Silicon/SynQuacer: add ACPI support Ard Biesheuvel
2017-11-01 10:15   ` graeme.gregory
2017-11-01 16:36     ` Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 13/27] Silicon/SynQuacer: add device tree support for eval board Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 14/27] Silicon/SynQuacer: add NorFlashPlatformLib implementation Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 15/27] Silicon/Socionext: add driver for SPI NOR flash Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 16/27] Platform/SynQuacer: incorporate NOR flash and variable drivers Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 17/27] Silicon/SynQuacer: implement PlatformFlashAccessLib Ard Biesheuvel
2017-11-01  5:06   ` Leif Lindholm
2017-10-31 10:52 ` [PATCH edk2-platforms v3 18/27] SynQuacer/SynQuacerMemoryInitPeiLib: add capsule support Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 19/27] Socionext/SynQuacerEvalBoard: wire up basic " Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 20/27] Socionext/SynQuacerEvalBoard: switch to execute in place Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 21/27] Platform/SynQuacerEvalBoard: add signed capsule update support Ard Biesheuvel
2017-11-01  5:10   ` Leif Lindholm
2017-10-31 10:52 ` [PATCH edk2-platforms v3 22/27] Silicon/SynQuacer/AcpiTables: hide PCI domain #0 Ard Biesheuvel
2017-11-01  5:12   ` Leif Lindholm
2017-10-31 10:52 ` Ard Biesheuvel [this message]
2017-10-31 10:52 ` [PATCH edk2-platforms v3 24/27] Platform/Socionext: add support for Socionext Developer Box rev 0.1 Ard Biesheuvel
2017-11-01  5:18   ` Leif Lindholm
2017-11-01  8:31     ` Ard Biesheuvel
2017-11-01 10:01       ` Leif Lindholm
2017-11-01 14:34         ` Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 25/27] Platform/DeveloperBox: add ConsolePrefDxe driver Ard Biesheuvel
2017-10-31 10:52 ` [PATCH edk2-platforms v3 26/27] Silicon/SynQuacer: add description of GPIO block to device tree Ard Biesheuvel
2017-11-01  5:20   ` Leif Lindholm
2017-10-31 10:52 ` [PATCH edk2-platforms v3 27/27] Silicon/SynQuacer: add description of EXIU to the " Ard Biesheuvel
2017-11-01  5:21   ` Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171031105218.30208-24-ard.biesheuvel@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox