Commit Graph

6344 Commits

Author SHA1 Message Date
Balint Dobszay 2d51b55ee5 Replace dts includes with C preprocessor syntax
Using the /include/ syntax, the include was evaluated by dtc, only after running
the preprocessor, therefore the .dtsi files were not preprocessed. This patch
adds the #include syntax instead. Evaluating this and preprocessing the files
now happens in a single step, done by the C preprocessor.

Change-Id: I6d0104b6274316fc736e84973502a4d6c2c9d6e0
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
2020-01-14 10:30:38 +01:00
Alexei Fedorov dadd8060f1 Merge "docs: GCC toolchain upgrade to version 9.2-2019.12" into integration 2020-01-13 11:06:13 +00:00
Madhukar Pappireddy f35e5ab39c docs: GCC toolchain upgrade to version 9.2-2019.12
This toolchain provides multiple cross compilers and are publicly
available on developer.arm.com

We build TF-A in CI using:
AArch32 bare-metal target (arm-none-eabi)
AArch64 ELF bare-metal target (aarch64-none-elf)

Change-Id: I910200174d5bad985504d1af4a1ae5819b524003
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-01-10 16:12:01 -06:00
Mark Dykes 436367966f Merge "Unify type of "cpu_idx" across PSCI module." into integration 2020-01-10 19:39:17 +00:00
Deepika Bhavnani 5b33ad174a Unify type of "cpu_idx" across PSCI module.
NOTE for platform integrators:
   API `plat_psci_stat_get_residency()` third argument
   `last_cpu_idx` is changed from "signed int" to the
   "unsigned int" type.

Issue / Trouble points
1. cpu_idx is used as mix of `unsigned int` and `signed int` in code
with typecasting at some places leading to coverity issues.

2. Underlying platform API's return cpu_idx as `unsigned int`
and comparison is performed with platform specific defines
`PLAFORM_xxx` which is not consistent

Misra Rule 10.4:
The value of a complex expression of integer type may only be cast to
a type that is narrower and of the same signedness as the underlying
type of the expression.

Based on above points, cpu_idx is kept as `unsigned int` to match
the API's and low-level functions and platform defines are updated
where ever required

Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com>
Change-Id: Ib26fd16e420c35527204b126b9b91e8babcc3a5c
2020-01-10 17:11:51 +00:00
Manish Pandey 1522958fcd Merge "rcar_gen3: plat: Pass DT to OpTee OS" into integration 2020-01-10 16:58:56 +00:00
Manish Pandey 13be0ee40f Merge "plat: nvidia: remove spurious UTF-8 characters at top of platform files" into integration 2020-01-10 16:58:24 +00:00
Mark Dykes 5c33096742 Merge "FVP: Remove re-definition of topology related build options" into integration 2020-01-10 16:42:27 +00:00
Mark Dykes 865054dca8 Merge "FVP: Stop reclaiming init code with Clang builds" into integration 2020-01-10 16:33:59 +00:00
Manish Pandey d71ccda791 Merge "rcar_gen3: drivers: ddr: Move DDR drivers out of staging" into integration 2020-01-10 15:31:04 +00:00
Sandrine Bailleux d11a6057a4 Merge "Revert "GCC: Upgrade to version 9.2-2019.12 of toolchain"" into integration 2020-01-10 15:25:47 +00:00
Alexei Fedorov 94f1c9593d FVP: Remove re-definition of topology related build options
This patch removes re-definition of the following FVP build
options from plat\arm\board\fvp\fvp_def.h:
 'FVP_CLUSTER_COUNT'
 'FVP_MAX_CPUS_PER_CLUSTER'
 'FVP_MAX_PE_PER_CPU'
which are set in platform.mk.

This fixes a potential problem when a build option set in
platform.mk file can be re-defined in fvp_def.h header file
used by other build component with a different makefile which
does not set this option.
Ref. GENFW-3505.

Change-Id: I4288629920516acf2c239c7b733f92a0c5a812ff
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2020-01-10 14:24:17 +00:00
Mark Dykes 45503af4ce Merge "smccc: add get smc function id num macro" into integration 2020-01-09 20:22:16 +00:00
Manish Pandey 1f4b717051 Merge "Simplify PMF helper macro definitions across header files" into integration 2020-01-09 17:38:03 +00:00
Manish Pandey 1ab2dc1a55 Merge "Remove redundant declarations." into integration 2020-01-09 17:34:49 +00:00
Alexei Fedorov 6e94d56a67 Merge "Tegra194: mce: fix error code signedness" into integration 2020-01-09 15:26:47 +00:00
Olivier Deprez e073e0700e smccc: add get smc function id num macro
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I2953f0a6f35bc678402bc185640d1f328b065af5
2020-01-09 12:14:14 +01:00
Olivier Deprez f1f7201994 plat: nvidia: remove spurious UTF-8 characters at top of platform files
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Iee7fb43990047b27972e99572ec4b3dc4e5c0423
2020-01-09 10:51:25 +01:00
Madhukar Pappireddy daa9b6ea64 Simplify PMF helper macro definitions across header files
In further patches, we aim to enable -Wredundant-decls by default.
This rearragement of helper macros is necessary to make Coverity
tool happy as well as making sure there are no redundant function
declarations for PMF related declarations.

Also, PMF related macros were added to provide appropriate function
declarations for helper APIs which capture PSCI statistics.

Change-Id: I36273032dde8fa079ef71235ed3a4629c5bfd981
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-01-08 18:00:34 -06:00
Madhukar Pappireddy 7a05f06a84 Remove redundant declarations.
In further patches, we wish to enable -wredundant-decls check as
part of warning flags by default.

Change-Id: I43410d6dbf40361a503c16d94ccf0f4cf29615b7
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-01-08 18:00:25 -06:00
Mark Dykes 650a435c83 Revert "GCC: Upgrade to version 9.2-2019.12 of toolchain"
This reverts commit de9bf1d8a2.

Change-Id: Iebb6297ce290a10ee850bf6a9c71e7eb530b085f
2020-01-08 20:37:18 +00:00
Varun Wadekar e1fcb1bf89 Tegra194: mce: fix error code signedness
The MCE driver's helper functions were using postive values as error
codes.

This patch updates the functions to return negative values as error
codes instead. Some functions are updated to use the right error code.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I3e2ecc30a6272a357e1a22ec850543fde2a694f6
2020-01-08 09:19:05 -08:00
Manish Pandey 44abf27de4 Merge "A5DS: Change boot address to point to DDR address" into integration 2020-01-08 14:34:02 +00:00
Manish Pandey 8849298cb3 Merge "A5DS: Correct system freq, Cache Writeback Granule" into integration 2020-01-07 17:51:15 +00:00
Ambroise Vincent a6ffd375c7 FVP: Stop reclaiming init code with Clang builds
The reclaim init code functionality relies on forward reference in the
linker script. The LLVM linker does not process it correctly.

Change-Id: I993aeb9587bfa07af25b60ed823a6a2c5e970c94
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
2020-01-07 10:14:37 -06:00
Avinash Mehta e343bf1384 A5DS: Change boot address to point to DDR address
Point boot address to DDR location for booting A5DS FPGA
FIP, Kernel and rootfs are sideloaded to DDR
Also move BL2 to higher address in DDR

Change-Id: Ia2a57a0bda776a1a0a96bcd3cfb5c6cd2cf4dc04
Signed-off-by: Avinash Mehta <avinash.mehta@arm.com>
2020-01-07 14:43:12 +00:00
Avinash Mehta 786890caae A5DS: Correct system freq, Cache Writeback Granule
Correct the system, timer and uart frequencies to successfully run
the stack on FPGA
Correct Cortex-A5MPcore to 8 word granularity for Cache writeback

Change-Id: I2c59c26b7dca440791ad39f2297c68ae513da7b6
Signed-off-by: Avinash Mehta <avinash.mehta@arm.com>
2020-01-07 14:41:49 +00:00
Mark Dykes eafdc55859 Merge "GCC: Upgrade to version 9.2-2019.12 of toolchain" into integration 2020-01-06 16:31:41 +00:00
Marek Vasut cc6bc64175 rcar_gen3: plat: Pass DT to OpTee OS
Pass DT to OpTee OS, so that OpTee OS can extract NSEC RAM layout from the DT.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I7d5ebae8d7ab9c70f079e30563d66bbd6a8ac7a4
2020-01-06 03:07:35 +01:00
Marek Vasut 3333d2caf4 rcar_gen3: drivers: ddr: Move DDR drivers out of staging
Now that DDR drivers are mostly cleaned up , move them out of staging.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I9de63f847a0ef9ac27a79fb0f848c351fd7f4da6
2020-01-06 03:07:35 +01:00
Alexei Fedorov 22d12c4148 Merge "drivers: add a driver for snoop control unit" into integration 2020-01-03 11:42:15 +00:00
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
Madhukar Pappireddy de9bf1d8a2 GCC: Upgrade to version 9.2-2019.12 of toolchain
This toolchain provides multiple cross compilers and are publicly
available on www.developer.arm.com

We thoroughly test TF-A in CI using:
AArch32 bare-metal target (arm-none-eabi)
AArch64 ELF bare-metal target (aarch64-none-elf)

Change-Id: I2360a3ac6705c68dca781b85e9894867df255b3e
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-01-02 21:22:16 -06: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