Commit graph

14124 commits

Author SHA1 Message Date
Arunachalam Ganapathy
0686a01b0c feat(arm): add trusty_sp_fw_config build option
Also increase add PLAT_ARM_SP_MAX_SIZE to override the default
ARM_SP_MAX_SIZE to support Trusty image and move OPTEE_SP_FW_CONFIG
documentation to build-internals.rst as it's not externally set-able.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ief90ae9113d32265ee2200f35f3e517b7b9a4bea
2024-02-23 16:11:47 +00:00
Davidson K
fc42f84560 fix(tc): do not enable MPMM and Aux AMU counters always
There are requirements in which the MPMM and Auxiliary AMU counters have
to be disabled. Hence removing the "override" here which helps in
disabling them during the build.

Change-Id: I2c0a808d5d9968082a508a9206e34f7a57f2e33a
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
2024-02-23 16:11:46 +00:00
Boyan Karatotev
d2e44e7d71 fix(tc): correct interrupts
The gic and trbe0 are listed as active high, but the spec says they are
triggered on active low. Correct according to the spec.

While we're at it, convert all interrupts to use the macros so hopefully
no such confusion happens again.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I2fc01cf0a34b031b95219b9656b613a19a2e9b2a
2024-02-23 16:11:46 +00:00
Kshitij Sisodia
2c406ddaf7 feat(tc): interrupt numbers for smmu_700
Interrupt numbers definitions and names added to `smmu_700`
node.

Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Change-Id: Iee0b5e854e5516fce13315c1e6ad5bb2a55246ec
2024-02-23 16:11:46 +00:00
Ben Horgan
127eabeddf feat(tc): enable gpu/dpu scmi power domain and also gpu perf domain
The scmi-perf-domain property is a custom property while we
wait for proper support in the kernel for using the scmi_pm_domain
driver and scmi_perf_domain driver at the same time.

GPU operating points are now in the SCP firmware.

Change-Id: Ib6d8f52c8bf69194b1d2da4e065a34c4a341c221
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
2024-02-23 16:11:46 +00:00
Olivier Deprez
885e93f907 Merge "fix(cm): update gic el2 sysregs save/restore mechanism" into integration 2024-02-22 11:58:43 +01:00
Olivier Deprez
81f0f8c3a9 Merge changes from topic "jc/el1_ctx_optimization" into integration
* changes:
  refactor(context-mgmt): remove el1_context routines from RMM
  refactor(context-mgmt): move EL1 save/restore routines into C
2024-02-22 11:57:57 +01:00
Jayanth Dodderi Chidanand
e58daa663b refactor(context-mgmt): remove el1_context routines from RMM
This is an effort to optimise the unused members in the cpu_context_t
structure. TF-A statically allocates memory for context entry for
each wolrd per PE. Some of the members in this struct are not used
for all the build combinations.

RMM in particular, is not using this context member and henceforth
removing them.

Change-Id: Ia5bf9c8dfef6e856ba6d88fa678876c704d42858
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2024-02-22 10:34:52 +00:00
Jayanth Dodderi Chidanand
59f8882b44 refactor(context-mgmt): move EL1 save/restore routines into C
Similar to the refactoring process followed for EL2 system registers,
moving the save and restore routines of EL1 system registers into C
file, thereby reducing assembly code.

Change-Id: Ib59fbbe2eef2aa815effe854cf962fc4ac62a2ae
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2024-02-22 10:34:40 +00:00
Mark Dykes
805de116e0 Merge "build: correct minor toolchain documentation error" into integration 2024-02-21 17:10:09 +01:00
Madhukar Pappireddy
c9f097ec68 Merge "chore(ufs): refactor ufs_get_device_info" into integration 2024-02-21 16:37:37 +01:00
Chris Kay
1c0d025249 build: correct minor toolchain documentation error
Default values for toolchain tools are instead provided by the main
toolchain makefile, rather than a parent makefile. This was an oversight
from a previous version of the original toolchain refactor patch.

Change-Id: I75752ed7874b36e1c679d94292a2664e234c484b
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-02-21 14:06:03 +00:00
Lauren Wehrmeister
64e3efe72b Merge "docs(threat_model): mark power analysis threats out-of-scope" into integration 2024-02-20 17:04:03 +01:00
Mark Dykes
ef68521971 Merge "build: use toolchain identifiers in conditions" into integration 2024-02-20 16:06:52 +01:00
Mark Dykes
60dd8069bf Merge "build: use new toolchain variables for tools" into integration 2024-02-20 16:06:35 +01:00
Mark Dykes
084c9d3c0d Merge "build: refactor toolchain detection" into integration 2024-02-20 16:04:53 +01:00
Madhukar Pappireddy
e2c7934093 Merge "fix(imx8mp): uncondtionally enable only the USB power domain" into integration 2024-02-20 14:40:06 +01:00
Rohit Ner
74ac476c17 chore(ufs): refactor ufs_get_device_info
Use dedicated function to read device descriptor

Signed-off-by: Rohit Ner <rohitner@google.com>
Change-Id: Ifb90659db7789f33a2b7b01e6eab049395b7fc52
2024-02-20 02:19:19 -08:00
Manish Pandey
50cd7484cc Merge "fix(bl2): make BL2 SRAM footprint flexible" into integration 2024-02-19 15:43:33 +01:00
Manish Pandey
b11d8b824b Merge "docs(sdei): provide security guidelines when using SDEI" into integration 2024-02-19 12:13:03 +01:00
Manish V Badarkhe
1c9acfba9e Merge "test(fvp): remove FVP_Foundation model support" into integration 2024-02-19 11:44:16 +01:00
Olivier Deprez
02d82ffa5b Merge "fix(el3-spmc): fix dangling pointer in FFA_CONSOLE_LOG" into integration 2024-02-19 09:57:31 +01:00
Olivier Deprez
02088b64f3 Merge changes from topic "mb/tc-model-update" into integration
* changes:
  docs: update FVP TC2 model version and build (11.23/17)
  fix(tc): increase BL2 maximum size limit
  refactor(tc): update platform tests
  feat(rss): add defines for 'type' range and use them in psa_call()
  feat(rss): adjust parameter packing to match TF-M changes
  refactor(tc): remap console logs
2024-02-15 16:57:33 +01:00
Manish Pandey
937d6fdb70 fix(cm): update gic el2 sysregs save/restore mechanism
This patch does following two changes
- Create a separate routine for saving/restoring GIC el2 system registers
- To access ICC_SRE_EL2 register there was a workaround to set
  SCR_EL3.NS before accessing it. This was required because SCR_EL3.EEL2
  was zero. But with commit f105dd5fa this bit has been set to one early
  on in booting process for a system with FEAT_SEL2 present and S-EL2
  enabled.
  However, we still need the workaround for a system which needs
  save/restore of EL2 registers without secure EL2 being enabled e.g.
  system with Non-secure and Realm world present.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I8d55c3dc6a17c4749748822d4a738912c1e13298
2024-02-15 15:56:42 +00:00
Manish Pandey
3e95bea5ec docs(sdei): provide security guidelines when using SDEI
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: Ic27bdc88186f6805adee2f452503856e213a4710
2024-02-15 15:37:00 +00:00
Karl Meakin
83129bcd8e fix(el3-spmc): fix dangling pointer in FFA_CONSOLE_LOG
Fixes a dangling pointer bug in `spmc_ffa_console_log`.
`chars` was assigned to an array which went out of scope at the end of
the `if`/`else` block.

The solution is to `memcmpy` from the temporary array into `chars`,
which is now an array.

Signed-off-by: Karl Meakin <karl.meakin@arm.com>
Change-Id: I67d19ea25d09b72f38fcc67dab4acf449aa8f1b1
2024-02-14 17:53:24 +00:00
Manish V Badarkhe
077d8b39bc docs(threat_model): mark power analysis threats out-of-scope
Exclude the threat of power analysis side-channel attacks
from consideration in the TF-A generic threat model.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I5b245f33609fe8948e473ce4484898db5ff8db4d
2024-02-14 14:18:16 +00:00
Manish V Badarkhe
514d022fda Merge changes from topic "DPE" into integration
* changes:
  feat(tc): add RSS SDS region right after SCMI payload
  refactor(n1sdp): update SDS driver calls
  refactor(morello): update SDS driver calls
  refactor(juno): update SDS driver calls
  refactor(sgi): update SDS driver calls
  refactor(css): support multiple SDS regions
2024-02-14 10:34:19 +01:00
Harrison Mutai
e0e03a8d8b fix(bl2): make BL2 SRAM footprint flexible
On FVP's the default SRAM size is severly restrictive. However, more
recent models support larger SRAM configurations (> 256 Kb). We
introduced the flag FVP_TRUSTED_SRAM_SIZE to allow for TF to handle
different configurations.

BL31 automatically benefits from this optimisation since it starts from
the bottom of shared memory, and runs up to the end of SRAM. Increase
the size of all BL2 builds in proportion to FVP_TRUSTED_SRAM_SIZE so
that BL2 covers around a third of SRAM.

Change-Id: Idf37e8cb86507ea44b97ac8b3b90fffefe13f57a
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2024-02-13 15:36:40 +00:00
Manish V Badarkhe
a67030c4e9 docs: update FVP TC2 model version and build (11.23/17)
Update the FVP TC2 model version and build (11.23/17) to match
the version used for testing in TF-A OpenCI.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: Ic7411ee4863428b7dfbe43cf39abfc2269f3c3ae
2024-02-13 15:03:01 +00:00
Manish V Badarkhe
19258a5839 fix(tc): increase BL2 maximum size limit
Increase the size of BL2 to build TC2 with GPT support enabled
and a config modification of mbedTLS.

Change-Id: I6d2f466144f2bbffd3387bc40bc86ab733febce1
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2024-02-13 15:03:01 +00:00
David Vincze
a93bf0aaca refactor(tc): update platform tests
Update the TC's platform test Makefile and related common definitions
to correspond to newer TF-M code (commit hash: 4ab7a20).

Change-Id: I6ef3effe194a780a0533f9c0c2eab9d0f4efc1fc
Signed-off-by: David Vincze <david.vincze@arm.com>
2024-02-13 15:03:01 +00:00
David Vincze
002b10604b feat(rss): add defines for 'type' range and use them in psa_call()
Update the 'type' parameter checking according to changes
on RSS's (TF-M) side: 40b09ba1 [1]

[1]: https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/commit/?id=40b09ba1e4a7a4f726f98700eab7e4e4d8e95dcf

Change-Id: I8487e8ab24aa2dd080b5bb8f2f5c7e8fc15cf211
Signed-off-by: David Vincze <david.vincze@arm.com>
2024-02-13 15:03:01 +00:00
David Vincze
5abcc83991 feat(rss): adjust parameter packing to match TF-M changes
Adjust the parameter packing scheme in RSS communication
to align with changes made in TF-M: 3be6c395 [1]

[1]: https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/commit/?id=3be6c3954b94f000cdcf7575bd4c18f57b3492f8

Change-Id: Ief38f96ab991d1125b37adfced5ffafc39e754a0
Signed-off-by: David Vincze <david.vincze@arm.com>
2024-02-13 15:02:57 +00:00
annsai01
77241043d2 refactor(tc): remap console logs
Remap TF-A console logs from SoC UART2 (S1 terminal) to CSS
secure (UART1_AP terminal) and Linux logs from SoC UART2
(S1 terminal) to CSS non-secure (UART_AP terminal) to align
with the latest FVP TC2 model (version 11.23/17).

Change-Id: I7206e64b65346bfdcc48d6acd3792b436041e45f
Signed-off-by: Annam Sai Manisha <annam.saimanisha@arm.com>
2024-02-13 14:57:15 +00:00
Tamas Ban
6f503e0eea feat(tc): add RSS SDS region right after SCMI payload
Add a second SDS region on the TC platform for communication with RSS.
RSS needs to share data with AP during early boot over shared memory
to support DPE. Reserve a memory region right after the SCMI secure
payload areas from unused memory.

Change-Id: I3a3a6ea5ce76531595c88754418602133a283c42
Signed-off-by: David Vincze <david.vincze@arm.com>
2024-02-13 14:36:14 +01:00
Tamas Ban
0f37ae1373 refactor(n1sdp): update SDS driver calls
Update SDS driver calls to align with recent
changes [1] of the SDS driver.

- The driver now requires us to explicitly pass
  the SDS region id to act on.
- Implement plat_sds_get_regions() platform function
  which is used by the driver to get SDS region
  information per platform.

[1]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/24609/

Change-Id: I3447855fbe7427376d5f7aa0ba7356fe2f14d567
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Signed-off-by: David Vincze <david.vincze@arm.com>
2024-02-13 14:36:14 +01:00
Tamas Ban
48d42ed5a4 refactor(morello): update SDS driver calls
Update SDS driver calls to align with recent
changes [1] of the SDS driver.

- The driver now requires us to explicitly pass
  the SDS region id to act on.
- Implement plat_sds_get_regions() platform function
  which is used by the driver to get SDS region
  information per platform.

[1]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/24609/

Change-Id: I942599edb4d9734c0455f67c6b5673aace62e444
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Signed-off-by: David Vincze <david.vincze@arm.com>
2024-02-13 14:36:14 +01:00
Tamas Ban
fdcd54132b refactor(juno): update SDS driver calls
Update SDS driver calls to align with recent
changes [1] of the SDS driver.

- The driver now requires us to explicitly pass
  the SDS region id to act on.
- Implement plat_sds_get_regions() platform function
  which is used by the driver to get SDS region
  information per platform.

[1]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/24609/

Change-Id: I67aebfe0e2a82d1f5fc2d26653698a552350b387
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Signed-off-by: David Vincze <david.vincze@arm.com>
2024-02-13 14:36:14 +01:00
Tamas Ban
21b35eee9b refactor(sgi): update SDS driver calls
Update SDS driver calls to align with recent
changes [1] of the SDS driver.

- The driver now requires us to explicitly pass
  the SDS region id to act on.
- Implement plat_sds_get_regions() platform function
  which is used by the driver to get SDS region
  information per platform.

[1]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/24609/

Change-Id: Ifa4595278e094849bea2796ead58e85de98baaf9
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Signed-off-by: David Vincze <david.vincze@arm.com>
2024-02-13 14:36:14 +01:00
Tamas Ban
8d1a04bd37 refactor(css): support multiple SDS regions
Extend the SDS driver to be able to handle multiple
SDS regions:
 - AP-SCP
 - AP-RSS

Change-Id: Id303840b248c383b3f960227cbf6333d1cc75e65
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Signed-off-by: David Vincze <david.vincze@arm.com>
2024-02-13 14:36:14 +01:00
Manish V Badarkhe
17da49bb5d Merge "fix(qemu): disable FEAT_SB" into integration 2024-02-12 18:54:35 +01:00
Olivier Deprez
eb88986558 Merge "feat(mte): add mte2 feat" into integration 2024-02-12 17:07:34 +01:00
Govindraj Raja
8e3978899a feat(mte): add mte2 feat
Add support for feat mte2. tfsr_el2 is available only with mte2,
however currently its context_save/restore is done with mte rather than
mte2, so introduce 'is_feat_mte2_supported' to check mte2.

Change-Id: I108d9989a8f5b4d1d2f3b9865a914056fa566cf2
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2024-02-12 08:20:01 -06:00
Chris Kay
4f6c9397b6 test(fvp): remove FVP_Foundation model support
This model has been subsumed by the `FVP_Base` model, which is now
available publicly. We no longer have a need to test the Foundation
model, and can shave off a few minutes of CI time by removing it.

Change-Id: Iaa0f23f2efd9ba431d06c8da2be14b76f6974b0a
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-02-12 12:58:20 +00:00
Madhukar Pappireddy
00f1ec6b87 Merge changes from topic "revert-ti-dm-workaround" into integration
* changes:
  Revert "fix(ti): do not take system power reference in bl31_platform_setup()"
  refactor(ti): remove ti_sci_init function
  fix(k3): increment while reading trail bytes
2024-02-09 17:09:05 +01:00
Madhukar Pappireddy
e790ba99f6 Merge "refactor(gicv3): introducing is_valid_interrupt, a new helper utility" into integration 2024-02-09 17:07:46 +01:00
Manish V Badarkhe
25f5574479 Merge "feat(fvp): remove left-over RSS usage" into integration 2024-02-09 16:21:49 +01:00
Manish V Badarkhe
a1726fa7ff feat(fvp): remove left-over RSS usage
Remove any residual RSS usage in the FVP platform, complementing the
changes made in commit dea307fd6c.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I9ced272503456361610ec0c7783d270349233926
2024-02-09 16:21:27 +01:00
Bipin Ravi
b06317fab2 Merge "fix(build): properly manage versions in .versionrc.js" into integration 2024-02-09 16:00:31 +01:00