Commit Graph

1352 Commits

Author SHA1 Message Date
Louis Mayencourt 4874793d2b doc: Add binding document for fconf.
Complete the documentation with information on how to write a DTS for
fconf. This patch adds the bindings information for dynamic
configuration properties.

Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Change-Id: Ic6d9f927df53bb87315c23ec5a8943d0c3258d45
2020-04-30 09:40:23 +01:00
Sandrine Bailleux 8b815a4e03 doc: Treat Sphinx warnings as errors
'make doc' will now fail if Sphinx outputs any warning messages during
documentation generation.

Change-Id: I3e466af58ccf29b14a7e61037539b79ab6fc6037
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2020-04-21 09:37:47 +00:00
Mark Dykes e822372afb Merge "doc: Fixup some SMCCC links" into integration 2020-04-17 15:23:47 +00:00
Sandrine Bailleux 71ac931f33 doc: Fixup some SMCCC links
This is a fixup for patch 3ba55a3c5f
("docs: Update SMCCC doc, other changes for release"), where some
links names got changed but their references didn't.

Change-Id: I980d04dde338f3539a2ec1ae2e807440587b1cf5
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2020-04-17 14:06:54 +02:00
Sandrine Bailleux 6e18633260 Merge "doc: Set fconf as experimental feature" into integration 2020-04-17 08:35:33 +00:00
Mark Dykes 89a16e8fc2 Merge "docs: Update SMCCC doc, other changes for release" into integration 2020-04-16 21:04:44 +00:00
Mark Dykes f9b546f652 Merge "docs: Updating Change log for v2.3 Release" into integration 2020-04-16 21:04:17 +00:00
Louis Mayencourt c2c150e7c5 doc: Set fconf as experimental feature
Following the messages on the mailing list regarding the possible issue around
reading DTB's information, we decided to flag the fconf feature as experimental.
A uniform approach should be used to handle properties miss and DTB validation.

Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Change-Id: Ib3c86e81fb2e89452c593f68d825d3d8f505e1fb
2020-04-16 17:33:22 +01:00
laurenw-arm 4204e074cd docs: Updating Change log for v2.3 Release
Updating the change log for the v2.3 release and the upcoming change log
template for v2.4 release.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ice875d3c93227069738a429d4b945512af8470e9
2020-04-16 10:23:21 -05:00
laurenw-arm 3ba55a3c5f docs: Update SMCCC doc, other changes for release
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ie842d6a9919776de151a4e9304f870aede07c47a
2020-04-16 10:03:39 -05:00
Sandrine Bailleux 7a6840411a Merge "docs: Fixes and updates for the v2.3 release" into integration 2020-04-16 07:42:55 +00:00
laurenw-arm 495553d572 docs: Fixes and updates for the v2.3 release
A small set of misc changes to ensure correctness before the v2.3
release.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I5b4e35b3b46616df0453cecff61f5a414951cd62
2020-04-15 17:50:43 -05:00
laurenw-arm 3056819b2b docs: Updating Release information for v2.4
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I5a7ae778999295f3453b7ab0bfc26351e545fb8f
2020-04-15 15:20:36 -05:00
Sandrine Bailleux 77516a7331 Fix Broadcom Stingray platform documentation
- Include the platform documentation in the table of contents.

 - Add a title for the document. Without this, the platform
   documentation was listed under a 'Description' title on page
   https://trustedfirmware-a.readthedocs.io/en/latest/plat/index.html

 - Change TF-A git repository URL to point to tf.org (rather than the
   deprecated read-only mirror on Github).

 - Fix the restructuredText syntax for the FIP command line. It was
   not displayed at all on the rendered version.

Change-Id: I7a0f062bcf8e0dfc65e8f8bdd6775c497a47e619
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2020-04-15 11:20:40 +02:00
Alexei Fedorov 5875f2665d TF-A: Add GICv4 extension for GIC driver
This patch adds support for GICv4 extension.
New `GIC_ENABLE_V4_EXTN` option passed to gicv3.mk makefile
was added, and enables GICv4 related changes when set to 1.
This option defaults to 0.

Change-Id: I30ebe1b7a98d3a54863900f37eda4589c707a288
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2020-04-07 11:17:58 +01:00
Alexei Fedorov 8f3ad76614 TF-A GICv3 driver: Add extended PPI and SPI range
This patch provides support for GICv3.1 extended PPI and SPI
range. The option is enabled by setting to 1 and passing
`GIC_EXT_INTID` build flag to gicv3.mk makefile.
This option defaults to 0 with no extended range support.

Change-Id: I7d09086fe22ea531c5df51a8a1efd8928458d394
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2020-04-06 16:27:54 +01:00
Manish Pandey 926cd70a0c Merge changes from topic "brcm_initial_support" into integration
* changes:
  doc: brcm: Add documentation file for brcm stingray platform
  drivers: Add SPI Nor flash support
  drivers: Add iproc spi driver
  drivers: Add emmc driver for Broadcom platforms
  Add BL31 support for Broadcom stingray platform
  Add BL2 support for Broadcom stingray platform
  Add bl31 support common across Broadcom platforms
  Add bl2 setup code common across Broadcom platforms
  drivers: Add support to retrieve plat_toc_flags
2020-04-03 13:53:48 +00:00
Sheetal Tigadoli fd1017b121 doc: brcm: Add documentation file for brcm stingray platform
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
Change-Id: I5e2c1220e9694d6ba771cc90daa0e70e967eebe6
2020-04-03 17:12:42 +05:30
Louis Mayencourt a5bb389a82 doc: Fix "unexpected indentation" warning.
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Change-Id: I521eed6466fdfef18a92f5237912cb402441044a
2020-04-01 16:40:16 +02:00
Louis Mayencourt 75077e26a9 doc: Update fconf uml diagrams
Update the plantuml diagrams to match the latest modification in fconf.

Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
Change-Id: I90f55bba0fd039a3f7e1bd39661cf849fccd64f5
2020-04-01 16:40:16 +02:00
Manish V Badarkhe 7ff088d1f0 Enable MTE support
Enable MTE support by adding memory tag option in Makefile
This option is available only when ARMv8.5-MemTag is implemented

MTE options are added in latest clang and armclang compiler which
support below options:
for clang <version 11.0.0>
1. -march=arm8.5-a+memtag
2. -fsanitize=memtag

for armclang <version 6.12>
1. -march=arm8.5-a+memtag
2. -mmemtag-stack

Set the option SUPPORT_STACK_MEMTAG=yes to enable memory stack tagging.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I4e0bbde4e9769ce03ead6f550158e22f32c1c413
2020-04-01 16:40:16 +02:00
Sandrine Bailleux 0a43db84af Merge "doc: Fix broken external link for Odroid C2" 2020-04-01 07:21:51 +00:00
Mark Dykes e0ca555ed1 Merge "Update code freeze and release target date for 2.3" into integration 2020-03-31 20:33:30 +00:00
laurenw-arm fa65b0e45a Update code freeze and release target date for 2.3
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Icf0a5737852e4f025dd8ce3748594ad25da43045
2020-03-31 14:21:55 -05:00
Heinrich Schuchardt db059ea4d9 doc: Fix broken external link for Odroid C2
The file README.odroid-c2 has been moved in the U-Boot repository.

Reference the official uplink repository.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Change-Id: Ie72c7aefd6363a406f88ad2c87faee1c7a2125a3
2020-03-31 20:38:01 +02:00
Alexei Fedorov a6ea06f563 TF-A GICv3 driver: Introduce makefile
This patch moves all GICv3 driver files into new added
'gicv3.mk' makefile for the benefit of the generic driver
which can evolve in the future without affecting platforms.
The patch adds GICv3 driver configuration flags
'GICV3_IMPL', 'GICV3_IMPL_GIC600_MULTICHIP' and
'GICV3_OVERRIDE_DISTIF_PWR_OPS' described in
'GICv3 driver options' section of 'build-option.rst'
document.

NOTE: Platforms with GICv3 driver need to be modified to
include 'drivers/arm/gic/v3/gicv3.mk' in their makefiles.

Change-Id: If055f6770ff20f5dee5a3c99ae7ced7cdcac5c44
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2020-03-30 10:54:01 +00:00
Manish Pandey 3f0b298fe9 Merge "Changelog updates for recent commits" into integration 2020-03-27 17:48:31 +00:00
Manish Pandey b3250f58a8 Merge "doc: add spm and spmd related build options" into integration 2020-03-27 16:17:51 +00:00
Olivier Deprez 4c65b4decf doc: add spm and spmd related build options
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I93892dbe76611a7a4b852af3272a0e6271ae037b
2020-03-27 13:54:42 +01:00
Olivier Deprez 4e1ca00978 Merge "Fix warnings in porting-guide.rst" into integration 2020-03-26 17:12:18 +00:00
Manish V Badarkhe 2b06610c9b Fix warnings in porting-guide.rst
Fix below warnings appeared in porting-guide.rst
WARNING: Title underline too short.

Change-Id: Ibc0eba0da72a53a5f9b61c49a8bf7a10b17bc3b8
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2020-03-26 15:24:23 +00:00
Sandrine Bailleux 46d88f9dce Merge changes I250c3aa1,Icf816053 into integration
* changes:
  changelog: introduce SPMD, add secure partition loading and tooling
  changelog: add debugfs functionality
2020-03-26 15:21:20 +00:00
Olivier Deprez 62c170700b changelog: introduce SPMD, add secure partition loading and tooling
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I250c3aa199d4e5efa68aa32bf5a1694835be56b7
2020-03-26 15:24:47 +01:00
Olivier Deprez 22193a3ed8 changelog: add debugfs functionality
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Icf8160536c249c754b3dfac6f8f49ca7ad3bb0de
2020-03-26 15:09:30 +01:00
Manish Pandey 7122259d4f Merge "spm: Add spci manifest binding document" into integration 2020-03-24 23:06:53 +00:00
Mark Dykes ce8dfd2884 Merge "fconf: Clean Arm IO" into integration 2020-03-24 18:14:24 +00:00
Louis Mayencourt 79c70ccb4a spm: Add spci manifest binding document
The manifest binding document defines the expected properties and their formats
to represent a partition manifest in device tree.

Change-Id: I5eb250c7b89e0d828e1fcfce32b121e4081879ec
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2020-03-23 14:22:29 +00:00
Manish Pandey a16c4d3a3f Merge "docs: remove uefi-tools in hikey and hikey960" into integration 2020-03-20 09:30:02 +00:00
Madhukar Pappireddy 76a7fc23c1 Changelog updates for recent commits
Change-Id: I09191a51dd9ee673c54b422ba4eb35c46c6dc30e
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-03-20 02:33:04 -05:00
Sandrine Bailleux c979685271 Merge changes from topic "rpix-multi-console" into integration
* changes:
  rpi: docs: Update maintainers file to new RPi directory scheme
  rpi: console: Autodetect Mini-UART vs. PL011 configuration
  rpi3: build: Include GPIO driver in all BL stages
  rpi: Allow using PL011 UART for RPi3/RPi4
  rpi3: console: Use same "clock-less" setup scheme as RPi4
  rpi3: gpio: Simplify GPIO setup
2020-03-18 16:44:40 +00:00
Manish Pandey ea32cf5049 Merge "Implement SMCCC_ARCH_SOC_ID SMC call" into integration 2020-03-18 13:55:33 +00:00
Andre Przywara 9aaae8e671 rpi: docs: Update maintainers file to new RPi directory scheme
With the addition of the Raspberry Pi 4 port the directory structure
changed a bit, also the new port didn't have a separate entry.

Add a new entry for the RPi4 port and adjust the path names.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: I04b60e729a19bb0cc3dd6ce6899ec6480356b1f1
2020-03-17 13:44:55 +00:00
Manish V Badarkhe 0e753437e7 Implement SMCCC_ARCH_SOC_ID SMC call
Implemented SMCCC_ARCH_SOC_ID call in order to get below
SOC information:

1. SOC revision
2. SOC version

Implementation done using below SMCCC specification document:
https://developer.arm.com/docs/den0028/c

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: Ie0595f1c345a6429a6fb4a7f05534a0ca9c9a48b
2020-03-17 10:14:35 +00:00
Mark Dykes 5e9369e818 Merge "fconf: Add namespace guidance inside documentation" into integration 2020-03-16 18:35:36 +00:00
Louis Mayencourt a6de824f7e fconf: Clean Arm IO
Merge the previously introduced arm_fconf_io_storage into arm_io_storage. This
removes the duplicate io_policies and functions definition.

This patch:
- replace arm_io_storage.c with the content of arm_fconf_io_storage.c
- rename the USE_FCONF_BASED_IO option into ARM_IO_IN_DTB.
- use the ARM_IO_IN_DTB option to compile out io_policies moved in dtb.
- propagate DEFINES when parsing dts.
- use ARM_IO_IN_DTB to include or not uuid nodes in fw_config dtb.
- set the ARM_IO_IN_DTB to 0 by default for fvp. This ensure that the behavior
  of fvp stays the same as it was before the introduction of fconf.

Change-Id: Ia774a96d1d3a2bccad29f7ce2e2b4c21b26c080e
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2020-03-16 11:49:19 +00:00
Haojian Zhuang 3888c2d4da docs: remove uefi-tools in hikey and hikey960
Since uefi-tools isn't used any more in hikey and hikey960, update the
documents.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Change-Id: I0843d27610e241d442e58b6cd71967998730a35d
2020-03-14 10:24:41 +08:00
Sandrine Bailleux 4c9ad0df66 Merge "juno/sgm: Maximize space allocated to SCP_BL2" into integration 2020-03-13 08:06:04 +00:00
Mark Dykes e820759f1c Merge "Mention COT build option in trusted-board-boot-build.rst" into integration 2020-03-12 18:04:09 +00:00
Mark Dykes bd2ad92902 Merge "Update cryptographic algorithms in TBBR doc" into integration 2020-03-12 18:03:05 +00:00
Sandrine Bailleux d935b95161 Mention COT build option in trusted-board-boot-build.rst
Since commit 3bff910dc1 ("Introduce COT
build option"), it is now possible to select a different Chain of Trust
than the TBBR-Client one.

Make a few adjustments in the documentation to reflect that. Also make
some minor improvements (fixing typos, better formatting, ...)  along
the way.

Change-Id: I3bbadc441557e1e13311b6fd053fdab6b10b1ba2
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2020-03-12 17:11:26 +01:00
Sandrine Bailleux 316c5cc6a2 Update cryptographic algorithms in TBBR doc
The TBBR documentation has been written along with an early
implementation of the code. At that time, the range of supported
encryption and hash algorithms was failry limited. Since then, support
for other algorithms has been added in TF-A but the documentation has
not been updated.

Instead of listing them all, which would clutter this document while
still leaving it at risk of going stale in the future, remove specific
references to the original algorithms and point the reader at the
relevant comprehensive document for further details.

Change-Id: I29dc50bc1d53b728091a1fbaa1c3970fb999f7d5
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2020-03-12 17:11:25 +01:00
Mark Dykes d2737fe1c6 Merge changes from topic "mp/enhanced_pal_hw" into integration
* changes:
  plat/arm/fvp: populate pwr domain descriptor dynamically
  fconf: Extract topology node properties from HW_CONFIG dtb
  fconf: necessary modifications to support fconf in BL31 & SP_MIN
  fconf: enhancements to firmware configuration framework
2020-03-12 15:54:28 +00:00
Chris Kay ddc93cbaa4 juno/sgm: Maximize space allocated to SCP_BL2
To accommodate the increasing size of the SCP_BL2 binary, the base
address of the memory region allocated to SCP_BL2 has been moved
downwards from its current (mostly) arbitrary address to the beginning
of the non-shared trusted SRAM.

Change-Id: I086a3765bf3ea88f45525223d765dc0dbad6b434
Signed-off-by: Chris Kay <chris.kay@arm.com>
2020-03-12 15:12:23 +00:00
Sandrine Bailleux baff5dc8da Merge "Changelog: Add dualroot CoT entries" into integration 2020-03-12 09:37:43 +00:00
Madhukar Pappireddy 26d1e0c330 fconf: necessary modifications to support fconf in BL31 & SP_MIN
Necessary infrastructure added to integrate fconf framework in BL31 & SP_MIN.
Created few populator() functions which parse HW_CONFIG device tree
and registered them with fconf framework. Many of the changes are
only applicable for fvp platform.

This patch:
1. Adds necessary symbols and sections in BL31, SP_MIN linker script
2. Adds necessary memory map entry for translation in BL31, SP_MIN
3. Creates an abstraction layer for hardware configuration based on
   fconf framework
4. Adds necessary changes to build flow (makefiles)
5. Minimal callback to read hw_config dtb for capturing properties
   related to GIC(interrupt-controller node)
6. updates the fconf documentation

Change-Id: Ib6292071f674ef093962b9e8ba0d322b7bf919af
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-03-11 11:24:55 -05:00
Mark Dykes f9ea3a6291 Merge "Fix crash dump for lower EL" into integration 2020-03-11 15:39:32 +00:00
Balint Dobszay 74601490c5 CMake buildsystem design document
Change-Id: I9b69f2731b0d43ead4cacfa9844c6137c57f5aec
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
2020-03-11 15:06:09 +01:00
Louis Mayencourt 6a7b3ce7ed fconf: Add namespace guidance inside documentation
Change-Id: I50707d1836c7f5e4ef162c00256624a1f278baef
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2020-03-11 11:16:27 +00:00
Sandrine Bailleux 7f91e592de Changelog: Add dualroot CoT entries
Change-Id: I60df17764b5170be6bc932808e8890fe1bb0b50f
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2020-03-11 09:51:06 +01:00
Mark Dykes 46b3003b05 Merge "Necessary fix in drivers to upgrade to mbedtls-2.18.0" into integration 2020-03-10 18:25:02 +00:00
Sumit Garg 4ebbea9592 docs: qemu: Add instructions to boot using FIP image
Update qemu documentation with instructions to boot using FIP image.
Also, add option to build TF-A with TBBR and firmware encryption
enabled.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Change-Id: Ib3af485d413cd595352034c82c2268d7f4cb120a
2020-03-09 20:48:17 +05:30
Sumit Garg f97062a5c7 docs: Update docs with firmware encryption feature
Update documentation with optional firmware encryption feature.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Change-Id: I26691b18e1ee52a73090954260f26f2865c4e05a
2020-03-09 20:48:17 +05:30
Madhukar Pappireddy 93ee279980 Necessary fix in drivers to upgrade to mbedtls-2.18.0
Include x509.h header file explicitly. Update docs.

Change-Id: If2e52c2cd3056654406b7b6779b67eea5cc04a48
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-03-08 00:33:10 -06:00
Alexei Fedorov b4292bc65e Fix crash dump for lower EL
This patch provides a fix for incorrect crash dump data for
lower EL when TF-A is built with HANDLE_EA_EL3_FIRST=1 option
which enables routing of External Aborts and SErrors to EL3.

Change-Id: I9d5e6775e6aad21db5b78362da6c3a3d897df977
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2020-03-06 14:17:35 +00:00
Sumit Garg 7cda17bb0f drivers: crypto: Add authenticated decryption framework
Add framework for autheticated decryption of data. Currently this
patch optionally imports mbedtls library as a backend if build option
"DECRYPTION_SUPPORT = aes_gcm" is set to perform authenticated decryption
using AES-GCM algorithm.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Change-Id: I2966f0e79033151012bf4ffc66f484cd949e7271
2020-03-06 16:40:37 +05:30
Sandrine Bailleux 6e46981f84 Merge "Update pathnames in maintainers.rst file" into integration 2020-03-03 11:49:44 +00:00
Sandrine Bailleux 51d4e227a0 doc: Fix variables names in TBBR CoT documentation
In commit 516beb585c ("TBB: apply TBBR naming
convention to certificates and extensions"), some of the variables used in the
TBBR chain of trust got renamed but the documentation did not get properly
updated everywhere to reflect these changes.

Change-Id: Ie8e2146882c2d3538c5b8c968d1bdaf5ea2a6e53
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2020-03-02 13:16:25 +01:00
Imre Kis 4ebdbc7083 Add Cortex-A65/AE to the supported FVP list
Cortex-A65x4 and Cortex-A65AEx8 is now included in the list of the
supported Arm Fixed Virtual Platforms.

Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: Ibfcaec11bc75549d60455e96858d79b679e71e5e
2020-02-27 15:18:20 +01:00
Sandrine Bailleux ac10c00e7b Merge "change-log: Add fconf entry" into integration 2020-02-27 07:33:07 +00:00
Sandrine Bailleux 548957478e Update pathnames in maintainers.rst file
The maintainers.rst file lists files and directories that each contributor looks
after in the TF-A source tree. As files and directories move around over time,
some pathnames had become invalid. Fix them, either by updating the path if
it has just moved, or deleting it altogether if it doesn't seem to exist
anymore.

Change-Id: Idb6ff4d8d0b593138d4f555ec206abcf68b0064f
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2020-02-26 17:05:45 +01:00
Sandrine Bailleux 160391b9db Merge "amlogic/axg: Add documentation page to the index" into integration 2020-02-26 15:17:23 +00:00
Sandrine Bailleux e58901d4bc amlogic/axg: Add documentation page to the index
It is needed to make it appear in the table of contents. Right now,
all Amlogic documentation pages appear under the "Platform ports"
section, except the AXG one.

Change-Id: Ibcfc3b156888d2a9574953578978b629e185c708
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2020-02-26 15:55:45 +01:00
Louis Mayencourt 5a97479bbd change-log: Add fconf entry
Change-Id: I6686f172d0c24f6c457a39cdf4debcbf05475540
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2020-02-26 13:49:09 +00:00
Sandrine Bailleux 7c72beae11 Merge "tools: Small improvement to print_memory_map script" into integration 2020-02-26 10:21:19 +00:00
Sandrine Bailleux 7390559bee Merge "SPMD: generate and add Secure Partition blobs into FIP" into integration 2020-02-25 16:19:46 +00:00
Manish Pandey ce2b1ec6f0 SPMD: generate and add Secure Partition blobs into FIP
Till now TF-A allows limited number of external images to be made part
of FIP. With SPM coming along, there may exist multiple SP packages
which need to be inserted into FIP. To achieve this we need a more
scalable approach to feed SP packages to FIP.

This patch introduces changes in build system to generate and add SP
packages into FIP based on information provided by platform.
Platform provides information in form of JSON which contains layout
description of available Secure Partitions.
JSON parser script is invoked by build system early on and generates
a makefile which updates FIP, SPTOOL and FDT arguments which will be
used by build system later on for final packaging.

"SP_LAYOUT_FILE" passed as a build argument and can be outside of TF-A
tree. This option will be used only when SPD=spmd.

For each SP, generated makefile will have following entries
     - FDT_SOURCES	+=	sp1.dts
     - SPTOOL_ARGS	+= 	-i sp1.img:sp1.dtb -o sp1.pkg
     - FIP_ARGS		+=	--blob uuid=XXXX-XXX...,file=SP1.pkg

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ib6a9c064400caa3cd825d9886008a3af67741af7
2020-02-20 17:35:43 +00:00
Varun Wadekar cd0ea1842f cpus: higher performance non-cacheable load forwarding
The CPUACTLR_EL1 register on Cortex-A57 CPUs supports a bit to enable
non-cacheable streaming enhancement. Platforms can set this bit only
if their memory system meets the requirement that cache line fill
requests from the Cortex-A57 processor are atomic.

This patch adds support to enable higher performance non-cacheable load
forwarding for such platforms. Platforms must enable this support by
setting the 'A57_ENABLE_NONCACHEABLE_LOAD_FWD' flag from their
makefiles. This flag is disabled by default.

Change-Id: Ib27e55dd68d11a50962c0bbc5b89072208b4bac5
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2020-02-20 09:25:45 -08:00
Manish Pandey 6019642947 Merge "Update docs with PMU security information" into integration 2020-02-19 17:30:37 +00:00
Alexei Fedorov 6227cca9e8 FVP: Fix BL31 load address and image size for RESET_TO_BL31=1
When TF-A is built with RESET_TO_BL31=1 option, BL31 is the
first image to be run and should have all the memory allocated
to it except for the memory reserved for Shared RAM at the start
of Trusted SRAM.
This patch fixes FVP BL31 load address and its image size for
RESET_TO_BL31=1 option. BL31 startup address should be set to
0x400_1000 and its maximum image size to the size of Trusted SRAM
minus the first 4KB of shared memory.
Loading BL31 at 0x0402_0000 as it is currently stated in
'\docs\plat\arm\fvp\index.rst' causes EL3 exception when the
image size gets increased (i.e. building with LOG_LEVEL=50)
but doesn't exceed 0x3B000 not causing build error.

Change-Id: Ie450baaf247f1577112f8d143b24e76c39d33e91
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2020-02-18 10:16:51 +00:00
Louis Mayencourt b890b36d1d tools: Small improvement to print_memory_map script
This patch:
- Add the __COHERENT_RAM_START__ and __COHERENT_RAM_END__ symbols.
- Improve how the symbols are found with a regex.
- Add a build option to revert the memory layout output.

Change-Id: I54ec660261431bc98d78acb0f80e3d95bc5397ac
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2020-02-14 16:31:19 +00:00
Mark Dykes 51d72d3adb Merge "doc: debugfs remove references section and add topic to components index" into integration 2020-02-12 16:44:26 +00:00
Petre-Ionut Tudor 62c9be71d6 Update docs with PMU security information
This patch adds information on the PMU configuration registers
and security considerations related to the PMU.

Signed-off-by: Petre-Ionut Tudor <petre-ionut.tudor@arm.com>
Change-Id: I36b15060b9830a77d3f47f293c0a6dafa3c581fb
2020-02-12 13:08:20 +00:00
Olivier Deprez 3ac82b258e doc: debugfs remove references section and add topic to components index
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I8c2e6dc98f2f30a81f4f80cc0ca1232fed7a53c9
2020-02-12 11:26:36 +01:00
Sandrine Bailleux 21c4f56fa7 Merge changes from topic "lm/fconf" into integration
* changes:
  arm-io: Panic in case of io setup failure
  MISRA fix: Use boolean essential type
  fconf: Add documentation
  fconf: Move platform io policies into fconf
  fconf: Add mbedtls shared heap as property
  fconf: Add TBBR disable_authentication property
  fconf: Add dynamic config DTBs info as property
  fconf: Populate properties from dtb during bl2 setup
  fconf: Load config dtb from bl1
  fconf: initial commit
2020-02-11 16:15:45 +00:00
Mark Dykes c8e0f950c1 Merge "Make PAC demangling more generic" into integration 2020-02-10 17:17:10 +00:00
Manish Pandey 65f6c3e90c Merge changes from topic "amlogic/axg" into integration
* changes:
  amlogic: axg: Add a build flag when using ATOS as BL32
  amlogic: axg: Add support for the A113D (AXG) platform
2020-02-10 14:31:27 +00:00
Alexei Fedorov 68c76088d3 Make PAC demangling more generic
At the moment, address demangling is only used by the backtrace
functionality. However, at some point, other parts of the TF-A
codebase may want to use it.
The 'demangle_address' function is replaced with a single XPACI
instruction which is also added in 'do_crash_reporting()'.

Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Change-Id: I4424dcd54d5bf0a5f9b2a0a84c4e565eec7329ec
2020-02-07 17:00:34 +00:00
Vijayenthiran Subramaniam 4d37aa76fd plat/arm/sgi: introduce number of chips macro
Introduce macro 'CSS_SGI_CHIP_COUNT' to allow Arm CSS platforms with
multi-chip support to define number of chiplets on the platform. By
default, this flag is set to 1 and does not affect the existing single
chip platforms.

For multi-chip platforms, override the default value of
CSS_SGI_CHIP_COUNT with the number of chiplets supported on the
platform. As an example, the command below sets the number of chiplets
to two on the RD-N1-Edge multi-chip platform:

export CROSS_COMPILE=<path-to-cross-compiler>
make PLAT=rdn1edge CSS_SGI_CHIP_COUNT=2 ARCH=aarch64 all

Change-Id: If364dc36bd34b30cc356f74b3e97633933e6c8ee
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
2020-02-07 19:24:17 +05:30
Louis Mayencourt 326150b986 fconf: Add documentation
Change-Id: I606f9491fb6deebc6845c5b9d7db88fc5c895bd9
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2020-02-07 13:51:32 +00:00
Louis Mayencourt 0a6e7e3b76 fconf: Move platform io policies into fconf
Use the firmware configuration framework to store the io_policies
information inside the configuration device tree instead of the static
structure in the code base.

The io_policies required by BL1 can't be inside the dtb, as this one is
loaded by BL1, and only available at BL2.

This change currently only applies to FVP platform.

Change-Id: Ic9c1ac3931a4a136aa36f7f58f66d3764c1bfca1
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2020-02-07 13:51:32 +00:00
Sandrine Bailleux 350aed4360 Merge "Adds option to read ROTPK from registers for FVP" into integration 2020-02-07 07:46:53 +00:00
Max Shvetsov a6ffddec33 Adds option to read ROTPK from registers for FVP
Enables usage of ARM_ROTPK_LOCATION=regs for FVP board.
Removes hard-coded developer keys. Instead, setting
ARM_ROTPK_LOCATION=devel_* takes keys from default directory.
In case of ROT_KEY specified - generates a new hash and replaces the
original.

Note: Juno board was tested by original feature author and was not tested
for this patch since we don't have access to the private key. Juno
implementation was moved to board-specific file without changing
functionality. It is not known whether byte-swapping is still needed
for this platform.

Change-Id: I0fdbaca0415cdcd78f3a388551c2e478c01ed986
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
2020-02-06 16:58:53 +00:00
Paul Beesley e63f5d129f doc: Split and expand coding style documentation
This patch expands the coding style documentation, splitting it
into two documents: the core style rules and extended guidelines.
Note that it does not redefine or change the coding style (aside
from section 4.6.2) - generally, it is only documenting the
existing style in more detail.

The aim is for the coding style to be more readable and, in turn,
for it to be followed by more people. We can use this as a more
concrete reference when discussing the accepted style with external
contributors.

Change-Id: I87405ace9a879d7f81e6b0b91b93ca69535e50ff
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
Signed-off-by: Petre-Ionut Tudor <petre-ionut.tudor@arm.com>
2020-02-06 16:25:06 +00:00
György Szing 3a415eb9d1 Merge "doc: Remove backquotes from external hyperlinks" into integration 2020-02-06 12:10:52 +00:00
Carlo Caione 72d2535afd amlogic: axg: Add a build flag when using ATOS as BL32
BL2 is unconditionally setting 0 (OPTEE_AARCH64) in arg0 even when the
BL32 image is 32bit (OPTEE_AARCH32). This is causing the boot to hang
when ATOS (32bit Amlogic BL32 binary-only TEE OS) is used.

Since we are not aware of any Amlogic platform shipping a 64bit version
of ATOS we can hardcode OPTEE_AARCH32 / MODE_RW_32 when using ATOS.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Iaea47cf6dc48bf8a646056761f02fb81b41c78a3
2020-02-06 12:10:47 +01:00
Carlo Caione afd241e71d amlogic: axg: Add support for the A113D (AXG) platform
Introduce the preliminary support for the Amlogic A113D (AXG) SoC.

This port is a minimal implementation of BL31 capable of booting
mainline U-Boot, Linux and chainloading BL32 (ATOS).

Tested on a A113D board.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ic4548fa2f7c48d61b485b2a6517ec36c53c20809
2020-02-06 12:10:47 +01:00
Imre Kis 8d52e16b45 doc: Remove backquotes from external hyperlinks
Since Sphinx 2.3.0 backquotes are replaced to \textasciigrave{} during
building latexpdf. Using this element in a \sphinxhref{} breaks the
build. In order to avoid this error backquotes must not be used in
external hyperlinks.

Signed-off-by: Imre Kis <imre.kis@arm.com>
Change-Id: Ie3cf454427e3d5a7b7f9829b42be45aebda7f0dd
2020-02-03 15:19:43 +01:00
Masahiro Yamada 62038be731 doc: qemu: fix and update documentation
The current URL for QEMU_EFI.fd is not found. Update the link to
point to the new one.

If you run the shell command as instructed, you will see this error:
  qemu-system-aarch64: keep_bootcon: Could not open 'keep_bootcon': No such file or directory

The part "console=ttyAMA0,38400 keep_bootcon root=/dev/vda2" is the
kernel parameter, so it must be quoted.

As of writing, QEMU v4.2.0 is the latest, but it does not work for
TF-A (It has been fixed in the mainline.) QEMU v4.1.0 works fine.

With those issues addressed, I succeeded in booting the latest kernel.

Tested with QEMU v4.1.0 and Linux 5.5 (defconfig with no modification).
Update the tested versions.

Change-Id: Ic85db0e688d67b1803ff890047d37de3f3db2daa
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-03 18:10:45 +09:00
Sandrine Bailleux 989429e872 Merge "Add support for documentation build as a target in Makefile" into integration 2020-01-31 07:35:30 +00:00
Sandrine Bailleux dcd03ce7bb Merge changes from topic "sb/select-cot" into integration
* changes:
  Introduce COT build option
  cert_create: Remove references to TBBR in common code
  cert_create: Introduce COT build option
  cert_create: Introduce TBBR CoT makefile
2020-01-30 13:58:10 +00:00
Sandrine Bailleux 3bff910dc1 Introduce COT build option
Allows to select the chain of trust to use when the Trusted Boot feature
is enabled. This affects both the cert_create tool and the firmware
itself.

Right now, the only available CoT is TBBR.

Change-Id: I7ab54e66508a1416cb3fcd3dfb0f055696763b3d
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2020-01-29 14:00:33 +01:00
Madhukar Pappireddy 6de32378f6 Add support for documentation build as a target in Makefile
Command to build HTML-formatted pages from docs:
make doc

Change-Id: I4103c804b3564fe67d8fc5a3373679daabf3f2e9
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-01-29 06:26:09 -06:00
Soby Mathew 8efec9e097 Merge changes I0fb7cf79,Ia8eb4710 into integration
* changes:
  qemu: Implement qemu_system_off via semihosting.
  qemu: Support ARM_LINUX_KERNEL_AS_BL33 to pass FDT address.
2020-01-29 09:51:21 +00:00
Alexei Fedorov 8c105290f3 Measured Boot: add function for hash calculation
This patch adds 'calc_hash' function using Mbed TLS library
required for Measured Boot support.

Change-Id: Ifc5aee0162d04db58ec6391e0726a526f29a52bb
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2020-01-28 16:51:40 +00:00
Manish Pandey 91ff490d75 Merge "Neovers N1: added support to update presence of External LLC" into integration 2020-01-28 08:18:56 +00:00
Manish Pandey f2d6b4ee57 Neovers N1: added support to update presence of External LLC
CPUECTLR_EL1.EXTLLC bit indicates the presense of internal or external
last level cache(LLC) in the system, the reset value is internal LLC.

To cater for the platforms(like N1SDP) which has external LLC present
introduce a new build option 'NEOVERSE_N1_EXTERNAL_LLC' which can be
enabled by platform port.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ibf475fcd6fd44401897a71600f4eafe989921363
2020-01-27 14:44:35 +00:00
Masahiro Yamada d974301d22 TSP: add PIE support
This implementation simply mimics that of BL31.

Change-Id: Ibbaa4ca012d38ac211c52b0b3e97449947160e07
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-01-24 22:34:25 +09:00
Masahiro Yamada 69af7fcf99 BL2_AT_EL3: add PIE support
This implementation simply mimics that of BL31.

I did not implement the ENABLE_PIE support for BL2_IN_XIP_MEM=1 case.
It would make the linker script a bit uglier.

Change-Id: If3215abd99f2758dfb232e44b50320d04eba808b
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-01-24 22:34:25 +09:00
Alexei Fedorov 208ebe7c91 Merge "xilinx: versal: PLM to ATF handover" into integration 2020-01-23 17:16:07 +00:00
Andrew Walbran 74464d5b51 qemu: Support ARM_LINUX_KERNEL_AS_BL33 to pass FDT address.
This lets the Linux kernel or any other image which expects an FDT in x0 be
loaded directly as BL33 without a separate bootloader on QEMU.

Signed-off-by: Andrew Walbran <qwandor@google.com>
Change-Id: Ia8eb4710a3d97cdd877af3b8aae36a2de7cfc654
2020-01-23 10:53:44 +00:00
Manish Pandey 09035d109d spm-mm: correcting instructions to build SPM for FVP
Out of two possible implementation of Secure Partition Manager(SPM)
currently only Management mode (MM) design is supported and the support
for SPM based on SPCI Alpha 1 prototype has been removed.

Earlier both implementation used common build flag "ENABLE_SPM" but it
has since been decoupled and MM uses a separate build FLAG "SPM_MM".

Instructions to build it for FVP was still using "ENABLE_SPM", which has
beend corrected in this patch.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I505b98173d6051816436aa602ced6dbec4efc776
2020-01-23 10:10:59 +00:00
Venkatesh Yadav Abbarapu 31ce893ec2 xilinx: versal: PLM to ATF handover
Parse the parameter structure the PLM populates, to populate the
bl32 and bl33 image structures.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@xilinx.com>
Change-Id: I317072d1086f6cc6f90883c1b8b6d086ff57b443
2020-01-23 03:01:22 -07:00
Soby Mathew f44d291f23 Merge changes from topic "add-versal-soc-support" into integration
* changes:
  plat: xilinx: Move pm_client.h to common directory
  plat: xilinx: versal: Make silicon default build target
  xilinx: versal: Wire silicon default setup
  versal: Increase OCM memory size for DEBUG builds
  plat: xilinx: versal: Dont set IOU switch clock
  arm64: versal: Adjust cpu clock for versal virtual
  xilinx: versal: Add support for PM_GET_OPERATING_CHARACTERISTIC EEMI call
  plat: versal: Add Get_ChipID API
  plat: xilinx: versal: Add load Pdi API support
  xilinx: versal: Add feature check API
  xilinx: versal: Implement set wakeup source for client
  plat: xilinx: versal: Add GET_CALLBACK_DATA function
  xilinx: versal: Add PSCI APIs for system shutdown & reset
  xilinx: versal: Add PSCI APIs for suspend/resume
  xilinx: versal: Remove no_pmc ops to ON power domain
  xilinx: versal: Add set wakeup source API
  xilinx: versal: Add client wakeup API
  xilinx: versal: Add query data API
  xilinx: versal: Add request wakeup API
  xilinx: versal: Add PM_INIT_FINALIZE API for versal
  xilinx: versal: Add support of PM_GET_TRUSTZONE_VERSION API
  xilinx: versal: enable ipi mailbox service
  xilinx: move ipi mailbox svc to xilinx common
  plat: xilinx: versal: Implement PM IOCTL API
  xilinx: versal: Implement power down/restart related EEMI API
  xilinx: versal: Add SMC handler for EEMI API
  xilinx: versal: Implement PLL related PM APIs
  xilinx: versal: Implement clock related PM APIs
  xilinx: versal: Implement pin control related PM APIs
  xilinx: versal: Implement reset related PM APIs
  xilinx: versal: Implement device related PM APIs
  xilinx: versal: Add support for suspend related APIs
  xilinx: versal: Add get_api_version support
  xilinx: Add support to send PM API to PMC using IPI for versal
  plat: xilinx: versal: Move versal_def.h to include directory
  plat: xilinx: versal: Move versal_private.h to include directory
  plat: xilinx: zynqmp: Use GIC framework for warm restart
2020-01-22 11:12:07 +00:00
Sandrine Bailleux c9c0b66f9a Merge "Set lld as the default linker for Clang builds" into integration 2020-01-22 07:58:48 +00:00
Sandrine Bailleux 3b3d406ebc Merge "docs: Add upcoming Change Log to Table of Contents" into integration 2020-01-21 08:01:16 +00:00
Lionel Debieve ac7764bbcb doc: stm32mp1: Update build command line
Add new flags for storage support that must be used in the build
command line. Add the complete build steps for an OP-TEE configuration.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: I0c682f6eb0aab83aa929f4ba734d3151c264aeed
2020-01-20 11:32:59 +01:00
Ambroise Vincent 641f16e756 Set lld as the default linker for Clang builds
The LLVM linker replaces the GNU linker as default for the link on Clang
builds. It is possible to override the default linker by setting the LD build
flag.

The patch also updates the TF-A doc.

Change-Id: Ic08552b9994d4fa8f0d4863e67a2726c1dce2e35
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
2020-01-17 16:48:18 +00:00
laurenw-arm 992d2fe020 docs: Add upcoming Change Log to Table of Contents
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I2a7f38eaae3a78fc3caa37833af755c15e8236ce
2020-01-17 10:28:16 -06:00
Mark Dykes 38aac6d405 Merge "docs: Creating a Change Log Template File" into integration 2020-01-16 17:24:13 +00:00
Siva Durga Prasad Paladugu 7b9f0cfd8c plat: xilinx: versal: Make silicon default build target
This patch makes default build target as silicon instead of QEMU.
The default can be overwritten by specifying it through build flag
VERSAL_PLATFORM.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Jolly Shah <jolly.shah@xilinx.com>
Change-Id: Ia4cb1df1f206db3e514e8ce969acca875e973ace
2020-01-15 11:04:10 -08:00
Jan Kiszka 433090515d rpi4: Fix documentation of armstub config entry
It's in fact mandatory. Seen with RPi firmware 1.20190925.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Change-Id: I80739b74f25817294adc52cfd26a3ec59c06f892
2020-01-14 17:04:49 +00: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
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
laurenw-arm 3c0d784cfb docs: Creating a Change Log Template File
Creating a Change Log Template for ALL to update with relevant
new features, changes, fixes and known issues for each upcoming
release of Trusted Firmware-A.

The contents of this file should be added to the collective change log
at the time of release code freeze.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Idfbdcef0d40b10312dc88b6e1cbe31856fda887e
2020-01-08 15:52:10 -06:00
Alexei Fedorov 8a0a8199e8 Merge "bl31: Split into two separate memory regions" into integration 2020-01-02 15:53:31 +00: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
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
Mark Dykes 86ed8953b5 Merge "debugfs: add SMC channel" into integration 2019-12-20 20:56:23 +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
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
Olivier Deprez 52ff3b4c79 Merge "doc: Fix indentation in build options documentation" into integration 2019-12-17 09:02:50 +00:00
Sandrine Bailleux 535fa663bf doc: Fix indentation in build options documentation
Sphinx was showing the following warning message:

docs/getting_started/build-options.rst:200: WARNING: Bullet list ends
without a blank line; unexpected unindent.

Change-Id: Iad5d49c1e0d25dd623ad15bce1af31babf860c03
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2019-12-17 09:39:00 +01:00
Sandrine Bailleux 985c8a3644 Merge "Update list of main maintainers" into integration 2019-12-17 08:31:06 +00:00
Soby Mathew 186acdd979 Merge "cryptocell: add cryptocell 712 RSA 3K support" into integration 2019-12-16 12:17:34 +00:00
Sandrine Bailleux 01534e8563 Update list of main maintainers
Change-Id: Ia4faf873f8946992737f76870ac92bc5cb3f4020
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2019-12-16 11:49:38 +01:00
Justin Chadwell 11a96e0ea0 Remove -Wpadded warning
-Wpadded warns whenever the C compiler automatically includes any
padding in a structure. Because TF-A has a large number of structures,
this occurs fairly frequently and is incredibly verbose, and as such is
unlikely to ever be fixed.

The utility of this warning is also extremely limited - knowing that a
structure includes padding does not point to the existence of an error,
and is probably quite unlikely to indicate actually buggy behaviour.
Therefore, it's probably best to keep this warning off at all times.

Change-Id: I0797cb75f06b4fea0d2fdc16fd5ad978a31d76ec
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
2019-12-16 09:05:42 +00:00
Gilad Ben-Yossef b8622922c8 cryptocell: add cryptocell 712 RSA 3K support
Add the support needed to enable using CryptoCell integration with
with RSA 3K support.

Signed-off-by: Gilad Ben-Yossef <gilad.benyossef@arm.com>
Change-Id: I95527cb0c41ae012109e8968dd20a4ae9fe67f17
2019-12-11 14:18:18 +02:00
Varun Wadekar fbd9eb58e6 docs: tegra: add support for Tegra194 class of SoCs
This patch adds the Tegra194 SoC information to the nvidia-tegra.rst
file.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: Id649a5ff1b3f70eeee34b508edb7965e7b7a2454
2019-12-10 10:06:48 -08:00
Soby Mathew 84bd7a43af Merge "Enable Link Time Optimization in GCC" into integration 2019-12-04 10:35:49 +00:00
Manish Pandey 6141eeeb57 Merge "Remove unnecessary warning options" into integration 2019-12-03 23:21:08 +00:00
zelalem-aweke edbce9aad4 Enable Link Time Optimization in GCC
This patch enables LTO for TF-A when compiled with GCC.
LTO is disabled by default and is enabled by
ENABLE_LTO=1 build option.

LTO is enabled only for aarch64 as there seem to be
a bug in the aarch32 compiler when LTO is enabled.

The changes in the makefiles include:
- Adding -flto and associated flags to enable LTO.
- Using gcc as a wrapper at link time instead of ld.
  This is recommended when using LTO as gcc internally
  takes care of invoking the necessary plugins for LTO.
- Adding switches to pass options to ld.
- Adding a flag to disable fix for erratum cortex-a53-843419
  unless explicitly enabled. This is needed because GCC
  seem to automatically add the erratum fix when used
  as a wrapper for LD.

Additionally, this patch updates the TF-A user guide with
the new build option.

Signed-off-by: zelalem-aweke <zelalem.aweke@arm.com>
Change-Id: I1188c11974da98434b7dc9344e058cd1eacf5468
2019-12-02 09:23:43 -06:00
Alexei Fedorov 76f25eb52b Merge "Changes to support updated register usage in SMCCC v1.2" into integration 2019-11-29 10:06:37 +00:00
Paul Beesley 43f35ef516 doc: Split the User Guide into multiple files
The User Guide document has grown organically over time and
now covers a wide range of topics, making it difficult to
skim read and extract information from. Currently, it covers
these topics and maybe a couple more:

- Requirements (hardware, tools, libs)
- Checking out the repo
- Basic build instructions
- A comprehensive list of build flags
- FIP packaging
- Building specifically for Juno
- Firmware update images
- EL3 payloads
- Preloaded BL33 boot flow
- Running on FVPs
- Running on Juno

I have separated these out into a few groups that become new
documents. Broadly speaking, build instructions for the tools,
for TF-A generally, and for specific scenarios are separated.
Content relating to specific platforms (Juno and the FVPs are
Arm-specific platforms, essentially) has been moved into the
documentation that is specific to those platforms, under
docs/plat/arm.

Change-Id: Ica87c52d8cd4f577332be0b0738998ea3ba3bbec
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-11-27 10:45:54 +00:00
Madhukar Pappireddy e34cc0cedc Changes to support updated register usage in SMCCC v1.2
From AArch64 state, arguments are passed in registers W0-W7(X0-X7)
and results are returned in W0-W7(X0-X7) for SMC32(SMC64) calls.
From AArch32 state, arguments are passed in registers R0-R7 and
results are returned in registers R0-R7 for SMC32 calls.

Most of the functions and macros already existed to support using
upto 8 registers for passing/returning parameters/results. Added
few helper macros for SMC calls from AArch32 state.

Link to the specification:
https://developer.arm.com/docs/den0028/c

Change-Id: I87976b42454dc3fc45c8343e9640aa78210e9741
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2019-11-26 12:56:30 -06:00
Justin Chadwell b8baa9346a Remove unnecessary warning options
Both -Wmissing-field-initializers and -Wsign-compare are both covered by
-Wextra which is enabled at W=1 anyway. Therefore, the explicit options
are not required.

Change-Id: I2e7d95b5fc14af7c70895859a7ebbeac5bc0d2a4
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
2019-11-19 08:53:11 -06:00
Sandrine Bailleux 896add4f1d Merge changes from topic "lm/improve_memory_layout" into integration
* changes:
  DOC: Update ROMLIB page with memory impact info
  ROMLIB: Optimize memory layout when ROMLIB is used
2019-11-18 16:45:03 +00:00
Louis Mayencourt 4685b64fc3 DOC: Update ROMLIB page with memory impact info
Complete the Library at ROM documentation with information regarding
the memory impact of the feature.

Change-Id: I5a10620a8e94f123021bb19523a36d558b330deb
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-11-18 13:27:44 +00:00
Paul Beesley ff2d38c2dd doc: Add missing terms to the glossary
Change-Id: Ibca94eae1a9a89c98b4d7cb5b4fd8943bf854030
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-11-14 15:37:45 +00:00
Sandrine Bailleux 5d0bdd5772 Merge "docs: Add Cortex-Hercules/HerculesAE CPU support" into integration 2019-11-13 17:24:02 +00:00
laurenw-arm 39009031eb docs: Add Cortex-Hercules/HerculesAE CPU support
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ia1ff13be1308e63c2854d2b6e5f6651750186abe
2019-11-13 10:54:52 -06:00
Paul Beesley 87d35d933d Merge "TF-A Documentation: Update Security Advisory TFV-5 (CVE-2017-15031)" into integration 2019-11-12 13:21:42 +00:00
Alexei Fedorov c605ecd1a1 TF-A Documentation: Update Security Advisory TFV-5 (CVE-2017-15031)
This patch updates description of Security Advisory TFV-5.

Change-Id: Ieaee0b51a79843345b1aca5d0e20c4964beb3c95
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-11-04 14:53:10 +00:00
Sandrine Bailleux ec477e7da9 doc: Fix syntax erros in I/O storage layer plantuml diagrams
Some of the plantuml diagrams in the I/O storage abstraction layer
documentation are absent from the rendered version of the porting
guide. The build log (see [1] for example) reports a syntax error in
these files. This is due to the usage of the 'order' keyword on the
participants list, which does not seem to be supported by the version
of plantuml installed on the ReadTheDocs server.

Fix these syntax errors by removing the 'order' keyword altogether. We
simply rely on the participants being declared in the desired order,
which will be the order of display, according to the plantuml
documentation.

[1] https://readthedocs.org/api/v2/build/9870345.txt

Change-Id: Ife35c74cb2f1dac28bda07df395244639a8d6a2b
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2019-10-28 14:19:27 +01:00
Paul Beesley c381ab6897 Merge "Update change log for v2.2 Release" into integration 2019-10-22 13:35:44 +00:00
Paul Beesley e654a0e381 Merge "Update release-information for v2.2 Release" into integration 2019-10-22 13:35:23 +00:00
Paul Beesley bbf0a1e434 doc: Final, pre-release fixes and updates
A small set of misc changes to ensure correctness before the v2.2
release tagging.

Change-Id: I888840b9483ea1a1633d204fbbc0f9594072101e
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-22 13:15:02 +00:00
laurenw-arm e69f350038 Update release-information for v2.2 Release
Removed deprecated interfaces that have been removed from the TF-A
project, updated the deprecated list with new deprecations for v2.2
Release, added upcoming release information, remove mentions of PR from
github.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
Change-Id: I2b59d351cde9860ad0dcb6520a8bd2827ad403cf
2019-10-22 13:05:50 +00:00
Paul Beesley 48730856e8 doc: Expand contact information in About section
Giving a bit more background information about the issue tracker
and mailing lists.

Change-Id: I68921d54e3113d348f1e16c685f74d32df2ca19f
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-22 08:00:29 +00:00
laurenw-arm 77caea2960 Update change log for v2.2 Release
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: I53a7706016539e7de7fdbe87b786d99665bbe1d8
2019-10-21 10:20:30 -05:00
Paul Beesley 5e6b416390 doc: Move platform list to the Platform Ports index page
The list of upstream platforms on the index page is growing
quite long, especially with all the FVP variants being listed
individually.

This patch leverages the "Platform Ports" chapter in the docs
table of contents to condense this information. Almost all
platform ports now have documentation, so the table of
contents serves as the list of upstream platforms by itself.

For those upstream platforms that do not have corresponding
documentation, the top-level "Platform Ports" page mentions
them individually. It also mentions each Arm FVP, just as
the index page did before.

Note that there is an in-progress patch that creates new
platform port documentation for the Arm Juno and Arm FVP
platforms, so this list of "other platforms" will soon be
reduced further as those platforms become part of the
table of contents as well.

Change-Id: I6b1eab8cba71a599d85a6e22553a34b07f213268
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-21 13:31:49 +00:00
Paul Beesley 8eb9490b61 doc: Move "About" content from index.rst to a new chapter
The index.rst page is now the primary landing page for the TF-A
documentation. It contains quite a lot of content these days,
including:

- The project purpose and general intro
- A list of functionality
- A list of planned functionality
- A list of supported platforms
- "Getting started" links to other documents
- Contact information for raising issues

This patch creates an "About" chapter in the table
of contents and moves some content there. In order,
the above listed content:

- Stayed where it is. This is the right place for it.
- Moved to About->Features
- Moved to About->Features (in subsection)
- Stayed where it is. Moved in a later patch.
- Was expanded in-place
- Moved to About->Contact

Change-Id: I254bb87560fd09140b9e485cf15246892aa45943
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-21 13:31:49 +00:00
Paul Beesley 879389edd6 Merge "Fix documentation" into integration 2019-10-18 08:38:23 +00:00
Paul Beesley 206c077b83 doc: Remove version and release variables from conf.py
We would need to update this version for the release but, in fact,
it is not required for our publishing workflow; the hosted version
of the docs uses git commit/tag information in place of these
variables anyway.

Instead of updating the version, just remove these variables
entirely.

Change-Id: I424c4e45786e87604e91c7197b7983579afe4806
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-17 13:46:38 +00:00
Artsem Artsemenka 434d93d96a Fix documentation
User guide:
1. Remove obsolete note saying only FVP is supported with AArch32
2. Switch compiler for Juno AArch32 to arm-eabi
3. Mention SOFTWARE folder in Juno Linaro release

Index.rst:
1. Switch default FVP model to Version 11.6 Build 45

Signed-off-by: Artsem Artsemenka <artsem.artsemenka@arm.com>
Change-Id: Ib47a2ea314e2b8394a20189bf91796de0e17de53
2019-10-15 22:37:02 +01:00
Paul Beesley a05c8f8731 Merge "doc: Update Linaro release mentioned on index page" into integration 2019-10-15 12:46:02 +00:00
Paul Beesley 9ec4afc8dd doc: Update Linaro release mentioned on index page
The version of the Linaro release that is used for testing was
updated in 35010bb8 and the user guide was updated with the
correct version, however the version is also mentioned on the
index page and that was missed. Update the index page with the
new version.

We can come back and de-duplicate this content later, to ease
future maintenance.

Change-Id: I3fe83d7a1c59ab8d3ce2b18bcc23e16c93f7af97
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-15 09:14:46 +00:00
Paul Beesley be653a6940 doc: Misc syntax and spelling fixes
Tidying up a few Sphinx warnings that had built-up over time.
None of these are critical but it cleans up the Sphinx output.

At the same time, fixing some spelling errors that were detected.

Change-Id: I38209e235481eed287f8008c6de9dedd6b12ab2e
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-11 12:39:06 +00:00
Paul Beesley 862c764ada doc: Add guide for building the docs locally
This new page contains instructions for doing a local
build of the documentation, plus information on the environment
setup that needs to be done beforehand.

Change-Id: If563145ab40639cabbe25d0f62759981a33692c6
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-09 13:47:38 +00:00
Paul Beesley 8cc36aec91 doc: De-duplicate readme and license files
The readme.rst and license.rst files in the project root overlap
with the index.rst and license.rst files in the docs/ folder. We
need to use the latter when building the documentation, as Sphinx
requires all included files to be under a common root. However,
the files in the root are currently used by the cgit and Github
viewers.

Using symlinks in Git presents some difficulties so the best
course of action is likely to leave these files but in stub form.

The license.rst file in the root will simply tell the reader to
refer to docs/license.rst.

The readme.rst file will contain a small amount of content that
is derived from the docs/index.rst file, so that the Github main
page will have something valid to show, but it will also contain
a link to the full documentation on ReadTheDocs.

Change-Id: I6dc46f08777e8d7ecb32ca7afc07a28486c9f77a
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-08 16:36:15 +00:00
Paul Beesley 347609510e doc: Convert internal links to RST format
Currently links between documents are using the format:

<path/to/><filename>.rst

This was required for services like GitHub because they render each
document in isolation - linking to another document is like linking
to any other file, just provide the full path.

However, with the new approach, the .rst files are only the raw
source for the documents. Once the documents have been rendered
the output is now in another format (HTML in our case) and so,
when linking to another document, the link must point to the
rendered version and not the .rst file.

The RST spec provides a few methods for linking between content.
The parent of this patch enabled the automatic creation of anchors
for document titles - we will use these anchors as the targets for
our links. Additional anchors can be added by hand if needed, on
section and sub-section titles, for example.

An example of this new format, for a document with the title
"Firmware Design" is :ref:`Firmware Design`.

One big advantage of this is that anchors are not dependent on
paths. We can then move documents around, even between directories,
without breaking any links between documents. Links will need to be
updated only if the title of a document changes.

Change-Id: I9e2340a61dd424cbd8fd1ecc2dc166f460d81703
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-08 15:58:03 +00:00
Paul Beesley e43ed98b80 doc: Add more missing platforms
Add meson-g12a, qemu-sbsa and rpi4 to the documentation index so
that they will have their docs rendered and integrated into the
table of contents.

Change-Id: Id972bf2fee67312dd7bff29f92bea67842e62431
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-07 12:24:25 +00:00
Soby Mathew 25792ce443 Merge "Neoverse N1 Errata Workaround 1542419" into integration 2019-10-07 12:05:26 +00:00
Soby Mathew 5b567758bb Merge "Fix the CAS spinlock implementation" into integration 2019-10-07 11:43:32 +00:00
laurenw-arm 80942622fe Neoverse N1 Errata Workaround 1542419
Coherent I-cache is causing a prefetch violation where when the core
executes an instruction that has recently been modified, the core might
fetch a stale instruction which violates the ordering of instruction
fetches.

The workaround includes an instruction sequence to implementation
defined registers to trap all EL0 IC IVAU instructions to EL3 and a trap
handler to execute a TLB inner-shareable invalidation to an arbitrary
address followed by a DSB.

Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
Change-Id: Ic3b7cbb11cf2eaf9005523ef5578a372593ae4d6
2019-10-04 19:31:24 +03:00
Soby Mathew c97cba4ea4 Fix the CAS spinlock implementation
Make the spinlock implementation use ARMv8.1-LSE CAS instruction based
on a platform build option. The CAS-based implementation used to be
unconditionally selected for all ARM8.1+ platforms.

The previous CAS spinlock implementation had a bug wherein the spin_unlock()
implementation had an `sev` after `stlr` which is not sufficient. A dsb is
needed to ensure that the stlr completes prior to the sev. Having a dsb is
heavyweight and a better solution would be to use load exclusive semantics
to monitor the lock and wake up from wfe when a store happens to the lock.
The patch implements the same.

Change-Id: I5283ce4a889376e4cc01d1b9d09afa8229a2e522
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
2019-10-04 10:19:35 +02:00
Soby Mathew efcf951f61 Merge changes from topic "qemu_sbsa" into integration
* changes:
  qemu/qemu_sbsa: Adding memory mapping for both FLASH0/FLASH1
  qemu/qemu_sbsa: Adding Qemu SBSA platform
2019-10-03 13:23:37 +00:00
Louis Mayencourt b48691eda0 doc: Fix GCC version to 8.3-2019.03
Change-Id: I3b866e927d93f4b690aa4891940fc8afabf4146e
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-10-02 06:38:33 +00:00
Sandrine Bailleux 2f625c5e5c Merge "doc: Migrate to Linaro release 19.06" into integration 2019-10-01 15:49:54 +00:00
Radoslaw Biernacki 558a6f444d qemu/qemu_sbsa: Adding Qemu SBSA platform
This patch introduces Qemu SBSA platform.
Both platform specific files where copied from qemu/qemu with changes for
DRAM base above 32bit and removal of ARMv7 conditional defines/code.
Documentation is aligned to rest of SBSA patches along the series and
planed changes in edk2-platform repo.

Fixes ARM-software/tf-issues#602

Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
Change-Id: I8ebc34eedb2268365e479ef05654b2df1b99128c
2019-10-01 17:23:56 +02:00
zelalem-aweke 35010bb803 doc: Migrate to Linaro release 19.06
- Updated Linaro release version number to 19.06
- Updated links to Linaro instructions and releases
- Removed the Linaro old releases link

Signed-off-by: zelalem-aweke <zelalem.aweke@arm.com>
Change-Id: Ib786728106961e89182b42183e7b889f6fc74190
2019-09-30 12:15:16 -05:00
Soby Mathew 32d514e5c6 Merge "doc: Fix platform port inclusion" into integration 2019-09-27 09:54:07 +00:00
Soby Mathew f7fa528917 Merge changes from topic "amlogic-g12a" into integration
* changes:
  amlogic: g12a: Add support for the S905X2 (G12A) platform
  amlogic: makefile: Use PLAT variable when possible
  amlogic: sha_dma: Move register mappings to platform header
2019-09-27 09:53:40 +00:00
Soby Mathew 17b0bb6cf5 Merge changes from topic "raspberry-pi-4-support" into integration
* changes:
  rpi4: Add initial documentation file
  rpi4: Add stdout-path to device tree
  rpi4: Add GIC maintenance interrupt to GIC DT node
  rpi4: Cleanup memory regions, move pens to first page
  rpi4: Reserve resident BL31 region from non-secure world
  rpi4: Amend DTB to advertise PSCI
  rpi4: Determine BL33 entry point at runtime
  rpi4: Accommodate "armstub8.bin" header at the beginning of BL31 image
  Add basic support for Raspberry Pi 4
  rpi3: Allow runtime determination of UART base clock rate
  FDT helper functions: Respect architecture in PSCI function IDs
  FDT helper functions: Add function documentation
2019-09-27 09:45:42 +00:00
Soby Mathew 41bda86330 Merge changes from topic "mp/giv3-discovery" into integration
* changes:
  Migrate ARM platforms to use the new GICv3 API
  Adding new optional PSCI hook pwr_domain_on_finish_late
  GICv3: Enable multi socket GIC redistributor frame discovery
2019-09-27 09:42:37 +00:00
Paul Beesley 69ef7b7ffe Merge changes I0283fc2e,Ib476d024,Iada05f7c into integration
* changes:
  hikey: fix to load FIP by partition table.
  hikey960: fix to load FIP by partition table
  drivers: partition: support different block size
2019-09-26 13:40:38 +00:00
Carlo Caione cdb8c52f92 amlogic: g12a: Add support for the S905X2 (G12A) platform
Introduce the preliminary support for the Amlogic S905X2 (G12A) SoC.

This port is a minimal implementation of BL31 capable of booting
mainline U-Boot and Linux. Tested on a SEI510 board.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
Change-Id: Ife958f10e815a4530292c45446adb71239f3367f
2019-09-26 09:27:45 +01:00
Madhukar Pappireddy 1010770719 Adding new optional PSCI hook pwr_domain_on_finish_late
This PSCI hook is similar to pwr_domain_on_finish but is
guaranteed to be invoked with the respective core and cluster are
participating in coherency. This will be necessary to safely invoke
the new GICv3 API which modifies shared GIC data structures concurrently.

Change-Id: I8e54f05c9d4ef5712184c9c18ba45ac97a29eb7a
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2019-09-25 22:06:44 -05:00
Paul Beesley f1e0f15262 doc: Fix platform port inclusion
This patch:

- Adds any leftover platform ports that were not having their
  documentation built (not in the index.rst table of contents)
- Corrects a handful of RST formatting errors that cause poor
  rendering
- Reorders the list of platforms so that they are displayed
  in alphabetical order

Change-Id: If8c135a822d581c3c5c4fca2936d501ccfd2e94c
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-09-25 15:19:29 +00:00
Andre Przywara e0dea671dc rpi4: Add initial documentation file
As the Raspberry Pi4 port is now in a usable state, add the build
instructions together with some background information to the
documentation directory.
The port differs quite a bit from the Raspberry Pi 3, so we use a
separate file for that.

Change-Id: I7d9f5967fdf3ec3bfe97d78141f59cbcf03388d4
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2019-09-25 11:45:35 +01:00
Paul Beesley 2966defa54 doc: Render Marvell platform documents
The documentation for Marvell platforms was not included in the
rendered document output until now because, while it was mostly
valid RST format, the files were saved with a .txt extension.

This patch corrects some RST formatting errors, creates a document
tree (index page) for the Marvell documents, and adds the Marvell
subtree to the main index.

Change-Id: Id7d4ac37eded636f8f62322a153e1e5f652ff51a
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-09-20 10:49:44 +00:00
Haojian Zhuang f8631f5139 drivers: partition: support different block size
The block size of some storage device is 4096-byte long, such as UFS. But
PARTITION_BLOCK_SIZE is defined as 512-byte long. So replace it by
PLAT_PARTITION_BLOCK_SIZE. Make it configurable in platform.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Change-Id: Iada05f7c646d0a0f2c0d3b8545540b3cb7153de3
2019-09-18 18:18:20 +08:00
Soby Mathew 6129e9a643 Merge "Refactor ARMv8.3 Pointer Authentication support code" into integration 2019-09-13 15:22:23 +00:00
Alexei Fedorov ed108b5605 Refactor ARMv8.3 Pointer Authentication support code
This patch provides the following features and makes modifications
listed below:
- Individual APIAKey key generation for each CPU.
- New key generation on every BL31 warm boot and TSP CPU On event.
- Per-CPU storage of APIAKey added in percpu_data[]
  of cpu_data structure.
- `plat_init_apiakey()` function replaced with `plat_init_apkey()`
  which returns 128-bit value and uses Generic timer physical counter
  value to increase the randomness of the generated key.
  The new function can be used for generation of all ARMv8.3-PAuth keys
- ARMv8.3-PAuth specific code placed in `lib\extensions\pauth`.
- New `pauth_init_enable_el1()` and `pauth_init_enable_el3()` functions
  generate, program and enable APIAKey_EL1 for EL1 and EL3 respectively;
  pauth_disable_el1()` and `pauth_disable_el3()` functions disable
  PAuth for EL1 and EL3 respectively;
  `pauth_load_bl31_apiakey()` loads saved per-CPU APIAKey_EL1 from
  cpu-data structure.
- Combined `save_gp_pauth_registers()` function replaces calls to
  `save_gp_registers()` and `pauth_context_save()`;
  `restore_gp_pauth_registers()` replaces `pauth_context_restore()`
  and `restore_gp_registers()` calls.
- `restore_gp_registers_eret()` function removed with corresponding
  code placed in `el3_exit()`.
- Fixed the issue when `pauth_t pauth_ctx` structure allocated space
  for 12 uint64_t PAuth registers instead of 10 by removal of macro
  CTX_PACGAKEY_END from `include/lib/el3_runtime/aarch64/context.h`
  and assigning its value to CTX_PAUTH_REGS_END.
- Use of MODE_SP_ELX and MODE_SP_EL0 macro definitions
  in `msr	spsel`  instruction instead of hard-coded values.
- Changes in documentation related to ARMv8.3-PAuth and ARMv8.5-BTI.

Change-Id: Id18b81cc46f52a783a7e6a09b9f149b6ce803211
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-09-13 14:11:59 +01:00
Soby Mathew c428fbaeab Merge changes from topic "jc/rsa-pkcs" into integration
* changes:
  Remove RSA PKCS#1 v1.5 support from cert_tool
  Add documentation for new KEY_SIZE option
  Add cert_create tool support for RSA key sizes
  Support larger RSA key sizes when using MBEDTLS
2019-09-13 12:00:59 +00:00
Justin Chadwell 6a415a508e Remove RSA PKCS#1 v1.5 support from cert_tool
Support for PKCS#1 v1.5 was deprecated in SHA 1001202 and fully removed
in SHA fe199e3, however, cert_tool is still able to generate
certificates in that form. This patch fully removes the ability for
cert_tool to generate these certificates.

Additionally, this patch also fixes a bug where the issuing certificate
was a RSA and the issued certificate was EcDSA. In this case, the issued
certificate would be signed using PKCS#1 v1.5 instead of RSAPSS per
PKCS#1 v2.1, preventing TF-A from verifying the image signatures. Now
that PKCS#1 v1.5 support is removed, all certificates that are signed
with RSA now use the more modern padding scheme.

Change-Id: Id87d7d915be594a1876a73080528d968e65c4e9a
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
2019-09-12 15:27:41 +01:00
Justin Chadwell f29213d9e3 Add documentation for new KEY_SIZE option
This patch adds documentation for the new KEY_SIZE build option that is
exposed by cert_create, and instructions on how to use it.

Change-Id: I09b9b052bfdeeaca837e0f0026e2b01144f2472c
Signed-off-by: Justin Chadwell <justin.chadwell@arm.com>
2019-09-12 15:27:41 +01:00