Commit graph

14637 commits

Author SHA1 Message Date
Yann Gautier
09d3fd1418 Merge "feat(qemu): enable FEAT_ECV when present" into integration 2024-04-23 09:58:54 +02:00
Jackson Cooper-Driver
9bf31a59d1 fix(tc): remove timer interrupt from G1S
TC3 and TC4 SCP makes use of the system timer interrupt as its own
timer. Previously, this timer was marked as a G1S interrupt which
routes the interrupt to the secure world and also enables it. This
causes spurious interrupts once the SCP has unmasked the interrupt in
the timer control itself.

Note that we move the inclusion of the timer interrupt from
CSS_G1S_INT_PROPS to CSS_G1S_IRQ_PROPS as the former is only used by TC.
This will also result in removing the timer interrupt from TC2. This is
not an issue as it does not make use of this interrupt in either the SCP
or AP.

Change-Id: I5cc88e2adffbc93fc3c9d9d41b5ba7235dbc39d9
Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-04-23 08:57:29 +01:00
Yann Gautier
4c77fac98d Merge "refactor(qemu): do not hardcode counter frequency" into integration 2024-04-23 09:18:16 +02:00
Madhukar Pappireddy
c4d80e7482 Merge "fix(cm): add more feature registers to EL1 context mgmt" into integration 2024-04-23 00:25:44 +02:00
Manish Pandey
9196add7fd Merge "docs(mte2): update docs" into integration 2024-04-22 17:40:43 +02:00
Marcin Juszkiewicz
5436047a0e refactor(qemu): do not hardcode counter frequency
From QEMU change:

> In previous versions of the Arm architecture, the frequency of the
> generic timers as reported in CNTFRQ_EL0 could be any IMPDEF value,
> and for QEMU we picked 62.5MHz, giving a timer tick period of 16ns.
> In Armv8.6, the architecture standardized this frequency to 1GHz.

This change stops TF-A from hardcoding 62.5MHz frequency. Instead value
stored in CNTFRQ_EL0 would be used. As a result we get 62.5MHz on older
cores and 1GHz on newer ones.

Change-Id: I7d414ce6d3708e598bbb5a6f79eb2d4ec8e15ac4
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
2024-04-22 17:33:36 +02:00
Govindraj Raja
c643188f18 docs(mte2): update docs
Add a section under release for capturing and populating
build options that are deprecated and removed.

Various fixes and refactor[1] led to removal of certain MTE
build options so capture this part in build-options docs.

[1]: https://review.trustedfirmware.org/q/topic:%22mte_fixes%22

Change-Id: I74a82f6f73f7f1dceea65a295ad2df60301ad838
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-04-22 17:04:26 +02:00
Leo Yan
07b576a445 refactor(fvp_r): remove duplicated macro definitions
The system counter macros are defined duplicatedly in the header file.
As the macros must be defined before arm_def.h, this patch removes the
redundant definitions afterwards.

Change-Id: Id74a8ef1b9cec4a978366b6db69981cfc30dffb6
Signed-off-by: Leo Yan <leo.yan@arm.com>
2024-04-22 15:35:48 +01:00
Tamas Ban
ccc717391f refactor(changelog): change all occurrences of RSS to RSE
Changes all occurrences of "RSS" and "rss" in the code and build files
to "RSE" and "rse".

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I66a6c87c158b14e18cba25ea6c6e0809e30008ca
2024-04-22 15:44:38 +02:00
Tamas Ban
59549e62cb refactor(qemu): change all occurrences of RSS to RSE
Changes all occurrences of "RSS" and "rss" in the code and build files
to "RSE" and "rse".

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I2c6840f6f3f2f8f64595a0e0aa6e12084a37ce6e
2024-04-22 15:44:38 +02:00
Tamas Ban
a822b8d82c refactor(fvp): change all occurrences of RSS to RSE
Changes all occurrences of "RSS" and "rss" in the code and build files
to "RSE" and "rse".

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I36b8e498f3226fc72d21634aae2cc9328d00711d
2024-04-22 15:44:38 +02:00
Tamas Ban
a11230ad00 refactor(fiptool): change all occurrences of RSS to RSE
Changes all occurrences of "RSS" and "rss" in the code and build files
to "RSE" and "rse".

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I8982c203375250d6c709a26f33fb88673d69da50
2024-04-22 15:44:38 +02:00
Tamas Ban
d797665cce refactor(psa): change all occurrences of RSS to RSE
Changes all occurrences of "RSS" and "rss" in the code and build files
to "RSE" and "rse".

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I606e2663fb3719edf6372d6ffa4f1982eef45994
2024-04-22 15:44:38 +02:00
Tamas Ban
47805037a2 refactor(fvp): remove leftovers from rss measured boot support
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I1687327e028c2baec1ac6f0ae21b42b6047ceac0
2024-04-22 15:44:38 +02:00
Tamas Ban
7f8589cdba refactor(tc): change all occurrences of RSS to RSE
Changes all occurrences of "RSS" and "rss" in the code and build files
to "RSE" and "rse".

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: Idec0bf7a90ae381f5bc968e1bb167daace24a11f
2024-04-22 15:44:38 +02:00
Tamas Ban
624c9a0b38 docs: change all occurrences of RSS to RSE
Changes all occurrences of "RSS" and "rss" in the documentation
to "RSE" and "rse".

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: Ia42078f5faa1db331b1e5a35f01faeaf1afacb5f
2024-04-22 15:44:38 +02:00
Tamas Ban
b8245368cc refactor(measured-boot): change all occurrences of RSS to RSE
Changes all occurrences of "RSS" and "rss" in the code and build files
to "RSE" and "rse".

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I8c2fcbdf1de1c75f9969d28bc15e0b3500071404
2024-04-22 15:44:38 +02:00
Tamas Ban
e249e56954 refactor(rse): change all occurrences of RSS to RSE
Changes all occurrences of "RSS" and "rss" in the code and build files
to "RSE" and "rse".

Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I9f72ad36ec233d7eaac3ce9e2f2b010130e1fa94
2024-04-22 15:44:38 +02:00
Tamas Ban
3857898f66 refactor(psa): rename all 'rss' files to 'rse'
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I379c471c541dda25d8ee9087fcf67e05b4204474
2024-04-22 15:44:38 +02:00
Tamas Ban
097e7d37e2 refactor(tc): rename all 'rss' files to 'rse'
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I264690e9bbc30be7ed7b8e4e165696494a67e00c
2024-04-22 15:44:38 +02:00
Tamas Ban
a5a5947a28 docs: rename all 'rss' files to 'rse'
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I93877ebeca1db6ee27dcb5446cc1f1a1e4e56775
2024-04-22 15:44:38 +02:00
Tamas Ban
024c49484d refactor(measured-boot): rename all 'rss' files to 'rse'
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I3bd987456ad0f5c7a003960dd543efad2ce668a8
2024-04-22 15:44:38 +02:00
Tamas Ban
955116982f refactor(rss): rename all 'rss' files to 'rse'
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I6cfca1d67e246d5079f683241021ed039cc27f74
2024-04-22 15:44:38 +02:00
Harrison Mutai
75093b726d docs(fconf): add TB_FW config bindings
Document bindings for TB_FW_CONFIG that are common between platforms.
Since the information this device tree type contains pertains to
firmware specific properties, we do not expect that the document will
cover all uses, nor do we promise backward compatiblity.

Change-Id: I0e850c13b77cc62940ab5020a15bf8e503568ed8
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2024-04-22 08:30:24 +00:00
Sandrine Bailleux
c540769349 docs(fvp): restructure FVP platform documentation
The Arm FVP documentation has grown organically over the years. As a
result, it has become a big document, which can be difficult to digest.

Also, the organization of some of the sections does not make sense. In
particular, all "Running on the ... FVP" sections live under a section
named "Booting a preloaded kernel image (Base FVP)". To illustrate this,
here is the current table of contents:

  Arm Fixed Virtual Platforms (FVP)
    Fixed Virtual Platform (FVP) Support
    Arm FVP Platform Specific Build Options
    Booting Firmware Update images
    Booting an EL3 payload
    Booting a preloaded kernel image (Base FVP)
      Obtaining the Flattened Device Treesp
      Running on the Foundation FVP with reset to BL1 entrypoint
      Running on the AEMv8 Base FVP with reset to BL1 entrypoint
      Running on the AEMv8 Base FVP (AArch32) with reset to BL1 entrypoint
      Running on the Cortex-A57-A53 Base FVP with reset to BL1 entrypoint
      Running on the Cortex-A32 Base FVP (AArch32) with reset to BL1 entrypoint
      Running on the AEMv8 Base FVP with reset to BL31 entrypoint
      Running on the AEMv8 Base FVP (AArch32) with reset to SP_MIN entrypoint
      Running on the Cortex-A57-A53 Base FVP with reset to BL31 entrypoint
      Running on the Cortex-A32 Base FVP (AArch32) with reset to SP_MIN entrypoint

This patch breaks down this document in sub-documents, which are now
included from the index file. The table of contents (ToC) reflects the
new documents hierarchy. The depth of the ToC has been reduced to
simplify the index page. Here is what it looks like now:

  Arm Fixed Virtual Platforms (FVP)
    Fixed Virtual Platform (FVP) Support
    Arm FVP Platform Specific Build Options
    Running on the Foundation FVP
    Running on the AEMv8 Base FVP
    Running on the Cortex-A57-A53 Base FVP
    Running on the Cortex-A32 Base FVP (AArch32)
    Booting Firmware Update images
    Booting an EL3 payload
    Booting a preloaded kernel image (Base FVP)

Apart from moving information around in separate files, this patch also
makes the following minor changes to the contents:

 - Add a brief introduction about FVPs in the index page.
 - Change some of the titles names for conciseness.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: Icb650e0ec2c7a86ccd6e7eea4e16a84c41442c96
2024-04-22 08:54:30 +01:00
Lauren Wehrmeister
9728f9915d Merge "docs(plat): remove TC1 entry from the deprecation table" into integration 2024-04-19 17:49:06 +02:00
Madhukar Pappireddy
d6c76e6c65 fix(cm): add more feature registers to EL1 context mgmt
The following system registers are made part of save and restore
operations for EL1 context:

TRFCR_EL1
SCXTNUM_EL0
SCXTNUM_EL1
GCSCR_EL1
GCSCRE0_EL1
GCSPR_EL1
GCSPR_EL0

Change-Id: I1077112bdc29a6c9cd39b9707d6cf10b95fa15e3
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2024-04-19 09:57:36 -05:00
Madhukar Pappireddy
eb69206f00 Merge "fix(spm): add device-regions used in tf-a-tests" into integration 2024-04-19 15:29:06 +02:00
Yann Gautier
85658c5695 Merge "fix(pmu): fix breakage on ARMv7 CPUs with SP_min as BL32" into integration 2024-04-19 14:04:52 +02:00
Soby Mathew
3c36d34e21 Merge "fix(gpt): declare gpt_tlbi_by_pa_ll()" into integration 2024-04-19 13:23:01 +02:00
Daniel Boulby
45716e377e fix(spm): add device-regions used in tf-a-tests
Device memory region specified in an SP manifest are now validated
against the device memory defined in the SPMC manifest. Therefore
we need to add the device memory used in the tf-a-tests to the SPMC
manifests.

Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: I47376e67c700705d12338d7078292618a15d5546
2024-04-19 11:56:12 +01:00
Soby Mathew
832e4ed520 fix(gpt): declare gpt_tlbi_by_pa_ll()
The patch 8754cc5 accidentally removes the declaration of
gpt_tlbi_by_pa_ll() and hence breaks RME builds. This patch
fixes the same.

signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I2523982fc48bca2a1f1a36fd9bd3803b01c6916a
2024-04-19 12:27:36 +02:00
Michal Simek
652c1ab152 fix(xilinx): check proc variable before use
Check return value from pm_get_proc() to make sure that CPU is valid.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Change-Id: If51b5d42ce87f31fd732ab58ae8fcd0e2db0a2a8
2024-04-19 12:20:09 +02:00
Manish V Badarkhe
4a20d5cb88 docs(plat): remove TC1 entry from the deprecation table
Since the TC1 platform has been eliminated from the TF-A source code
and CI script repository, updated the deprecation table to remove its
entry.

Change-Id: I93ae03e1f810666e9a6d0c6172a322ff1e960c71
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2024-04-19 11:18:44 +01:00
Soby Mathew
98f7b60ec6 Merge changes Ic40e1b7a,I0398b550,Ife594ed6,I3eb0f29b into integration
* changes:
  fix(gpt): unify logging messages
  chore(gpt): remove gpt_ prefix
  feat(aarch64): add functions for TLBI RPALOS
  feat(locks): add bitlock
2024-04-19 11:24:01 +02:00
Bipin Ravi
c833ca66a6 fix(cpus): workaround for Cortex-X4 erratum 2740089
Cortex-X4 erratum 2740089 is a Cat B erratum that applies to
all revisions <=r0p1 and is fixed in r0p2. The workaround is to
insert a dsb before the isb in the power down sequence.

SDEN documentation:
https://developer.arm.com/documentation/SDEN2432808/latest

Change-Id: I1d0fa4dd383437044a4467591f65a4a8514cabdc
Signed-off-by: Bipin Ravi <bipin.ravi@arm.com>
2024-04-18 13:39:25 -05:00
Lauren Wehrmeister
c8be7c08c3 Merge "fix(docs): typo in the romlib design" into integration 2024-04-18 16:16:30 +02:00
Manish V Badarkhe
4e06355a7b Merge "docs: decrease the minimum supported OpenSSL" into integration 2024-04-18 11:34:50 +02:00
Manish V Badarkhe
3b57ae23e0 fix(docs): typo in the romlib design
There's a typo in the romlib design document when referring to
the generator script. It should be romlib_generator.py instead
of romlib_generate.py so fixed this typo.

Change-Id: I6db7ee66b13c2b0b9d8511da7e0d1b058366281b
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2024-04-18 10:14:21 +01:00
Jean-Philippe Brucker
e769f830d3 feat(qemu): allow ARM_ARCH_MAJOR/MINOR override
An upcoming change to the RME support code will use atomic instructions
introduced in Armv8.1 in order to implement bitlocks. In order to do
this, the code needs to be built with appropriate -march compiler flag
(otherwise the assembler complains about invalid instructions). One way
to do this is specifying ARM_ARCH_MAJOR/MINOR version greater than 8.0,
which is what the main Makefile does when ENABLE_RME is set.

Allow the main Makefile to override the ARM_ARCH_MAJOR/MINOR variables
on the QEMU platform, so that it can also build the bitlock functions.

This only affects firmware built with ENABLE_RME, which is an
experimental feature both in TF-A and QEMU. The QEMU platform code
doesn't support booting an ENABLE_RME firmware on non-RME CPUs at the
moment.

As a result of this change, when ENABLE_RME is set,
make_helpers/arch_features.mk sets ENABLE_TRF_FOR_NS to 1, which needs
to be overridden by the QEMU Makefile.

Change-Id: I695fc98b21d07f6c84003d9e36a57cad2a3c806e
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
2024-04-18 10:05:25 +01:00
Mark Dykes
46d53216e7 Merge "fix: static checks on spmc dts" into integration 2024-04-17 20:12:44 +02:00
J-Alves
c35299d6b4 fix: static checks on spmc dts
Change the header of the license to have 2024, and
replace spaces for a tab.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: If98161ad35e1ead30e1e0d3ddb4cc6348e83d6ee
2024-04-17 14:59:36 +01:00
AlexeiFedorov
b99926ef7b fix(gpt): unify logging messages
This patch modifies GPT library comments and makes
logging messages consistent with PRIx64 usage and
TF-A format used in other modules.
Minor changes are made to make the code compliant
with MISRA C requirements.

Change-Id: Ic40e1b7ac43cd9602819698d00e1ce3a8c7183ce
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2024-04-17 14:00:16 +02:00
AlexeiFedorov
20e2683daf chore(gpt): remove gpt_ prefix
This patch removes 'gpt_' prefix from the
names of static functions for better code
readability.

Change-Id: I0398b55047a73209da598b708240fcba47c779f7
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2024-04-17 13:59:59 +02:00
AlexeiFedorov
8754cc5d1c feat(aarch64): add functions for TLBI RPALOS
This patch adds tlbirpalos_XYZ() functions to support
TLBI RPALOS instructions for the 4KB-512MB invalidation
range.

Change-Id: Ife594ed6c746d356b4b1fdf97001a0fe2b5e8cd0
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2024-04-17 12:59:04 +01:00
Donald Chan
c0c280dfda fix(cert-create): add guardrails around brainpool usage
OpenSSL has brainpool support only since version 1.1.0, make sure we
put a proper guardrail around it.

Change-Id: Ia2ee686904ed80699f77b1da953546ab7538ec37
Signed-off-by: Donald Chan <donachan@tesla.com>
2024-04-16 17:26:26 +02:00
Manish Pandey
e9398e46bc Merge "fix(gicv2): fix SGIR_NSATT bitshift" into integration 2024-04-16 15:57:03 +02:00
Manish Pandey
d3604b353e Merge changes from topic "lto-fixes" into integration
* changes:
  fix(bl1): add missing `__RW_{START,END}__` symbols
  fix(fvp): don't check MPIDRs with the power controller in BL1
  fix(arm): only expose `arm_bl2_dyn_cfg_init` to BL2
  fix(cm): hide `cm_init_context_by_index` from BL1
  fix(bl1): add missing spinlock dependency
2024-04-16 15:51:44 +02:00
Manish Pandey
145572914b Merge changes from topic "hm/handoff" into integration
* changes:
  refactor(fvp): reduce max size of HW_CONFIG to 16KB
  refactor(arm): replace hard-coded HW_CONFIG DT size
2024-04-16 15:51:13 +02:00
Harrison Mutai
1b86ec5b5d docs: decrease the minimum supported OpenSSL
Our code does not preclude the use of versions 1.0.x of OpenSSL.
Instead, we discourage it's use due to security concerns. Update the
documentation to reflect this.

Change-Id: I5c60907337f10b05d5c43b0384247c5d4135db50
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2024-04-16 13:46:57 +00:00