Commit Graph

943 Commits

Author SHA1 Message Date
Alexei Fedorov 9fc59639e6 Add support for Branch Target Identification
This patch adds the functionality needed for platforms to provide
Branch Target Identification (BTI) extension, introduced to AArch64
in Armv8.5-A by adding BTI instruction used to mark valid targets
for indirect branches. The patch sets new GP bit [50] to the stage 1
Translation Table Block and Page entries to denote guarded EL3 code
pages which will cause processor to trap instructions in protected
pages trying to perform an indirect branch to any instruction other
than BTI.
BTI feature is selected by BRANCH_PROTECTION option which supersedes
the previous ENABLE_PAUTH used for Armv8.3-A Pointer Authentication
and is disabled by default. Enabling BTI requires compiler support
and was tested with GCC versions 9.0.0, 9.0.1 and 10.0.0.
The assembly macros and helpers are modified to accommodate the BTI
instruction.
This is an experimental feature.
Note. The previous ENABLE_PAUTH build option to enable PAuth in EL3
is now made as an internal flag and BRANCH_PROTECTION flag should be
used instead to enable Pointer Authentication.
Note. USE_LIBROM=1 option is currently not supported.

Change-Id: Ifaf4438609b16647dc79468b70cd1f47a623362e
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-05-24 14:44:45 +01:00
Paul Beesley e1c5026ac7 doc: Use proper note and warning annotations
The documentation contains plenty of notes and warnings. Enable
special rendering of these blocks by converting the note prefix
into a .. note:: annotation.

Change-Id: I34e26ca6bf313d335672ab6c2645741900338822
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-22 11:28:17 +01:00
Paul Beesley f94102ba96 doc: Refactor contributor acknowledgements
- Make the list of contributors into an actual list
- Use note syntax for the note
- Remove the Individuals heading since there are none

This file could be considered for removal as it is a legacy
document, as its note explains.

Change-Id: Idf984bc192af7a0ec367a6642ab99ccccf5df1a8
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-22 11:28:17 +01:00
Paul Beesley a2c320a83e doc: Reorganise images and update links
Change-Id: I679d1499376a524bef1cfc33df995b0a719b5ac8
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-22 11:28:17 +01:00
Paul Beesley 29c0252959 doc: Set correct syntax highlighting style
Several code blocks do not specify a language for syntax
highlighting. This results in Sphinx using a default highlighter
which is Python.

This patch adds the correct language to each code block that doesn't
already specify it.

Change-Id: Icce1949aabfdc11a334a42d49edf55fa673cddc3
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-22 11:28:17 +01:00
Paul Beesley 8f62ca7b30 doc: Add minimal glossary
One of the current issues with the documentation is that terms and
abbreviations are frequently redefined. For example, we might have
a sentence like "... the SCP (System Control Processor) will ...".

These definitions might be repeated several times across pages, or
even within the same document. Equally, some of these abbreviations
are missed and are never expanded.

Sphinx provides a :term: keyword that takes some text and,
if that text is defined in a glossary document, links to its glossary
entry. Using this functionality will prevent repeated definitions
and will make the docs more maintainable by using a single
definition source.

The glossary added in this patch was created from a quick scrub of
the source code - there may be missing entries. The SDEI abbreviation
was used as an example.

Note that a global_substitutions file was created. This file contains
the RST 'replace' statements that convert plain text terms into linked
terms (by adding the ':term:' keyword to them). An example is:

.. |TF-A| replace:: :term:`TF-A`

The 'rst_prolog' variable in conf.py is used to inject this list of
replacements into each page. Terms must be surrounded with the pipe
character to be turned into links - this means that we can still
prevent certain terms from being linked if we don't want them to be.

Change-Id: I87010ed9cfa4a60011a9b4a431b98cb4bb7baa28
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-22 11:28:15 +01:00
Paul Beesley 57354abb20 doc: Remove per-page contents lists
These are no longer needed as there will always be a table of contents
rendered to the left of every page.

Some of these lists can be quite long and, when opening a page, the
reader sees nothing but a huge list of contents! After this patch,
the document contents are front-and-centre and the contents are
nicely rendered in the sidebar without duplication.

Change-Id: I444754d548ec91d00f2b04e861de8dde8856aa62
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-22 11:23:06 +01:00
Paul Beesley 267f8085f2 doc: Format security advisory titles and headings
Required so that the advisory documents are all valid RST files (with a
header) and that they all integrate into the document tree.

Change-Id: I68ca2b0b9e648e24b460deb772c471a38518da26
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-22 11:23:06 +01:00
Paul Beesley 24dba2b39f doc: Reformat platform port documents
The platform port documents are not very standardised right now and
they don't integrate properly into the document tree so:

1) Make sure each port has a proper name and title (incl. owner)
2) Correct use of headings, subheadings, etc in each port
3) Resolve any naming conflicts between documents

Change-Id: I4c2da6f57172b7f2af3512e766ae9ce3b840b50f
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-22 11:22:44 +01:00
Paul Beesley 83993177d9 doc: Normalise section numbering and headings
Required work to make all documents sit at the correct levels within
the document tree and any derived content like the table of contents
and the categories in the sidebar.

Change-Id: I4885fbe30864a87c8822ee67482b71fb46a8fbc6
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-22 11:20:39 +01:00
Paul Beesley 8aa050554b doc: Reword document titles
This patch attempts to standardise the document titles as well as
adding titles to documents that were missing one. The aim is to
remove needless references to "TF-A" or "Trusted Firmware" in the
title of every document and to make sure that the title matches
with the document content.

Change-Id: I9b93ccf43b5d57e8dc793a5311b8ed7c4dd245cc
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-22 11:20:39 +01:00
Paul Beesley 9f1622b018 doc: Move content out of readme and create new index page
Previously the readme.rst file served as the entrypoint for the
documentation. With a Sphinx build the top-level document is set
to be index.rst as it contains the primary document index.

This patch moves some content from readme.rst into index.rst and
splits the license information out into license.rst.

Change-Id: I5c50250b81136fe36aa9ceedaae302b44ec11e47
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-21 15:05:58 +01:00
Paul Beesley 40d553cfde doc: Move documents into subdirectories
This change creates the following directories under docs/
in order to provide a grouping for the content:

- components
- design
- getting_started
- perf
- process

In each of these directories an index.rst file is created
and this serves as an index / landing page for each of the
groups when the pages are compiled. Proper layout of the
top-level table of contents relies on this directory/index
structure.

Without this patch it is possible to build the documents
correctly with Sphinx but the output looks messy because
there is no overall hierarchy.

Change-Id: I3c9f4443ec98571a56a6edf775f2c8d74d7f429f
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-21 15:05:56 +01:00
Paul Beesley 653279b015 doc: Add minimal Sphinx support
Add the essentials for supporting a Sphinx documentation build:

- A makefile under docs/ to invoke Sphinx with the desired output
  format
- A Sphinx master configuration file (conf.py)
- A single, top-level index page (index.rst)
- The TF.org logo that is integrated in the the sidebar of the
  rendered output

Change-Id: I85e67e939658638337ca7972936a354878083a25
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-05-21 12:31:25 +01:00
Sandrine Bailleux b189a20613 Merge "Fix docs references to header files" into integration 2019-05-21 08:55:31 +00:00
John Tsichritzis ce8dc18773 Fix docs references to header files
Change-Id: I5c06e777d93ac653a853997c2b7c1c9d09b1e49c
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2019-05-21 09:38:11 +01:00
John Tsichritzis 532a67dd16 Update docs for FVP v11.6
Change-Id: I33c1bf49aa10867e1a2ca4c167112b99bf756dda
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2019-05-20 14:07:15 +01:00
kenny liang 3fa9dec43d Initialize platform for MediaTek mt8183
- Add basic platform setup
- Add generic CPU helper functions
- Add delay timer platform implementation
- Use TI 16550 uart driver

Change-Id: I1c29569c68fe9fca5e10e88a22a29690bab7141f
Signed-off-by: kenny liang <kenny.liang@mediatek.com>
2019-05-10 10:30:17 +08:00
Soby Mathew ac86469403 Merge "Fix RST rendering and other typos" into integration 2019-05-08 13:06:19 +00:00
John Tsichritzis 6d0512f5c1 Fix RST rendering and other typos
1) One space was missing from the indentation and, hence, rendering error
was generated in the user guide.
2) Partially reword Pointer Authentication related info.

Change-Id: Id5e65d419ec51dd7764f24d1b96b6c9942d63ba4
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2019-05-08 14:03:51 +01:00
Soby Mathew 0cdbd023e1 Merge changes from topic "sm/fix_a76_errata" into integration
* changes:
  Workaround for cortex-A76 errata 1286807
  Cortex-A76: workarounds for errata 1257314, 1262606, 1262888, 1275112
2019-05-07 14:31:25 +00:00
Soby Mathew e6e1d0ac16 Cortex-A76: workarounds for errata 1257314, 1262606, 1262888, 1275112
The workarounds for errata 1257314, 1262606, 1262888 and 1275112 are
added to the Cortex-A76 cpu specific file. The workarounds are disabled
by default and have to be explicitly enabled by the platform integrator.

Change-Id: I70474927374cb67725f829d159ddde9ac4edc343
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2019-05-07 13:46:47 +01:00
Soby Mathew 854ca7daf9 Merge "Add compile-time errors for HW_ASSISTED_COHERENCY flag" into integration 2019-05-03 13:35:38 +00:00
John Tsichritzis 076b5f02e2 Add compile-time errors for HW_ASSISTED_COHERENCY flag
This patch fixes this issue:
https://github.com/ARM-software/tf-issues/issues/660

The introduced changes are the following:

1) Some cores implement cache coherency maintenance operation on the
hardware level. For those cores, such as - but not only - the DynamIQ
cores, it is mandatory that TF-A is compiled with the
HW_ASSISTED_COHERENCY flag. If not, the core behaviour at runtime is
unpredictable. To prevent this, compile time checks have been added and
compilation errors are generated, if needed.

2) To enable this change for FVP, a logical separation has been done for
the core libraries. A system cannot contain cores of both groups, i.e.
cores that manage coherency on hardware and cores that don't do it. As
such, depending on the HW_ASSISTED_COHERENCY flag, FVP includes the
libraries only of the relevant cores.

3) The neoverse_e1.S file has been added to the FVP sources.

Change-Id: I787d15819b2add4ec0d238249e04bf0497dc12f3
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2019-05-03 14:23:55 +01:00
Christoph Müllner 9e4609f103 build_macros: Add mechanism to prevent bin generation.
On certain platforms it does not make sense to generate
TF-A binary images. For example a platform could make use of serveral
memory areas, which are non-continuous and the resulting binary
therefore would suffer from the padding-bytes.
Typically these platforms use the ELF image.

This patch introduces a variable DISABLE_BIN_GENERATION, which
can be set to '1' in the platform makefile to prevent the binary
generation.

Signed-off-by: Christoph Müllner <christophm30@gmail.com>
Change-Id: I62948e88bab685bb055fe6167d9660d14e604462
2019-05-02 12:27:19 +02:00
Soby Mathew 2916284377 Merge changes from topic "lm/stack_protector" into integration
* changes:
  juno: Add security sources for tsp-juno
  Add support for default stack-protector flag
2019-04-30 15:43:21 +00:00
Louis Mayencourt fd7b287cbe Add support for default stack-protector flag
The current stack-protector support is for none, "strong" or "all".
The default use of the flag enables the stack-protection to all
functions that declare a character array of eight bytes or more in
length on their stack.
This option can be tuned with the --param=ssp-buffer-size=N option.

Change-Id: I11ad9568187d58de1b962b8ae04edd1dc8578fb0
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-04-30 14:42:40 +01:00
Soby Mathew f15e7adb95 Merge changes from topic "avenger96" into integration
* changes:
  fdts: Fix DTC warnings for STM32MP1 platform
  docs: plat: stm32mp1: Document the usage of DTB_FILE_NAME variable
  stm32mp1: Add Avenger96 board support
2019-04-29 11:29:27 +00:00
Manivannan Sadhasivam f657fa99df
docs: plat: stm32mp1: Document the usage of DTB_FILE_NAME variable
Since STM32MP1 platform supports different boards, it is necessary
to build for a particular board. With the current instructions, the
user has to modify the DTB_FILE_NAME variable in platform.mk for
building for a particular board, but this can be avoided by passing
the appropriate board DTB name via DTB_FILE_NAME make variable.
Hence document the same in platform doc.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Change-Id: I16797e7256c7eb699a7b8846356fe430d0fe0aa1
2019-04-26 19:17:11 +05:30
Soby Mathew 8742f8574b Merge changes from topic "rk3288" into integration
* changes:
  rockchip: document platform
  rockchip: add support for rk3288
  rockchip: add common aarch32 support
  rockchip: rk3328: drop double declaration of entry_point storage
  rockchip: Allow socs with undefined wfe check bits
  rockchip: move pmusram assembler code to a aarch64 subdir
  sp_min: allow inclusion of a platform-specific linker script
  sp_min: make sp_min_warm_entrypoint public
  drivers: ti: uart: add a aarch32 variant
2019-04-26 12:42:44 +00:00
Heiko Stuebner 5561725107 rockchip: document platform
This adds a rockchip.rst to docs/plat documenting the general
approach to using the Rockchip ATF platforms together with the
supported bootloaders and also adds myself as maintainer after
making sure Tony Xie is ok with that.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: Idce53d15eff4ac6de05bbb35d86e57ed50d0cbb9
2019-04-25 13:37:56 +02:00
Sandrine Bailleux c1491ebaa7 Doc: Update link to TBBR-CLIENT specification
Change-Id: Iafa79b6f7891d3eebec9908a8f7725131202beb3
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2019-04-25 08:54:02 +01:00
Antonio Niño Díaz d87af648a2 Merge "Cortex A9: Fix typo in errata 794073 workaround" into integration 2019-04-23 13:01:20 +00:00
Yann Gautier 1989a19c2d stm32mp1: add OP-TEE support
Support booting OP-TEE as BL32 boot stage and secure runtime
service.

OP-TEE executes in internal RAM and uses a secure DDR area to store
the pager pagestore. Memory mapping and TZC are configured accordingly
prior OP-TEE boot. OP-TEE image is expected in OP-TEE v2 format where
a header file describes the effective boot images. This change
post processes header file content to get OP-TEE load addresses
and set OP-TEE boot arguments.

Change-Id: I02ef8b915e4be3e95b27029357d799d70e01cd44
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2019-04-23 13:34:12 +02:00
Louis Mayencourt b4e9ab9ce9 Cortex A9: Fix typo in errata 794073 workaround
Change-Id: I22568caf83b9846cd7b59241fcec34a395825399
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-04-18 12:11:25 +01:00
Louis Mayencourt 0e985d708e DSU: Implement workaround for errata 798953
Under certain near idle conditions, DSU may miss response transfers on
the ACE master or Peripheral port, leading to deadlock. This workaround
disables high-level clock gating of the DSU to prevent this.

Change-Id: I820911d61570bacb38dd325b3519bc8d12caa14b
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-04-17 13:46:43 +01:00
Louis Mayencourt cba71b70ef Cortex-A35: Implement workaround for errata 855472
Under specific conditions, the processor might issue an eviction and an
L2 cache clean operation to the interconnect in the wrong order. Set
the CPUACTLR.ENDCCASCI bit to 1 to avoid this.

Change-Id: Ide7393adeae04581fa70eb9173b742049fc3e050
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-04-17 13:46:43 +01:00
Antonio Niño Díaz 6cf7b2184b Merge "Cortex A9:errata 794073 workaround" into integration 2019-04-12 10:40:35 +00:00
Antonio Niño Díaz 72db70ca18 Merge changes from topic "av/tls-heap" into integration
* changes:
  Mbed TLS: Remove weak heap implementation
  sgm: Fix bl2 sources
2019-04-12 10:40:15 +00:00
Joel Hutton dd4cf2c745 Cortex A9:errata 794073 workaround
On Cortex A9 an errata can cause the processor to violate the rules for
speculative fetches when the MMU is off but branch prediction has not
been disabled. The workaround for this is to execute an Invalidate
Entire Branch Prediction Array (BPIALL) followed by a DSB.

see:http://arminfo.emea.arm.com/help/topic/com.arm.doc.uan0009d/UAN0009_cortex_a9_errata_r4.pdf
for more details.

Change-Id: I9146c1fa7563a79f4e15b6251617b9620a587c93
Signed-off-by: Joel Hutton <Joel.Hutton@arm.com>
2019-04-12 10:10:32 +00:00
Ambroise Vincent 2374ab1799 Mbed TLS: Remove weak heap implementation
The implementation of the heap function plat_get_mbedtls_heap() becomes
mandatory for platforms supporting TRUSTED_BOARD_BOOT.

The shared Mbed TLS heap default weak function implementation is
converted to a helper function get_mbedtls_heap_helper() which can be
used by the platforms for their own function implementation.

Change-Id: Ic8f2994e25e3d9fcd371a21ac459fdcafe07433e
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2019-04-12 09:52:52 +01:00
Paul Beesley 573b4cd226 doc: Clarify cert_create build when USE_TBBR_DEFS=0
The user guide documentation for the cert_create tool needs to
mention that a platform must have a platform_oid.h header file
in order to successfully build the cert_create tool when
USE_TBBR_DEFS is 0.

Change-Id: I77f86a022d207e88a79c97741be3eafbfa0c86f1
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-04-11 13:43:52 +01:00
Antonio Niño Díaz 01e7e0cadc Merge "Add support for Cortex-A76AE CPU" into integration 2019-04-09 09:21:51 +00:00
Alexei Fedorov 9ccc5a5733 Add support for Cortex-A76AE CPU
Change-Id: I0a81f4ea94d41245cd5150de341b51fc70babffe
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2019-04-08 14:48:55 +01:00
Joel Hutton 699475ac5c Document changes to auth-framework
The data structures in the auth-framework were changed by the previous
patch, and need to be updated.

Change-Id: Icfad2ac688d03d32aa93e45f930a375abbc164a9
Signed-off-by: Joel Hutton <Joel.Hutton@Arm.com>
2019-04-08 14:27:02 +01:00
Paul Beesley c48991e1fe doc: Fix heading levels for changelog
The change-log.rst file does not use the same symbols
as the other documents when organising its headings,
sub-headings and so on. In order to compile these
documents together with Sphinx, forming a top-level
index and a consistent structure, it is necessary to
normalise these.

Change-Id: Ib4620ff03a9e76fec9e36e95549016c7b3fe12bb
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-04-05 10:28:36 +01:00
Antonio Niño Díaz 18d4d113ec
Merge pull request #1918 from lmayencourt/lm/contrib_guidelines
doc: Update contribution guidelines
2019-04-03 11:20:38 +01:00
Louis Mayencourt 63fdda2d98 doc: Update contribution guidelines
Update the documentation for trustedfirmware.org migration

Change-Id: Ibb7052b0becbec3326164f1503806ca2c2fd4dcc
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
2019-04-02 16:19:11 +01:00
Remi Pommarel 9b5a8aa58d plat: gxl: Add documentation on building GXL image
Also adds a maintainer for GXL.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
2019-04-02 16:33:59 +02:00
Soby Mathew ee80da114b
Merge pull request #1911 from lmayencourt/lm/update_gcc
doc: Suggest to use the latest version of GCC 8.2
2019-03-29 10:53:57 +00:00