Commit Graph

6312 Commits

Author SHA1 Message Date
Vishnu Banavath c20c05252c drivers: add a driver for snoop control unit
The SCU connects one to four Cortex-A5/Cortex-A9 processors
to the memory system through the AXI interfaces.

The SCU functions are to:
- maintain data cache coherency between the Cortex-A5/Cortex-A9
  processors
- initiate L2 AXI memory accesses
- arbitrate between Cortex-A5/Cortex-A9 processors requesting
  L2 accesses
- manage ACP accesses.

Snoop Control Unit will enable to snoop on other CPUs caches.
This is very important when it comes to synchronizing data between
CPUs. As an example, there is a high chance that data might be
cache'd and other CPUs can't see the change. In such cases,
if snoop control unit is enabled, data is synchoronized immediately
between CPUs and the changes are visible to other CPUs.

This driver provides functionality to enable SCU as well as enabling
user to know the following
- number of CPUs present
- is a particular CPU operating in SMP mode or AMP mode
- data cache size of a particular CPU
- does SCU has ACP port
- is L2CPRESENT

Change-Id: I0d977970154fa60df57caf449200d471f02312a0
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
2020-01-03 10:44:28 +00:00
Alexei Fedorov 8a0a8199e8 Merge "bl31: Split into two separate memory regions" into integration 2020-01-02 15:53:31 +00:00
Manish Pandey 8de26c2421 Merge "mediatek: mt8183: add Vmodem/Vcore DVS init level" into integration 2020-01-02 14:41:26 +00:00
Alexei Fedorov eb57dcb8d3 Merge "allwinner: Remove unused include path" into integration 2020-01-02 10:30:31 +00:00
Manish Pandey 5f400547aa Merge "rockchip: rk3328: Enable workaround for erratum 855873" into integration 2020-01-02 09:52:37 +00:00
Manish Pandey 0348ee4913 Merge "Workaround for Hercules erratum 1688305" into integration 2019-12-30 15:52:32 +00:00
Manish Pandey 2b4c5e4b6f Merge "uniphier: run BL33 at EL2" into integration 2019-12-30 11:21:05 +00:00
Samuel Holland 252c1d1d4b allwinner: Remove unused include path
Signed-off-by: Samuel Holland <samuel@sholland.org>
Change-Id: Ia2f69e26e34462e113bc2cad4dcb923e20b8fb95
2019-12-29 12:44:20 -06:00
Samuel Holland f8578e641b bl31: Split into two separate memory regions
Some platforms are extremely memory constrained and must split BL31
between multiple non-contiguous areas in SRAM. Allow the NOBITS
sections (.bss, stacks, page tables, and coherent memory) to be placed
in a separate region of RAM from the loaded firmware image.

Because the NOBITS region may be at a lower address than the rest of
BL31, __RW_{START,END}__ and __BL31_{START,END}__ cannot include this
region, or el3_entrypoint_common would attempt to invalidate the dcache
for the entire address space. New symbols __NOBITS_{START,END}__ are
added when SEPARATE_NOBITS_REGION is enabled, and the dcached for the
NOBITS region is invalidated separately.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Change-Id: Idedfec5e4dbee77e94f2fdd356e6ae6f4dc79d37
2019-12-29 12:00:40 -06:00
Masahiro Yamada f998a052fd uniphier: run BL33 at EL2
All the SoCs in 64-bit UniPhier SoC family support EL2.

Just hard-code MODE_EL2 instead of using el_implemented() helper.

Change-Id: I7ab48002c5205bc8c013e1b46313b57d6c431db0
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-12-26 12:14:03 +09:00
Roger Lu a027847466 mediatek: mt8183: add Vmodem/Vcore DVS init level
spm resume will restore Vmodem/Vcore voltages
back based on the SPM_DVS_LEVEL.

Change-Id: I37ff7ce4ba62219c1858acea816c5bc9ce6c493e
Signed-off-by: Roger Lu <roger.lu@mediatek.com>
2019-12-26 11:12:52 +08:00
Madhukar Pappireddy 83e955241a Workaround for Hercules erratum 1688305
Erratum 1688305 is a Cat B erratum present in r0p0, r0p1 versions
of Hercules core. The erratum can be avoided by setting bit 1 of the
implementation defined register CPUACTLR2_EL1 to 1 to prevent store-
release from being dispatched before it is the oldest.

Change-Id: I2ac04f5d9423868b6cdd4ceb3d0ffa46e570efed
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2019-12-23 11:21:16 -06:00
Manish Pandey caa0c85d2f Merge "lib: cpu: Add additional field definition for A72 L2 control" into integration 2019-12-23 16:57:58 +00:00
Sheetal Tigadoli ba4b453b59 lib: cpu: Add additional field definition for A72 L2 control
Add additional field definitions for
Cortex_A72 L2 Control registers

Change-Id: I5ef3a6db41cd7c5d9904172720682716276b7889
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
2019-12-23 15:32:24 +00:00
Mark Dykes 86ed8953b5 Merge "debugfs: add SMC channel" into integration 2019-12-20 20:56:23 +00:00
Mark Dykes e757b5ee1a Merge "debugfs: add FIP device" into integration 2019-12-20 20:53:28 +00:00
Mark Dykes be84a5b9af Merge "debugfs: add 9p device interface" into integration 2019-12-20 18:10:50 +00:00
Olivier Deprez 91ecca2350 Merge changes from topic "spm-devel" into integration
* changes:
  spm-mm: Rename aarch64 assembly files
  spm-mm: Rename source files
  spm-mm: Rename spm_shim_private.h
  spm-mm: Rename spm_private.h
  spm-mm: Rename component makefile
  spm-mm: Remove mm_svc.h header
  spm-mm: Refactor spm_svc.h and its contents
  spm-mm: Refactor secure_partition.h and its contents
  spm: Remove SPM Alpha 1 prototype and support files
  Remove dependency between SPM_MM and ENABLE_SPM build flags
2019-12-20 16:31:06 +00:00
Paul Beesley 99c69109ec spm-mm: Rename aarch64 assembly files
Change-Id: I2bab67f319758dd033aa689d985227cad796cdea
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-12-20 16:04:49 +00:00
Paul Beesley 6b1d9e6c39 spm-mm: Rename source files
Change-Id: I851be04fc5de8a95ea11270996f8ca33f0fccadb
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-12-20 16:04:35 +00:00
Paul Beesley 6b54236ea2 spm-mm: Rename spm_shim_private.h
Change-Id: I575188885ebed8c5f0682ac6e0e7dd159155727f
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-12-20 16:04:27 +00:00
Paul Beesley ff362d5fbd spm-mm: Rename spm_private.h
Change-Id: Ie47009158032c2e8f35febd7bf5458156f334ead
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-12-20 16:04:20 +00:00
Paul Beesley 442e092842 spm-mm: Rename component makefile
Change-Id: Idcd2a35cd2b30d77a7ca031f7e0172814bdb8cab
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-12-20 16:04:12 +00:00
Paul Beesley 962c44e77c spm-mm: Remove mm_svc.h header
The contents of this header have been merged into the spm_mm_svc.h
header file.

Change-Id: I01530b2e4ec1b4c091ce339758025e2216e740a4
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-12-20 16:04:01 +00:00
Paul Beesley 0bf9f567a7 spm-mm: Refactor spm_svc.h and its contents
Change-Id: I91c192924433226b54d33e57d56d146c1c6df81b
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-12-20 16:03:51 +00:00
Paul Beesley aeaa225cbe spm-mm: Refactor secure_partition.h and its contents
Before adding any new SPM-related components we should first do
some cleanup around the existing SPM-MM implementation. The aim
is to make sure that any SPM-MM components have names that clearly
indicate that they are MM-related. Otherwise, when adding new SPM
code, it could quickly become confusing as it would be unclear to
which component the code belongs.

The secure_partition.h header is a clear example of this, as the
name is generic so it could easily apply to any SPM-related code,
when it is in fact SPM-MM specific.

This patch renames the file and the two structures defined within
it, and then modifies any references in files that use the header.

Change-Id: I44bd95fab774c358178b3e81262a16da500fda26
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-12-20 16:03:41 +00:00
Paul Beesley 538b002046 spm: Remove SPM Alpha 1 prototype and support files
The Secure Partition Manager (SPM) prototype implementation is
being removed. This is preparatory work for putting in place a
dispatcher component that, in turn, enables partition managers
at S-EL2 / S-EL1.

This patch removes:

- The core service files (std_svc/spm)
- The Resource Descriptor headers (include/services)
- SPRT protocol support and service definitions
- SPCI protocol support and service definitions

Change-Id: Iaade6f6422eaf9a71187b1e2a4dffd7fb8766426
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
Signed-off-by: Artsem Artsemenka <artsem.artsemenka@arm.com>
2019-12-20 16:03:32 +00:00
Paul Beesley 3f3c341ae5 Remove dependency between SPM_MM and ENABLE_SPM build flags
There are two different implementations of Secure Partition
management in TF-A. One is based on the "Management Mode" (MM)
design, the other is based on the Secure Partition Client Interface
(SPCI) specification. Currently there is a dependency between their
build flags that shouldn't exist, making further development
harder than it should be. This patch removes that
dependency, making the two flags function independently.

Before: ENABLE_SPM=1 is required for using either implementation.
        By default, the SPCI-based implementation is enabled and
        this is overridden if SPM_MM=1.

After: ENABLE_SPM=1 enables the SPCI-based implementation.
       SPM_MM=1 enables the MM-based implementation.
       The two build flags are mutually exclusive.

Note that the name of the ENABLE_SPM flag remains a bit
ambiguous - this will be improved in a subsequent patch. For this
patch the intention was to leave the name as-is so that it is
easier to track the changes that were made.

Change-Id: I8e64ee545d811c7000f27e8dc8ebb977d670608a
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-12-20 16:03:02 +00:00
György Szing b8e17967bb Merge changes from topic "bs/pmf32" into integration
* changes:
  pmf: Make the runtime instrumentation work on AArch32
  SiP: Don't validate entrypoint if state switch is impossible
2019-12-20 10:33:43 +00:00
Sandrine Bailleux 2f227d5156 Merge changes from topic "tegra-boot-fixes-121719" into integration
* changes:
  Tegra: prepare boot parameters for Trusty
  Tegra: per-CPU GIC CPU interface init
2019-12-20 10:21:59 +00:00
Manish Pandey aeb3d83ecc Merge changes from topic "mailbox-fixes" into integration
* changes:
  intel: Fix SMC SIP service
  intel: Introduce mailbox response length handling
  intel: Fix mailbox config return status
  intel: Mailbox driver logic fixes
  plat: intel: Fix FPGA manager on reconfiguration
  plat: intel: Fix mailbox send_cmd issue
  intel: Modify mailbox's get_config_status
2019-12-19 17:33:03 +00:00
Sandrine Bailleux 90324ef46e Merge "fdts: a5ds: cleanup enable-method in devicetree" into integration 2019-12-19 16:05:24 +00:00
Sandrine Bailleux 4d9a375807 Merge "TF-A: Fix BL2 bug in dynamic configuration initialisation" into integration 2019-12-19 15:22:37 +00:00
Alexei Fedorov 5ddcbdd815 TF-A: Fix BL2 bug in dynamic configuration initialisation
This patch fixes the bug in BL2 dynamic configuration initialisation
which prevents loading NT_FW_CONFIG image (ref. GENFW-3471).
It also adds parentheses around 'if' statement conditions to fix
Coverity defect.

Change-Id: I353566c29b84341887e13bf8098a4fedfc4e00ff
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-12-19 14:53:28 +00:00
Manish Pandey f63e9f4c11 Merge "fdts: a5ds: add L2 cache node in devicetree" into integration 2019-12-19 12:11:29 +00:00
Manish Pandey 98ee29c6c4 Merge "intel: Create SiP service header file" into integration 2019-12-18 17:38:08 +00:00
Vishnu Banavath ab3b00fbfd fdts: a5ds: cleanup enable-method in devicetree
Same enable method is used by all the four cores. So,
make it globally for all the cores instead of adding
it to individual level.

Change-Id: I9b5728b0e0545c9e27160ea586009d929eb78cad
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
2019-12-18 17:10:02 +00:00
Vishnu Banavath 79c6c342e0 fdts: a5ds: add L2 cache node in devicetree
This change is to add L2 cache node into a5ds device tree.

Change-Id: I64b4b3e839c3ee565abbcd1567d1aa358c32d947
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
2019-12-18 16:40:49 +00:00
Mark Dykes 31645dde0b Merge "drivers: marvell: comphy-a3700: support SGMII COMPHY power off" into integration 2019-12-18 16:31:22 +00:00
Varun Wadekar 2783205da9 Tegra: prepare boot parameters for Trusty
This patch saves the boot parameters provided by the previous bootloader
during cold boot and passes them to Trusty. Commit 06ff251ec introduced
the plat_trusty_set_boot_args() handler, but did not consider the boot
parameters passed by the previous bootloader. This patch fixes that
anomaly.

Change-Id: Ib40dcd02b67c94cea5cefce09edb0be4a998db37
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2019-12-18 08:23:32 -08:00
Mark Dykes 90a76bab2f Merge "drivers: marvell: comphy-a3700: fix USB3 powering on when on lane 2" into integration 2019-12-18 16:13:38 +00:00
Soby Mathew 4962385ec2 Merge changes from topic "nonbl2-boot" into integration
* changes:
  intel: stratix10: Modify BL31 parameter handling
  intel: Modify BL31 address mapping
  intel: stratix10: Enable uboot entrypoint support
2019-12-18 12:32:44 +00:00
Alexei Fedorov cd07df8c0b Merge "aarch64: Fix stack pointer maintenance on EA handling path" into integration 2019-12-18 09:34:55 +00:00
Ambroise Vincent 992f091b5d debugfs: add SMC channel
Provide an SMC interface to the 9p filesystem. This permits
accessing firmware drivers through a common interface, using
standardized read/write/control operations.

Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I9314662314bb060f6bc02714476574da158b2a7d
2019-12-18 09:59:12 +01:00
Jan Dabros bb9549babc aarch64: Fix stack pointer maintenance on EA handling path
EA handlers for exceptions taken from lower ELs at the end invokes
el3_exit function. However there was a bug with sp maintenance which
resulted in el3_exit setting runtime stack to context. This in turn
caused memory corruption on consecutive EL3 entries.

Signed-off-by: Jan Dabros <jsd@semihalf.com>
Change-Id: I0424245c27c369c864506f4baa719968890ce659
2019-12-18 08:47:10 +01:00
Varun Wadekar e9e19fb2fe Tegra: per-CPU GIC CPU interface init
This patch enables per-CPU GIC CPU interfaces during CPU
power on. The previous code initialized the distributor
for all CPUs, which was not required.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Ifd957b2367da06405b4c3e2225411adbaec35bb8
2019-12-17 12:01:13 -08:00
Soby Mathew 0d35873c8f Merge changes from topic "allwinner_pmic" into integration
* changes:
  allwinner: h6: power: Switch to using the AXP driver
  drivers: allwinner: axp: Add AXP805 support
2019-12-17 16:51:39 +00:00
Soby Mathew 4e0d14f218 Merge "arm: gicv3: Fix compiler dependent behavior" into integration 2019-12-17 16:43:39 +00:00
Soby Mathew 287a81dfad Merge "plat/rockchip: enable power domains of rk3399 before reset" into integration 2019-12-17 16:41:30 +00:00
Soby Mathew 37ebe8e5ee Merge "plat/rockchip: cliam a macro to enable hdcp feature for DP" into integration 2019-12-17 15:12:43 +00:00