summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plat/socionext/synquacer/sq_helpers.S22
1 files changed, 21 insertions, 1 deletions
diff --git a/plat/socionext/synquacer/sq_helpers.S b/plat/socionext/synquacer/sq_helpers.S
index c2059241..f4895d52 100644
--- a/plat/socionext/synquacer/sq_helpers.S
+++ b/plat/socionext/synquacer/sq_helpers.S
@@ -142,5 +142,25 @@ func bl31_setup_s2_translation
orr x0, x0, #1
msr hcr_el2, x0
isb
- ret
+
+ /*
+ * The so-called 'north SMMU' translates accesses to the slave ports of
+ * the PCIe blocks, and so it can be used to translate accesses to the
+ * PCIe config space. Older versions of the SCP firmware do not remap it
+ * in an ECAM compatible fashion for the CPUs, (i.e., to work around
+ * limitations of the Synopsys IP) so let's do it here instead.
+ */
+ mov_imm x0, 0x4042800 // address and value of level 2
+ mov_imm x1, 0xC00060000445 // block entry for 0x6000_0000
+ ldr x2, [x0]
+ cmp x1, x2 // bail if the entry does not
+ b.ne 0f // have the expected value
+
+ mov_imm x1, (PRELOADED_BL33_BASE - 0x2000) | 3
+ str x1, [x0] // 0x6000_0000 - 0x601f_ffff
+ add x1, x1, #0x1000
+ str x1, [x0, #0x400] // 0x7000_0000 - 0x701f_ffff
+ dmb sy
+
+0: ret
endfunc bl31_setup_s2_translation