Commit graph

15692 commits

Author SHA1 Message Date
Icen Zeyada
74606e76e2 docs(tc): deprecate tc2 in documentation
added a note to specify that tc2 has been deprecated

Change-Id: I7ab69a2560e0e56379f4e144d41da20671c1ca9d
Signed-off-by: Icen Zeyada <Icen.Zeyada2@arm.com>
2024-11-20 10:49:26 +00:00
Olivier Deprez
847d6f4ab9 Merge changes from topic "el3spmc-fix-v2.12-rc0" into integration
* changes:
  feat(qemu): increase size of bl31
  fix(qemu): fix EL3-SPMC data store alignment
  fix(qemu): fix build error with spmd
2024-11-19 14:57:37 +01:00
Jens Wiklander
78a91582b0 feat(qemu): increase size of bl31
Increase BL31 size to have room to spare for debugging with EL3 SPMC.

Change-Id: I6e260a284ed2aa5d515b45be90ee2cdeded9c6a9
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2024-11-19 12:50:10 +01:00
Jens Wiklander
eee52dac2c fix(qemu): fix EL3-SPMC data store alignment
With PLAT=qemu, the EL3-SPMC data store is provided as an array of
uint8_t and implicitly with a 1 byte alignment. But the way the data
store is used it must have a larger alignment, so change to double-word
alignment for maximum compatibility.

Change-Id: I4e9b901889078fee4b87f8333257bdc076386572
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2024-11-19 12:50:10 +01:00
Jens Wiklander
1b1b40a941 fix(qemu): fix build error with spmd
Currently when building with PLAT=qemu SPD=spmd SPMC_AT_EL3=1
SPMD_SPM_AT_SEL2=0, there is a build error since
plat_spmd_handle_group0_interrupt() is called irrespective of
SPMC_AT_EL3. Fix this by making plat_spmd_handle_group0_interrupt()
available if SPD_spmd is defined only.

Change-Id: If5f650d2bd3675cbb4b509e9e3743d3865d7c812
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2024-11-19 12:50:10 +01:00
Govindraj Raja
74c0783d1d Merge changes Ic92c2abf,Id9182f65 into integration
* changes:
  docs(juno): update PSCI instrumentation data
  docs(n1sdp): update PSCI instrumentation data
2024-11-18 17:19:56 +01:00
Govindraj Raja
9f933f604a Merge "fix(rme): add console name to checksum calculation" into integration 2024-11-18 03:34:58 +01:00
Govindraj Raja
7a444c3df7 Merge "docs(prerequisites): add Poetry installation instructions" into integration 2024-11-18 02:54:53 +01:00
Govindraj Raja
c24becea01 Merge changes I32b0dd2b,I04d88fb6,I9426cf7b,Ia18824a7 into integration
* changes:
  docs(changelog): add some architecture features
  docs(changelog): create SPD scopes
  docs(changelog): update some scope for release note
  docs(changelog): add subsections for STM32MP25
2024-11-15 19:56:59 +01:00
Yann Gautier
1bf7a475b6 docs(changelog): add some architecture features
Add missing scopes for FEAT_SCTLR2, FEAT_D128 and FEAT_THE.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I32b0dd2bdf68a5a56f8b236155ad44686d853eca
2024-11-15 19:29:07 +02:00
Govindraj Raja
a4fe3846ec Merge "fix(stm32mp2): use TOOL_ADD_IMG_PAYLOAD for BL31 DT" into integration 2024-11-15 17:36:59 +01:00
Manish V Badarkhe
d108cd0184 Merge "fix(tc): fix the MHUv3 interrupt name in DT" into integration 2024-11-15 17:31:16 +01:00
Govindraj Raja
912130313a Merge "docs(context-mgmt): add Root-Context documentation" into integration 2024-11-15 16:56:57 +01:00
AlexeiFedorov
aa99881d30 fix(rme): add console name to checksum calculation
The name field of console_info structure was missed
in checksum calculation. This is corrected by adding
a new helper checksum_calc() which computes the
checksum in a field agnostic manner.

Change-Id: I5c39ee43f1fa20872c37846e3feeabd0525a47ae
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
2024-11-15 15:59:00 +02:00
Zachary Leaf
a0db5c74ab docs(juno): update PSCI instrumentation data
Update for v2.12 release based on v2.12-rc0

Change-Id: Ic92c2abfc65dc1e9f979564eecd65cb2c285cb25
Signed-off-by: Zachary Leaf <zachary.leaf@arm.com>
2024-11-15 13:16:28 +00:00
Zachary Leaf
012cc2cb61 docs(n1sdp): update PSCI instrumentation data
Update for v2.12 release based on v2.12-rc0

Change-Id: Id9182f65518c0b41d478d3f24edc3befbd9d2cf6
Signed-off-by: Zachary Leaf <zachary.leaf@arm.com>
2024-11-15 13:16:28 +00:00
Chris Kay
0c9cd67d56 docs(prerequisites): add Poetry installation instructions
This small change removes the footnote from Poetry that it is only used
for building documentation, as it is now used for some of the Python
tooling in the repository from the build system.

Additionally, add a link to the official installation guide for Poetry.

Change-Id: Ie36b7ecd8066cbf2a14a1085d84fa9bd9c4409ba
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-11-15 14:42:43 +02:00
Jayanth Dodderi Chidanand
0f3cd5150c docs(context-mgmt): add Root-Context documentation
* This patch adds some details on the EL3/Root-Context
  and its related interfaces.

* Additionally it updates the existing details on the
  interfaces, related to various CPU context entries which
  have been improvised recently.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: I81a992fe09feca4dc3d579a48e54a4763425e052
2024-11-15 10:44:39 +00:00
Yann Gautier
02c580cd0e docs(changelog): create SPD scopes
Create scopes for Secure Payload dispatchers (OP-TEE, ProvenCore,
Trusty, TSP and Trusted Little Kernel).

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I04d88fb6839d8cc1d87d0962f0a499a5e90c8680
2024-11-15 10:08:30 +01:00
Yann Gautier
48a59eb00a docs(changelog): update some scope for release note
To ease release note preparation, add some missing scope in the
changelog.yaml file.

Change-Id: I9426cf7b90455a487c4653c3fc9a6a718c13df7b
Signed-off-by: Yann Gautier <yann.gautier@st.com>
2024-11-15 09:54:46 +01:00
Yann Gautier
10f60d3800 docs(changelog): add subsections for STM32MP25
The STM32MP2 family has 3 different types of SoCs (STM32MP25, STM32MP23
and STM32MP21). For the moment only STM32MP25 is partly supported in
TF-A. Add a dedicated subsections for STM32MP25. The other ones will be
added later. The same is done for FDTS scope.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Signed-off-by: Nicolas Le Bayon <nicolas.le.bayon@st.com>
Change-Id: Ia18824a7b649bcd1ffa631e3aa0ecb3fd0b2d038
2024-11-15 09:54:46 +01:00
Govindraj Raja
a05c154f62 Merge "docs: review Undefined Injection for 2.12 release" into integration 2024-11-14 22:43:03 +01:00
Manish Pandey
f152d3b255 docs: review Undefined Injection for 2.12 release
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I654e871e4bdf0c9b556c7973e0ba0009627ed37c
2024-11-14 18:30:02 +02:00
Govindraj Raja
2b7ca78594 Merge "fix(stm32mp2): enable timer earlier in BL31" into integration 2024-11-14 17:27:57 +01:00
Govindraj Raja
33d6ea0a87 Merge "docs(juno): update Juno tested SCP version to 2.15" into integration 2024-11-14 17:26:18 +01:00
Yann Gautier
f15f1c6270 fix(stm32mp2): use TOOL_ADD_IMG_PAYLOAD for BL31 DT
Use TOOL_ADD_IMG_PAYLOAD instead of TOOL_ADD_IMG to generate the BL31
device tree blob to be included in FIP. This allows building all TF-A
binaries and FIP in a single command. Else, as TOOL_ADD_IMG evaluate
the existence of the file before building it, we have a build error.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I72d2f70733c49792d0321ad07f5a3bbd283a36d4
2024-11-14 12:12:05 +01:00
Yann Gautier
16a659d73a fix(stm32mp2): enable timer earlier in BL31
The timer is required when setting console. In BL2 the timer init is
done in clock driver init. This is not the case in BL31. So initialize
the generic_delay_timer_init() just after stm32mp2_clk_init() call.
This is required after the recent changes in timer framework [1].

[1]: a6485b2b3b refactor(delay-timer): add timer callback functions

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I4e84a45fc526ed132e97b238596aa69ddfc2b058
2024-11-14 11:01:04 +01:00
Arvind Ram Prakash
918c5459dd docs(juno): update Juno tested SCP version to 2.15
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I29452d0abadf9b5980ca9680ca2c78080c4c33a0
2024-11-12 10:56:37 -06:00
Govindraj Raja
3109367c34 Merge "fix(build): ensure $(ROT_KEY) depends on correct directory rules" into integration 2024-11-12 16:39:40 +01:00
Chris Kay
7a95759f93 fix(build): ensure $(ROT_KEY) depends on correct directory rules
In order for directories to be automatically created when used as a
dependency, they must end with a forward slash (`/`). This is because we
have a pattern rule (`%/`) to create a directory anywhere where a
directory is required as a direct dependency.

Change-Id: Ib632d59da0745f6cadb0a839a62360aeca25c178
Signed-off-by: Chris Kay <chris.kay@arm.com>
2024-11-12 12:50:45 +00:00
Leo Yan
1bf33251a8 fix(tc): fix the MHUv3 interrupt name in DT
Change the interrupt name "combined-mbx" to "combined", which is the
correct naming defined in the mainline kernel.

Signed-off-by: Leo Yan <leo.yan@arm.com>
Change-Id: I8d2da2dd0e9dac2bed3963efc695a277bb5e14bd
2024-11-11 10:31:12 +00:00
Manish V Badarkhe
dc5d485206 Merge "fix(mbedtls): fix error return code for calc_hash" into integration 2024-11-08 19:37:17 +01:00
Govindraj Raja
512173980f Merge "feat(cm): test integrity of el1_ctx registers" into integration 2024-11-08 18:41:13 +01:00
Ryan Everett
885bd91f27 fix(mbedtls): fix error return code for calc_hash
Make this function return values from crypto_ret_value.
The previous method of returning the mbedtls error code
on failure meant that the authentication module couldn't
correctly parse failures from this function.

Change-Id: I9fe6eba1fc79e8f81004f8cd202781aea907e963
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-11-08 15:51:39 +00:00
Govindraj Raja
5b9e703537 Merge "fix(build): correct feature assignment for ARM v8.8 compliance" into integration 2024-11-08 16:37:56 +01:00
Govindraj Raja
a5e7d5b158 Merge "fix(arm): load dt before updating entry point" into integration 2024-11-08 16:26:05 +01:00
Yann Gautier
7ea8852ea5 Merge changes If56ed0ab,I632236a1 into integration
* changes:
  perf(build): don't check the compiler's flags for every target
  perf(build): be clever about uppercasing
2024-11-08 15:23:02 +01:00
Boyan Karatotev
316f5c97f2 perf(build): don't check the compiler's flags for every target
The TF_FLAGS variable must be recursively expanded as the rules that use
it are defined before it has been fully defined. That has the
unfortunate side effect of spawning a subshell that calls the compiler
for every file that is being built, thrashing multicore build times.

We don't cater to the possibility of the toolchain changing mid build so
precomputing this value would be more sensible. Doing a clean build on
an Intel dual socket Xeon Gold 5218 (i.e. 64 threads) workstation used
to take about 9 seconds. After this patch it takes about 1.5. Single
core performance went from ~45 seconds to about 25.

Change-Id: If56ed0ab3cc42bc482d9dd05a41ffbff4dd7f147
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2024-11-08 12:27:46 +00:00
Boyan Karatotev
f7a41fb493 perf(build): be clever about uppercasing
Most of the macros in build_macros.mk get lazily evaluated. That's
mostly fine, except for the fact that the `uppercase` macro needs to
spawn a subshell to get its output. And the target for every file
requires calling `uppercase` many, MANY, times, thrashing performance on
even the most trivial of make commands.

We can be a little clever and only call `uppercase` a handful of times
and then pass around the already uppercased strings.

The same is true about the verbosity augmentation variables. Simply
changing them to simply expanded variables allows for them to be
pre-processed and then used over and over again.

`make realclean` is a pretty good benchmark for this as it doesn't do
much else but must process all the rules, like every other make command.
On a clean checkout of TF-A on an Intel Xeon Gold 5218 (i.e.  slow
single-core) workstation, that command used to take about 7 seconds.
With this patch it takes about 0.5.

Change-Id: I632236a12a40f169e834974ecbc73ff80aac3462
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2024-11-08 12:27:46 +00:00
Jayanth Dodderi Chidanand
7623e085cb feat(cm): test integrity of el1_ctx registers
* This patch adds support to tsp (BL32) Image, to exercise
  EL1_context registers at S-EL1.

* Adds a SMC function ID "MODIFY_EL1_CTX" to handle EL1_CTX
  registers at S-EL1 and overwrite them.

Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
Change-Id: Id4f2b3b748f7bc9e6c9d72a2f03d50aefbfb61cb
2024-11-08 11:05:13 +00:00
Manish V Badarkhe
94ff1d98c9 fix(build): correct feature assignment for ARM v8.8 compliance
Correct feature list assignment to apply ARM v8.7 features
to `armv8-8-a-feats` instead of `armv8-7-a-feats` for ARM v8.8
compliance.
This was highlighted during the build of TC4 with ARM_ARCH_MAJOR=8
and ARM_ARCH_MINOR=8.

Change-Id: I6c48a3ffa2f1e18d5e4a6484a823c9112dddd751
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2024-11-08 09:59:54 +00:00
Yann Gautier
b40bc36c20 Merge "build(bl31): support separated memory for RW DATA" into integration 2024-11-07 18:10:51 +01:00
Govindraj Raja
212993ae7c Merge "feat(cpufeat): add ENABLE_FEAT_LS64_ACCDATA" into integration 2024-11-06 21:56:22 +01:00
Govindraj Raja
8fccbeb34a Merge "fix(psa): fix P-384 PSA key signature verification" into integration 2024-11-06 21:30:42 +01:00
Ryan Everett
12a8e95303 fix(psa): fix P-384 PSA key signature verification
The buffer size allocated for the raw ECDSA signatures
was too small for P-384 signatures. This led to mbedtls
aborting the generation of the raw sig.

Fix this by increasing the buffer size to the required
value.

Change-Id: I06a9cfe1f4cb2603c5fbe945714e90460c24edb8
Signed-off-by: Ryan Everett <ryan.everett@arm.com>
2024-11-06 16:58:40 +00:00
Yann Gautier
ffbc2b90df Merge "fix(romlib): prevent race condition on the build directory" into integration 2024-11-06 17:46:42 +01:00
Manish V Badarkhe
9bc738d209 Merge changes I0448caa4,I8ee666ee into integration
* changes:
  build: install dependencies before doc build
  fix(docs): fix the example command for doc build
2024-11-06 17:01:51 +01:00
Andre Przywara
19d52a83b7 feat(cpufeat): add ENABLE_FEAT_LS64_ACCDATA
Armv8.6 introduced the FEAT_LS64 extension, which provides a 64 *byte*
store instruction. A related instruction is ST64BV0, which will replace
the lowest 32 bits of the data with a value taken from the ACCDATA_EL1
system register (so that EL0 cannot alter them).
Using that ST64BV0 instruction and accessing the ACCDATA_EL1 system
register is guarded by two SCR_EL3 bits, which we should set to avoid a
trap into EL3, when lower ELs use one of those.

Add the required bits and pieces to make this feature usable:
- Add the ENABLE_FEAT_LS64_ACCDATA build option (defaulting to 0).
- Add the CPUID and SCR_EL3 bit definitions associated with FEAT_LS64.
- Add a feature check to check for the existing four variants of the
  LS64 feature and detect future extensions.
- Add code to save and restore the ACCDATA_EL1 register on
  secure/non-secure context switches.
- Enable the feature with runtime detection for FVP and Arm FPGA.

Please note that the *basic* FEAT_LS64 feature does not feature any trap
bits, it's only the addition of the ACCDATA_EL1 system register that
adds these traps and the SCR_EL3 bits.

Change-Id: Ie3e2ca2d9c4fbbd45c0cc6089accbb825579138a
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2024-11-06 16:52:12 +01:00
Tamas Ban
50d9383bec build: install dependencies before doc build
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I0448caa4e22c13d4dd821261642833d49ff7a234
2024-11-06 15:18:06 +01:00
Tamas Ban
9db2b059eb fix(docs): fix the example command for doc build
Signed-off-by: Tamas Ban <tamas.ban@arm.com>
Change-Id: I8ee666ee4cd135d09380ce31751ddba9962ff831
2024-11-06 15:18:06 +01:00