summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2018-08-28 16:08:24 +0530
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2019-02-12 11:42:37 +0100
commite86e202c2e4e164975d52fa949d5978cceff6860 (patch)
tree51396bb52c111541ef0be7133bdfe0404827b636
parentef8c83974378c2ba1c76de92a4b84641bf5103ce (diff)
downloadarm-trusted-firmware-synquacer.tar.gz
synquacer: override north SMMU page table entries for ECAM spacesynquacer
Deal with outdated versions of the SCP firmware that do not remap the PCIe config space in an ECAM compatible manner, and override the block entries that map busses #0 .. #1 of PCI0 and PCI1 with their respective overrides provided as static level 3 tables in NOR flash. Change-Id: I4a2639cc62efe0755905822f448c9bb123d67b3e Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
-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