Commit Graph

8097 Commits

Author SHA1 Message Date
Madhukar Pappireddy b2a9e431f4 Merge changes from topic "cot-parser" into integration
* changes:
  plat/arm: fvp: Increase BL2 maximum size
  lib: fconf: Implement a parser to populate CoT
2020-09-15 16:53:56 +00:00
Mark Dykes 51ca09179d Merge "doc: Correct CPACR.FPEN usage" into integration 2020-09-15 16:44:09 +00:00
Olivier Deprez 95879319f5 SPMC: adjust the number of EC context to max number of PEs
According to [1] and in context of FF-A v1.0 a secure partition must
have either one EC (migratable UP) or a number of ECs equal to the
number of PEs (pinned MP). Adjust the SPMC manifest such that the
number of ECs is equal to the number of PEs.

[1] https://trustedfirmware-a.readthedocs.io/en/latest/components/
secure-partition-manager.html#platform-topology

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ie8c7d96ae7107cb27f5b97882d8f476c18e026d4
2020-09-15 17:25:57 +02:00
Manish V Badarkhe 70fb765396 plat/arm: fvp: Increase BL2 maximum size
Increased BL2 maximum size when CoT descriptors are placed
in device tree.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I6466d2841e189e7f15eb4f1a8db070542893cb5b
2020-09-15 15:14:53 +00:00
Manish V Badarkhe 28e9a55fc8 lib: fconf: Implement a parser to populate CoT
Implemented a parser which populates the properties of
the CoT descriptors as per the binding document [1].
'COT_DESC_IN_DTB' build option is disabled by default and can
be enabled in future for all Arm platforms by making necessary
changes in the memory map.
Currently, this parser is tested only for FVP platform.

[1]:
https://trustedfirmware-a.readthedocs.io/en/latest/components/cot-binding.html

Change-Id: I2f911206087a1a2942aa728de151d2ac269d27cc
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2020-09-15 16:13:26 +01:00
Madhukar Pappireddy 47bda02c8e Merge "doc: add description of "owner" field in SP layout file." into integration 2020-09-15 14:33:27 +00:00
Manish Pandey 7c9499623b Merge changes from topic "sami/834_fiptool_pack_issue_win_v1" into integration
* changes:
  Update makefile to build fiptool for Windows
  Fix fiptool packaging issue on windows
2020-09-15 14:05:34 +00:00
Manish Pandey 0901d3398d doc: add description of "owner" field in SP layout file.
Change-Id: Iedaa83ed546eb2476849a8d53f6e05b847a48b23
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
2020-09-15 09:45:15 +00:00
Manish Pandey a6f65b1152 Merge "fdts: corstone700: add NXP isp1763 node to device tree" into integration 2020-09-15 06:32:12 +00:00
Mark Dykes 1aabb74fae Merge "rockchip: don't crash if we get an FDT we can't parse" into integration 2020-09-14 21:49:38 +00:00
Andre Przywara b85359296c SPE: Fix feature detection
Currently the feature test for the SPE extension requires the feature
bits in the ID_AA64DFR0 register to read exactly 0b0001.
However the architecture guarantees that any values greater than 0
indicate the presence of a feature, which is what we are after in
our spe_supported() function.

Change the comparison to include all values greater than 0.

This fixes SPE support in non-secure world on implementations which
include the Scalable Vector Extension (SVE), for instance on Zeus cores.

Change-Id: If6cbd1b72d6abb8a303e2c0a7839d508f071cdbe
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2020-09-14 18:00:18 +01:00
Leonardo Sandoval 327131c4c7 build_macros.mk: include assert and define loop macros
Loop macros make it easier for developers to include new variables to
assert or define and also help code code readability on makefiles.

Change-Id: I0d21d6e67b3eca8976c4d856ac8ccc02c8bb5ffa
Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
2020-09-14 09:27:53 -05:00
Sami Mujawar 88a1cf1e4e Update makefile to build fiptool for Windows
Although support for building fiptool on a Windows host was present,
the binary was not built when the top level makefile was invoked.

This patch makes the necessary changes to the to support building of
fiptool on a Windows host PC from the main makefile.

Change-Id: I0c01ba237fa3010a027a1b324201131210cf4d7c
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
2020-09-14 15:06:56 +01:00
Sami Mujawar cb5c08b698 Fix fiptool packaging issue on windows
Windows does not have a standard getopt implementation. To address
this an equivalent implementation has been provided in win_posix.c
However, the implementation has an issue with option processing as
described below.

Long option names may be abbreviated if the abbreviation is unique
or an exact match for some defined option.
Since some options can be substring of other options e.g. "scp-fw"
option is a substring of "scp-fwu-cfg", we need to identify if an
option is abbreviated and also check for uniqueness. Otherwise if
a user passes --scp-fw as an option, the "scp-fwu-cfg" option may
get selected, resulting in an incorrectly packaged FIP.

This issue has been be fixed by:
  - First searching for an exact match.
  - If exact match was not found search for a abbreviated match.
By doing this an incorrect option selection can be avoided.

Change-Id: I22f4e7a683f3df857f5b6f0783bf9b03a64a0bcc
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
2020-09-14 15:06:56 +01:00
Peng Fan 093ba62e14 doc: Correct CPACR.FPEN usage
To avoid trapping from EL0/1, FPEN bits need to be set 0x3, not
clearing.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Change-Id: Ic34e9aeb876872883c5f040618ed6d50f21dacd0
2020-09-14 02:35:50 +00:00
Mark Dykes 34029d01c6 Merge "libc: Import strlcat from FreeBSD project" into integration 2020-09-11 18:44:19 +00:00
Mark Dykes ddf04313dc Merge "libc: Add support for vsnprintf()" into integration 2020-09-11 18:42:23 +00:00
Madhukar Pappireddy 77648689ad libc: Add support for vsnprintf()
It uses the existing implementation of snprintf() function

Change-Id: Ie59418564c2e415222e819cf322c34e9a4d1f336
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-09-11 11:34:01 -05:00
Madhukar Pappireddy 238db174b5 Merge "Workaround for Neoverse N1 erratum 1868343" into integration 2020-09-11 14:56:35 +00:00
Manish Pandey 9cdff51097 Merge "tc0: increase SCP_BL2 size to 128 kB" into integration 2020-09-11 14:01:50 +00:00
Manish Pandey ab9646f511 Merge "SPM: Get rid of uint32_t array representation of UUID" into integration 2020-09-11 10:47:48 +00:00
Mark Dykes 76a08094c5 Merge "tools: Set the tool's default binary name" into integration 2020-09-10 19:00:20 +00:00
johpow01 61f0ffc40a Workaround for Neoverse N1 erratum 1868343
Neoverse N1 erratum 1868343 is a Cat B erratum, present in older
revisions of the Neoverse N1 processor core.  The workaround is to
set a bit in the CPUACTLR_EL1 system register, which delays instruction
fetch after branch misprediction. This workaround will have a small
impact on performance.

SDEN can be found here:
https://documentation-service.arm.com/static/5f2c130260a93e65927bc92f

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: I37da2b3b2da697701b883bff9a1eff2772352844
2020-09-10 12:32:09 -05:00
Leonardo Sandoval ee15a17272 defaults.mk: default KEY_SIZE to 2048 in case of RSA algorithm
According to the documentation [1], KEY_SIZE defaults to 2048 when RSA
algorithm is chosen, so set this value on the make's defaults file.

[1] https://trustedfirmware-a.readthedocs.io/en/latest/getting_started/build-options.html

Change-Id: I030f98363198a752bc0dd03528f748de527d48d8
Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
2020-09-10 10:19:43 -05:00
Manish Pandey 5b0d839f7b Merge "plat/arm: rdn1edge: Correct mismatched parenthesis in makefile" into integration 2020-09-10 14:40:16 +00:00
Madhukar Pappireddy 071d4953a0 Merge "Addition of standard APIs in qtiseclib interface" into integration 2020-09-10 14:28:35 +00:00
Usama Arif dd14887e15
tc0: increase SCP_BL2 size to 128 kB
The size of debug binaries of SCP has increased beyond the current
limit of 80kB set in platform. Hence, increase it to 128kB.

Change-Id: I5dbcf87f8fb35672b39abdb942c0691fb339444a
Signed-off-by: Usama Arif <usama.arif@arm.com>
2020-09-10 15:05:58 +01:00
Sandeep Tripathy deb875b511 plat: tegra: Use generic ehf defines
Use common ehf file for generic frameworks like SDEI, RAS and
extend plat specific defines using 'PLAT_EHF_DESC'.

Signed-off-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
Change-Id: I8a8161c6030f8d226a8bdf0301e7fe6139f019a4
2020-09-10 18:54:06 +05:30
Anders Dellien 3280033b2d plat/arm: rdn1edge: Correct mismatched parenthesis in makefile
This fixes build errors for rdn1edge

Change-Id: I63f7ebff68679e1e859f8786d4def4960c0f2ddf
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
2020-09-10 10:32:40 +00:00
Ruari Phipps 0d4120d87e SPM: Get rid of uint32_t array representation of UUID
UUID's in the device tree files were stored in little endian. So
to keep all entries in these files RFC 4122 compliant, store them in
big endian then convert it to little endian when they are read so they
can be used in the UUID data structure.

Signed-off-by: Ruari Phipps <ruari.phipps@arm.com>
Change-Id: I5674159b82b245104381df10a4e3291160d9b3b5
2020-09-10 09:29:54 +01:00
Madhukar Pappireddy 1123a5e2f9 libc: Import strlcat from FreeBSD project
From commit: 21571b1d140ae7bb44e94c0afba2ec61456b275b
Made small changes to fit into TF-A project

Change-Id: I07fd7fe1037857f6b299c35367c104fb51fa5cfa
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-09-09 13:48:04 -05:00
Mark Dykes 0b96df769f Merge "libc: memset: improve performance by avoiding single byte writes" into integration 2020-09-09 18:36:08 +00:00
Madhukar Pappireddy 7fbb3dbac4 Merge "mediatek: Add jedec info" into integration 2020-09-09 17:03:28 +00:00
Manish Pandey f831ed7378 Merge "plat/arm: Add dependencies to configuration files" into integration 2020-09-09 09:52:33 +00:00
Olivier Deprez 6bea7468f8 Merge "plat: Fix build issue for qemu and rpi3 platforms" into integration 2020-09-09 09:44:13 +00:00
Olivier Deprez fc5961b390 Merge "Fix: fixing coverity issue for SPM Core." into integration 2020-09-09 09:04:37 +00:00
Saurabh Gorecha 9ac093b651 Addition of standard APIs in qtiseclib interface
Follwing APIs wrappers are exposed to qtiseclib
* strcmp
* memset
* memmove

Change-Id: I79d50f358239cfda607d5f1a53314aa3b8f430cb
Signed-off-by: Saurabh Gorecha <sgorecha@codeaurora.org>
2020-09-09 12:27:02 +05:30
Madhukar Pappireddy ed39d5e3c0 Merge "Enabling DPU in dts file for TC0" into integration 2020-09-08 14:22:45 +00:00
Avinash Mehta 0dc522943c Enabling DPU in dts file for TC0
This change replaces hdlcd with DPU in dts file for TC0

Change-Id: If25dfd3ddffc07279ab487f65e1bb82b27a26604
Signed-off-by: Avinash Mehta <avinash.mehta@arm.com>
2020-09-08 08:56:29 +01:00
joanna.farley 70b6701b8a Merge "doc: Improve contribution guidelines" into integration 2020-09-07 16:49:21 +00:00
Max Shvetsov f7fb0bf77f Fix: fixing coverity issue for SPM Core.
spmd_get_context_by_mpidr was using potentially negative value as an
array index. plat_core_pos_by_mpidr could return -1 on failure which is
utilized by some platforms.

Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
Change-Id: I7f8827e77f18da389c9cafdc1fc841aba9f03120
2020-09-07 16:16:35 +01:00
Rui Miguel Silva 23875c3f63 fdts: corstone700: add NXP isp1763 node to device tree
Add USB IP node as the MPS3 board has the NXP isp1763 host controller.

Change-Id: I47c57e4c8345d244c46895b52fcaecc1c6f1b504
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: lakshmi Kailasanathan <lakshmi.Kailasanathan@arm.com>
2020-09-07 13:13:04 +01:00
Manish V Badarkhe dad2934c49 plat: Fix build issue for qemu and rpi3 platforms
Coverity build periodically throws below errors(non-consistently)
for 'QEMU' and 'RPI3' platforms.

/bin/sh: 1: cannot create build/qemu/debug/rot_key.pem: Directory
nonexistent
plat/qemu/qemu/platform.mk:86: recipe for target 'build/qemu/debug/
rot_key.pem' failed
make: *** [build/qemu/debug/rot_key.pem] Error 2

/bin/sh: 1: cannot create /work/workspace/workspace/tf-coverity/build
/rpi3/debug/rot_key.pem: Directory nonexistent
plat/rpi/rpi3/platform.mk:214: recipe for target '/work/workspace/
workspace/tf-coverity/build/rpi3/debug/rot_key.pem' failed
make: *** [/work/workspace/workspace/tf-coverity/build/rpi3/debug/
rot_key.pem] Error 2

Issue seems to be occurred when 'ROT key' is generated before creating
the platform build folder(for e.g.build/qemu/debug).

Changes are made to fix this issue by adding orderly dependancy of
the platform folder for the 'ROT key' creation which ensures that
platform folder is created before generating 'ROT key'.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I20c82172dde84e4c7f2373c0bd095d353f845d38
2020-09-07 13:00:14 +01:00
Manish V Badarkhe b13e3f9f98 tools: Set the tool's default binary name
This patch: fafd3ec9c assumes that tools must build from
the main makefile folder.
This assumption leads to the error when somebody wants to
build a tool from the tool's folder.
Hence changes are done to provide the default binary name
in the tool's makefile.

Change-Id: Iae570a7f8d322151376b6feb19e739300eecc3fc
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2020-09-07 12:58:24 +01:00
Andre Przywara 75fab6496e libc: memset: improve performance by avoiding single byte writes
Currently our memset() implementation is safe, but slow. The main reason
for that seems to be the single byte writes that it issues, which can
show horrible performance, depending on the implementation of the
load/store subsystem.

Improve the algorithm by trying to issue 64-bit writes. As this only
works with aligned pointers, have a head and a tail section which
covers unaligned pointers, and leave the bulk of the work to the middle
section that does use 64-bit writes.

Put through some unit tests, which exercise all combinations of nasty
input parameters (pointers with various alignments, various odd and even
sizes, corner cases of content to write (-1, 256)).

Change-Id: I28ddd3d388cc4989030f1a70447581985368d5bb
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2020-09-03 23:00:24 +01:00
Manish Pandey 7ef3e0b31b Merge "lib: cpu: Check SCU presence in DSU before accessing DSU registers" into integration 2020-09-03 21:16:17 +00:00
Manish Pandey 86f75c2492 Merge "psci: utility api to invoke stop for other cores" into integration 2020-09-03 16:56:49 +00:00
Madhukar Pappireddy cd62b83499 Merge "Add Chris Kay as code owner for CMake Build Definitions." into integration 2020-09-03 16:44:38 +00:00
Javier Almansa Sobrino aec40abcf9 Add Chris Kay as code owner for CMake Build Definitions.
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
Change-Id: I69365d4aed1160af41e291f6e4b1dd31cbd12e02
2020-09-03 10:29:24 +01:00
Sandeep Tripathy 2274490945 psci: utility api to invoke stop for other cores
The API can be used to invoke a 'stop_func' callback for all
other cores from any initiating core. Optionally it can also
wait for other cores to power down. There may be various use
of such API by platform. Ex: Platform may use this to power
down all other cores from a crashed core.

Signed-off-by: Sandeep Tripathy <sandeep.tripathy@broadcom.com>
Change-Id: I4f9dc8a38d419f299c021535d5f1bcc6883106f9
2020-09-03 09:29:22 +00:00