Commit Graph

9724 Commits

Author SHA1 Message Date
Abhyuday Godhasara 0623dcea0f fix(plat/xilinx/versal): resolve misra R7.2
MISRA Violation: MISRA-C:2012 R.7.2
- A "u" or "U" suffix shall be applied to all integer constants that are
  represented in an unsigned type

Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Change-Id: Iaf6db75e42913ddceccb803426287d0c47d7f31d
2021-11-30 02:00:01 -08:00
Abhyuday Godhasara bc2637e379 fix(plat/xilinx/versal): resolve misra R15.7
MISRA Violation: MISRA-C:2012 R.15.7
- All if . . else if constructs shall be terminated with an else statement

Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Change-Id: Iea32e32b5683f7accd7fac8d557957f05ed0f5c5
2021-11-30 02:00:01 -08:00
Abhyuday Godhasara b9fa2d9fc1 fix(plat/xilinx/versal): resolve misra R15.6
MISRA Violation: MISRA-C:2012 R.15.6
- The body of an iteration-statement or a selection-statement shall be
  a compound statement

Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Change-Id: If1ccaa2f254ac85a329295de501e2b5558e8ff43
2021-11-30 02:00:01 -08:00
Abhyuday Godhasara 775bf1bbd3 fix(plat/xilinx/versal): resolve misra R10.1 in pm services
MISRA Violation: MISRA-C:2012 R.10.1
- Operands shall not be of an inappropriate essential type.

Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Change-Id: I67b5788054a136be8d764472c5d85528a5c4272f
2021-11-30 02:00:01 -08:00
Abhyuday Godhasara 5dada6227b fix(plat/xilinx/versal): resolve misra R20.7 in pm services
MISRA Violation: MISRA-C:2012 R.20.7
- Expressions resulting from the expansion of macro parameters shall be
  enclosed in parentheses

Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Change-Id: Id913c556cab955c798809ad2bd08ca3e48e2231a
2021-11-30 02:00:01 -08:00
Abhyuday Godhasara 5d1c211e22 fix(plat/xilinx/versal): resolve misra R10.3 in pm services
MISRA Violation: MISRA-C:2012 R.10.3
- The value of an expression shall not be assigned to an object with a
  narrower essential type or of a different essential type category

Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Change-Id: I73c056ff4df2f14e04c92a49ac5c97e578e82107
2021-11-30 02:00:01 -08:00
Abhyuday Godhasara fa98d7f2f8 fix(plat/xilinx/versal): resolve misra R10.6 in pm services
MISRA Violation: MISRA-C:2012 R.10.6
- The value of a composite expression shall not be assigned to an object
  with wider essential type.

Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Change-Id: I67ac6b6b4b643f57e76a435345540e241c9a88b9
2021-11-30 02:00:01 -08:00
Abhyuday Godhasara 27ae531088 fix(plat/xilinx/versal): resolve misra R16.3 in pm services
MISRA Violation: MISRA-C:2012 R.16.3
- An unconditional break statement shall terminate every switch-clause

Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Change-Id: I576b2c6eb7d1b7ef20440b9a616886ccf230b63e
2021-11-30 01:59:34 -08:00
Abhyuday Godhasara 4156719550 fix(plat/xilinx/versal): resolve misra R15.6 in pm services
MISRA Violation: MISRA-C:2012 R.15.6
- The body of an iteration-statement or a selection-statement shall be
  a compound statement

Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Change-Id: I82e924a77ee3afeb56fa18714e94cc4f6fff5a49
2021-11-30 01:54:51 -08:00
Olivier Deprez d605439900 Merge "docs(spm): update threat model with FF-A v1.1" into integration 2021-11-26 09:58:13 +01:00
Soby Mathew 2845a68703 Merge "fix(rmmd): preserve x4-x7 as per SMCCCv1.1" into integration 2021-11-24 18:49:18 +01:00
Soby Mathew 11578303fd fix(rmmd): preserve x4-x7 as per SMCCCv1.1
The RMI command handling in RMMD did not preserve x4 to x7 when
returning to NS caller. Although this is allowed for SMCCCv1.0, this is
not correct as per v1.1. This fixes the same by differentiating the
onward and backward path during SMC handling.

This patch also fixes an issue with the backward path wherein the first
argument was being truncated to 32 bits.

Change-Id: Ibc85d574d5a2178a763975ddb32e456a12e7dc88
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2021-11-24 19:26:51 +02:00
J-Alves 668ce500f9 docs(spm): update threat model with FF-A v1.1
Update SPM's threat model to contain threats related to notifications
feature, compliant with FF-A v1.1 spec.

Change-Id: I4a825be5dd14137a0d04d532adfe5343714794c5
Signed-off-by: J-Alves <joao.alves@arm.com>
2021-11-23 17:30:40 +00:00
Manish Pandey a1f02f4f3d Merge "docs(changelog): generate changelog" into integration 2021-11-23 14:14:26 +01:00
Manish V Badarkhe 63d2e96042 docs(changelog): generate changelog
For future reference, this changelog was generated with the following
command:

    npm run release -- --skip.commit --skip.tag --release-as 2.6.0

Change-Id: Idf6be5c3be15ddfdb1d32fafb9e0e4b399b269f3
Signed-off-by: Chris Kay <chris.kay@arm.com>
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2021-11-22 23:08:12 +00:00
Olivier Deprez f92b00187a Merge "docs(ff-a): update documentation of FF-A interfaces" into integration 2021-11-22 18:38:07 +01:00
Manish Pandey 5d26e27abc Merge changes from topic "ck/changelog" into integration
* changes:
  docs(changelog): categorize scopes
  docs(commit-style): add commit style documentation
  build(docs): introduce release script
  build(docs): add support for Markdown documentation
  build(hooks): add commitlint checks for trailers
  build(npm): add Standard Version v9.3.2
  build(npm): add additional package metadata
  build(npm): add license field
  build(npm): update Husky to v7.0.4
  build(npm): update commitlint to v14.1.0
  build(npm): update lockfile format to v2
  docs(prerequisites): update to Node.js v16
  build(docs): update Python dependencies
  build(docs): pin Python dependencies
2021-11-18 16:00:01 +01:00
J-Alves 16c1c45326 docs(ff-a): update documentation of FF-A interfaces
- Overview of FF-A v1.1 notifications feature, and list of all
the new related interface.
- FFA_RXTX_UNMAP now implemented, so provided description.
- FF-A v1.1 interfaces documented: FFA_SPM_ID_GET and
FFA_SECONDARY_EP_REGISTER.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: If40b4d2b2473f81ecfb2ddbf14852c3f10682867
2021-11-18 14:41:28 +00:00
Manish Pandey 7300434afc Merge "fix(drivers/gic600ae_fmu): fix timeout calculation" into integration 2021-11-18 15:25:14 +01:00
Manish Pandey b3e2b6e715 Merge "fix(docs): fix `FF-A` substitution" into integration 2021-11-18 14:07:08 +01:00
anzhou 7f322f228e fix(drivers/gic600ae_fmu): fix timeout calculation
The previous codes were using the cntpct_el0 to check the time
elapsed. But this physical timer does not seem to count for
the expected time resulting in gic fmu communication failures
on Tegra platforms.

This patch uses the delay_timer instead to use a platform
defined timer for calculating timeouts.

Change-Id: Ic8646ad1662c9928ac64c4152deb27e8c86fe344
Signed-off-by: Anthony Zhou <anzhou@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2021-11-18 13:36:50 +02:00
Sandrine Bailleux c0db39cefc Merge "fix(plat/arm): fix a VERBOSE trace" into integration 2021-11-18 10:28:20 +01:00
Chris Kay 953910b06a docs(changelog): categorize scopes
This change makes a best-effort attempt to categorize the various
Conventional Commits scopes that have been used over the past year into
their relevant changelog sections. No scopes were formalized for the
v2.5 release so it varies dramatically, but the output does not look
totally awful. Nonetheless, it will need some manual tweaking.

For every section with one or more potential scopes, the first scope
represents the "blessed" scope. That is, the scope that new commits that
belong to this category should use.

Change-Id: I8b5594a62238c4f392dc71b187e73c3da988e443
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:37 +00:00
Chris Kay 7d3b519372 docs(commit-style): add commit style documentation
This change adds a new documentation page describing the commit style,
acceptable Conventional Commits types and scopes, and documents the
process for expanding the list of scopes.

Change-Id: Iad957b67fa71a879e8aa0790c58a5b08cec300d6
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:37 +00:00
Chris Kay c4e8edab21 build(docs): introduce release script
This change introduces a new NPM run script to automatically generate
the release changelog, as well as bump version numbers across the
code-base and create the release tag.

This script runs [Standard Version] to execute this, which is a tool
designed around automating substantial parts of the release process.
This can be done by running:

    npm run release -- [<standard-version args>]

Standard Version expects the project to adhere to the [Semantic
Versioning] convention which TF-A does not, so you may need to specify
the version manually, e.g.:

    npm run release -- --release-as 2.6.0

Individual steps of the release process may also be skipped at-will,
which may be necessary when, for example, tweaking the changelog:

    npm run release -- --skip.commit --skip.tag

Standard Version is configured by the `.versionrc.js` file, which
contains information about the Conventional Commits types and scopes
used by the project, and how they map to the changelog.

To maintain continuity with the existing changelog style - at least to
the extent possible in the move from manual to automatic creation - a
customized changelog template has been introduced, based on the
Conventional Commits template provided by Standard Version.

This template package extends the Conventional Commits template package
by introducing support for parsing the Conventional Commits scopes into
changelog sections, similarly to how they were previously organized.

[Standard Version]:
https://github.com/conventional-changelog/standard-version
[Semantic Versioning]: https://semver.org

Change-Id: I5bafa512daedc631baae951651c38c1c62046b0a
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:37 +00:00
Chris Kay c76556a017 build(docs): add support for Markdown documentation
This changes adds support for building Markdown documentation into
Sphinx with [MyST]. We'll make use of this in a later patch, where we
introduce automatically-generated Markdown documentation that needs to
be compiled as part of the Sphinx documentation.

[MyST]: https://myst-parser.readthedocs.io/en/latest

Change-Id: I2a241a588c579fac1a81e1853479908928be1fc8
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:36 +00:00
Chris Kay fa3a13824a build(hooks): add commitlint checks for trailers
This change adds checks for the `Change-Id` and `Signed-off-by`
trailers. These are already required by Gerrit, so they have been
configured as warnings as an early heads-up after committing without
needing to push.

This also renames the commitlint configuration file to align it with
the style used by Standard Version when it's eventually introduced:

    `commitlint.config.js` -> `.commitlintrc.js`

Change-Id: I4e3c158e6b3a5407fabd873360d5efce86ebd19e
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:36 +00:00
Chris Kay dc59d726e7 build(npm): add Standard Version v9.3.2
This tool is used to generate changelogs, tag repositories and bump
version numbers across the code-base. In preparation for the v2.6.0
release of TF-A, we will be incorporating it into our release workflow,
with the hope that it can reduce some of the workload involved going
forward.

After this change our dependency license situation is as follows:

```
$ license-checker --summary
├─ MIT: 249
├─ ISC: 43
├─ Apache-2.0: 6
├─ BSD-2-Clause: 3
├─ (MIT OR CC0-1.0): 3
├─ BSD-3-Clause: 2
├─ 0BSD: 2
├─ (MIT OR Apache-2.0): 1
├─ BSD*: 1
├─ CC-BY-3.0: 1
└─ CC0-1.0: 1
```

Change-Id: Ie41443045ecff22f322d155a4bed8ab5d92208cd
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:36 +00:00
Chris Kay 3a43e6dee4 build(npm): add additional package metadata
Introduces the `name` and `version` fields to the NPM package metadata
file, which are used by Standard Version.

Change-Id: I5266465f746bf29805f36cd94b5e5c20417d7fd0
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:36 +00:00
Chris Kay 6558d8e452 build(npm): add license field
This change adds the `license` field to our `package.json` file, which
allows some license checking tools to analyze our dependencies for
license incompatibilities.

The current state of our licensed dependencies is as follows:

```
$ license-checker --summary
├─ MIT: 198
├─ ISC: 31
├─ Apache-2.0: 5
├─ (MIT OR CC0-1.0): 3
├─ BSD-3-Clause: 2
├─ BSD-2-Clause: 2
├─ 0BSD: 2
├─ (MIT OR Apache-2.0): 1
├─ CC-BY-3.0: 1
└─ CC0-1.0: 1
```

Change-Id: I7b9dae1c9f732c7f7491b5d6557dd193b894d70c
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:36 +00:00
Chris Kay 3ea076e2e0 build(npm): update Husky to v7.0.4
Change-Id: I708ac9af9311c23b107041b3fc7f1773a83b36c4
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:35 +00:00
Chris Kay 67b29a0861 build(npm): update commitlint to v14.1.0
Change-Id: Ied1362e9bac4121fd1512e7dbd847b70458f7b98
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:35 +00:00
Chris Kay b0ea465344 build(npm): update lockfile format to v2
NPM v7, which is included with Node.js v16, uses version 2 of the
lockfile format. To avoid its complaints about the old lockfile version,
we're updating the lockfile. This change is backwards-compatible with
older versions of NPM.

Change-Id: I411ec29ea60ef9a616b99ddb52243fac2b305d28
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:35 +00:00
Chris Kay 35cc497d0a docs(prerequisites): update to Node.js v16
Updates the Node.js version installed by the prerequisite instructions
from v14 to v16, which is the latest LTS release.

The instructions for installing the Node Version Manager (NVM) have
also been updated for v0.39.0 (previously v0.38.0).

Change-Id: I85528b3906305914ba6169b4dc5aafcf5b36a339
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:35 +00:00
Chris Kay 2167c02d65 build(docs): update Python dependencies
Updates the Python dependencies used to build the project's Sphinx
documentation to their latest versions.

Change-Id: I8baee89c85179a667a3850a7b9705ab76f4d702a
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:35 +00:00
Chris Kay a61940ca73 fix(docs): fix `FF-A` substitution
In this change the `FFA` substitution has been renamed to `FF-A`, as
well as the term it substitutes to - the `FFA` term does not exist.

Change-Id: I0c33d00d82a5498f7088e6a2b088a0006dfe7f65
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:34 +00:00
Chris Kay a539c77185 build(docs): pin Python dependencies
Recently some of our dependencies' dependencies have come into conflict
and are now causing errors when trying to install the Python
requirements. This change introduces `requirements.in` - a list of our
own direct dependencies, and pins them to specific versions.

The existing `requirements.txt` file is now automatically generated by
the `pip-compile` tool - part of the pip-tools package - and ensures
that our dependency tree is also pinned. This is a manual process at
present, but our dependencies are updated infrequently enough that it's
not introducing any major overhead.

Change-Id: I3cd0c11a1a4eccaf0d77b538cfdb94474833b811
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-11-17 16:04:34 +00:00
Manish Pandey 637fd777bc Merge "fix(rme): fixes a shift by 64 bits bug in the RME GPT library" into integration 2021-11-17 16:30:33 +01:00
Olivier Deprez 095342d3e4 Merge "docs(spm): document s-el0 partition support" into integration 2021-11-17 13:54:04 +01:00
Sandrine Bailleux 5869ebd0e8 fix(plat/arm): fix a VERBOSE trace
When the console verbosity is at maximum, fconf_populate_arm_sp()
prints the UUID and load address of each secure partition. However,
the load address has not been retrieved yet at this point, which means
all partitions show a zero load address.

Move the trace after we have retrieved the SP's load address from the
device tree to make it more meaningful.

Change-Id: I58ef7df6c9107a433f61113cafd8f0855c468d40
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2021-11-17 08:40:49 +01:00
Manish Pandey d5c70fa9f9 Merge "fix(spm_mm): do not compile if SVE/SME is enabled" into integration 2021-11-16 23:30:55 +01:00
johpow01 322b344e30 fix(rme): fixes a shift by 64 bits bug in the RME GPT library
Under certain configurations of PPS and L0GPTSZ a macro could result in
a right shift by 64 bits. This patch removes that possibility by
limiting the total size of each shift to the maximum width of the L0 or
L1 index field in a physical address. In addition, it adds more detail
about how these values are calculated.

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: Ie71c8e6f922a5bb522a6169701bfc36fc99f765a
2021-11-16 17:41:43 +01:00
Manish Pandey 4333f95bed fix(spm_mm): do not compile if SVE/SME is enabled
As spm_mm cannot handle SVE/SME usage in NS world so its better to give
compilation error when ENABLE_SVE_FOR_NS=1 or ENABLE_SME_FOR_NS=1.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I69dbb272ca681bb020501342008eda20d4c0b096
2021-11-16 16:06:33 +00:00
Manish Pandey 55b2e6f0d3 Merge changes I9e6feeee,If1cd7962 into integration
* changes:
  docs(rme): add description of TF-A changes for RME
  docs(gpt): add documentation page for GPT library
2021-11-16 11:53:24 +01:00
Zelalem Aweke 7446c266c9 docs(rme): add description of TF-A changes for RME
This patch expands the RME documentation with description of TF-A
changes for RME. It also modifies some other parts of TF-A documentation
to account for RME changes.

Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com>
Change-Id: I9e6feeee235f0ba4b767d239f15840f1e0c540bb
2021-11-15 22:20:07 +01:00
johpow01 6ee92598cf docs(gpt): add documentation page for GPT library
This patch adds some documentation for the GPT library as well as adds
code owners for it.

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: If1cd79626eadb27e1024d731b26ee2e20af74a66
2021-11-15 23:17:04 +02:00
Manish Pandey 3015267f60 Merge "feat(sme): enable SME functionality" into integration 2021-11-12 19:51:42 +01:00
johpow01 dc78e62d80 feat(sme): enable SME functionality
This patch adds two new compile time options to enable SME in TF-A:
ENABLE_SME_FOR_NS and ENABLE_SME_FOR_SWD for use in non-secure and
secure worlds respectively. Setting ENABLE_SME_FOR_NS=1 will enable
SME for non-secure worlds and trap SME, SVE, and FPU/SIMD instructions
in secure context. Setting ENABLE_SME_FOR_SWD=1 will disable these
traps, but support for SME context management does not yet exist in
SPM so building with SPD=spmd will fail.

The existing ENABLE_SVE_FOR_NS and ENABLE_SVE_FOR_SWD options cannot
be used with SME as it is a superset of SVE and will enable SVE and
FPU/SIMD along with SME.

Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: Iaaac9d22fe37b4a92315207891da848a8fd0ed73
2021-11-12 10:38:00 -06:00
Manish Pandey 2242773ddb Merge "fix: use correct printf format for uint64_t" into integration 2021-11-12 15:01:00 +01:00
Manish Pandey 4ef449c15a fix: use correct printf format for uint64_t
sha 4ce3e99a3 introduced printf format specifiers for fixed width
types, which uses PRI*64 instead of "ll" for 64 bit values.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ic6811cc1788c698adde0807e5f8ab5290a900a26
2021-11-12 13:02:02 +00:00