Commit Graph

6037 Commits

Author SHA1 Message Date
Sandrine Bailleux 9e7d66314a Refactor load_auth_image_internal().
The pre-processor directives make it hard to read the non-TBB version of
this function. Refactor the code to improve readability. No functional
change introduced.

In particular, introduce a new helper function load_image_flush(),
that simply loads an image and flushes it out to main memory. This is
the only thing load_auth_image_internal() needs to do when TBB is
disabled or when authentication is dynamically disabled.

In other cases, we need to recursively authenticate the parent images up
to the root of trust. To make this clearer, this code gets moved to a
TBB-specific helper function called load_auth_image_recursive().

As a result, load_auth_image_internal() now boils down to calling the
right helper function (depending on TBB enablement and dynamic
authentication status).

Change-Id: I20a39a3b833810b97ecf4219358e7d2cac263890
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2019-11-14 11:20:27 +01:00
Paul Beesley 1d2b41614c Merge changes I75799fd4,I4781dc6a into integration
* changes:
  n1sdp: update platform macros for dual-chip setup
  n1sdp: introduce platform information SDS region
2019-10-31 17:56:20 +00:00
Manish Pandey f91a8e4c2c n1sdp: update platform macros for dual-chip setup
N1SDP supports multichip configuration wherein n1sdp boards are
connected over high speed coherent CCIX link  for now only dual-chip is
supported.

A single instance of TF-A runs on master chip which should be aware of
slave chip's CPU and memory topology.

This patch updates platform macros to include remote chip's information
and also ensures that a single version of firmware works for both single
and dual-chip setup.

Change-Id: I75799fd46dc10527aa99585226099d836c21da70
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
2019-10-31 12:15:05 +00:00
Manish Pandey 34c7af41df n1sdp: introduce platform information SDS region
Platform information structure holds information about platform's DDR
size(local/remote) which will be used to zero out the memory before
enabling the ECC capability as well as information about multichip
setup. Multichip and remote DDR information can only be probed in SCP,
SDS region will be used by TF-A to get this information at boot up.

This patch introduces a new SDS to store platform information, which is
populated dynamically by SCP Firmware.previously used mem_info SDS is
also made part of this structure itself.

The platform information is also passed to BL33 by copying it to Non-
Secure SRAM.

Change-Id: I4781dc6a7232c3c0a3219b164d943ce9e3e469ee
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
2019-10-30 17:00:55 +00:00
Paul Beesley 5d71d3f624 Merge "doc: Fix syntax erros in I/O storage layer plantuml diagrams" into integration 2019-10-30 10:16:50 +00:00
Sandrine Bailleux cc76d670c1 Merge "ti: k3: common: Add PIE support" into integration 2019-10-29 15:13:41 +00:00
Andrew F. Davis ff835a9a9d ti: k3: common: Add PIE support
Running TF-A from non-standard location such as DRAM is useful for some
SRAM heavy use-cases. Allow the TF-A binary to be executed from an
arbitrary memory location.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Change-Id: Icd97926e4d97f37d7cde4a92758a52f57d569111
2019-10-29 14:27:11 +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
Alexei Fedorov a74e3a16b5 Merge "plat/arm: use Aff3 bits also to validate mpidr" into integration 2019-10-25 09:36:59 +00:00
Paul Beesley a04808c16c Merge "Update TF-A version to 2.2" into integration 2019-10-22 13:36:23 +00: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 0938473aa5 Merge "doc: Final, pre-release fixes and updates" into integration 2019-10-22 13:34:57 +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 0c2f6854cc Merge "doc: Expand contact information in About section" into integration 2019-10-22 08:01:35 +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
Paul Beesley 1f96d12868 Merge "doc: Move platform list to the Platform Ports index page" into integration 2019-10-22 07:59:47 +00:00
Paul Beesley 3a90b7c182 Merge "doc: Move "About" content from index.rst to a new chapter" into integration 2019-10-22 07:59:19 +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
Manish Pandey b30646a8f7 plat/arm: use Aff3 bits also to validate mpidr
There are some platforms which uses MPIDR Affinity level 3 for storing
extra affinity information e.g. N1SDP uses it for keeping chip id in a
multichip setup, for such platforms MPIDR validation should not fail.

This patch adds Aff3 bits also as part of mpidr validation mask, for
platforms which does not uses Aff3 will not have any impact as these
bits will be all zeros.

Change-Id: Ia8273972fa7948fdb11708308d0239d2dc4dfa85
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
2019-10-21 14:09:46 +01:00
Soby Mathew 937f669872 Merge "xlat_table_v2: Fix enable WARMBOOT_ENABLE_DCACHE_EARLY config" into integration 2019-10-21 12:10:16 +00:00
Soby Mathew 942bb52e99 Merge "Replace deprecated __ASSEMBLY__ macro with __ASSEMBLER__" into integration 2019-10-21 12:09:52 +00:00
Artsem Artsemenka 0e7a0540d7 xlat_table_v2: Fix enable WARMBOOT_ENABLE_DCACHE_EARLY config
The WARMBOOT_ENABLE_DCACHE_EARLY allows caches to be turned on early during
the boot. But the xlat_change_mem_attributes_ctx() API did not do the required
cache maintenance after the mmap tables are modified if
WARMBOOT_ENABLE_DCACHE_EARLY is enabled. This meant that when the caches are turned
off during power down, the tables in memory are accessed as part of cache
maintenance for power down, and the tables are not correct at this point which
results in a data abort.
This patch removes the optimization within xlat_change_mem_attributes_ctx()
when WARMBOOT_ENABLE_DCACHE_EARLY is enabled.

Signed-off-by: Artsem Artsemenka <artsem.artsemenka@arm.com>
Change-Id: I82de3decba87dd13e9856b5f3620a1c8571c8d87
2019-10-18 10:26:34 +01:00
Paul Beesley 879389edd6 Merge "Fix documentation" into integration 2019-10-18 08:38:23 +00:00
Paul Beesley b8f478b137 Merge "doc: Remove version and release variables from conf.py" into integration 2019-10-18 08:36:53 +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
Deepika Bhavnani 2ee6b2bc77 Update TF-A version to 2.2
Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com>
Change-Id: Ia03701e2e37e3a00a501b144960a4a65aedbfde9
2019-10-15 10:47:09 -05:00
Paul Beesley 19adcb415c Merge "Correct UART PL011 initialization calculation" into integration 2019-10-15 14:05:28 +00: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 7921fe6a76 Merge "doc: Misc syntax and spelling fixes" into integration 2019-10-11 12:52:56 +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
Balint Dobszay 89632e6aeb Replace deprecated __ASSEMBLY__ macro with __ASSEMBLER__
Change-Id: I497072575231730a216220f84a6d349a48eaf5e3
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
2019-10-11 14:12:24 +02:00
Paul Beesley 6f0c77f0c7 Merge "doc: Formatting fixes for readme.rst" into integration 2019-10-09 16:04:19 +00:00
Paul Beesley 76cf653b8a doc: Formatting fixes for readme.rst
The readme.rst file in the project root is the front-page that
is displayed on Github and if viewing the TF-A repository on
git.trustedfirmware.org in the "about" view. It now contains a
small amount of stub content, and directs readers to the
ReadTheDocs documentation via trustedfirmware.org/docs/tf-a.

The Github renderer is displaying the content fine but the cgit
viewer displays some "backlink" errors because some content
substitutions were left in place (terms surrounded by pipe
symbols), e.g. |TF-A|.

This patch removes those substitutions, that are not supported
by cgit, and also updates one heading to clarify where to find
the new docs.

Change-Id: I358451df45b8c99975ba0b6db8ea61253a10560d
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
2019-10-09 15:37:59 +00:00
Paul Beesley f8e3340c0e Merge changes from topic "pb/readthedocs" into integration
* changes:
  doc: Add guide for building the docs locally
  doc: De-duplicate readme and license files
  doc: Convert internal links to RST format
2019-10-09 13:51:22 +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
Soby Mathew 4fdad60c34 Merge "doc: Add more missing platforms" into integration 2019-10-08 12:59:24 +00:00
Soby Mathew 1d880258e1 Merge "delay: correct timeout_init_us()" into integration 2019-10-08 12:58:48 +00:00
Avinash Mehta 38d5e150ed Correct UART PL011 initialization calculation
Currently for Armv7 plaforms the quotient calculated in pl011
uart init code is moved to register r1.

This patch moves the quotient to register r2 as done for other
platforms in the udiv instruction. Value of register r2 is then
used to calculate the values for IBRD and FBRD register

Change-Id: Ie6622f9f0e6d634378b471df5d02823b492c8a24
Signed-off-by: Avinash Mehta <avinash.mehta@arm.com>
2019-10-08 13:58:25 +01:00
Yann Gautier 9d811b856e delay: correct timeout_init_us()
The function has to use read_cntpct_el0() to update the counter, and not
read_cntfrq_el0().

Change-Id: I9c676466e784c3122e9ffc2d87e66708797086e7
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2019-10-08 11:13:06 +02: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 80003d86a6 Merge "Explicitly disable the SPME bit in MDCR_EL3" into integration 2019-10-07 12:06:08 +00:00
Soby Mathew 25792ce443 Merge "Neoverse N1 Errata Workaround 1542419" into integration 2019-10-07 12:05:26 +00:00