Commit graph

12777 commits

Author SHA1 Message Date
Sandrine Bailleux
816c27fbba Merge changes I38545567,I2f52d3ea into integration
* changes:
  feat(intel): restructure sys mgr for S10/N5X
  feat(intel): restructure sys mgr for Agilex
2023-05-23 17:43:00 +02:00
Madhukar Pappireddy
a2ecddde4b Merge "fix(ti): remove check for zero value in BL31 boot args" into integration 2023-05-23 17:15:12 +02:00
Olivier Deprez
6a6fdd16d0 Merge "docs: fix rendering for code blocks in SPM" into integration 2023-05-23 16:01:02 +02:00
Sandrine Bailleux
f7ed5bea1d Merge "feat(intel): setup SEU ERR read interface for FP8" into integration 2023-05-23 15:43:21 +02:00
Manish Pandey
ce0f98e80f Merge "docs(maintainers): add Yann Gautier in TF-A maintainers list" into integration 2023-05-23 15:40:41 +02:00
Andre Przywara
e57ca899ef fix(qemu): fix 32-bit builds with stack protector
When using the ENABLE_STACK_PROTECTOR=strong build option, the QEMU code
will try to use the RNDR CPU instructions to initialise the stack
canary. Since the instructions are defined for AArch64 only, this will
fail to build for AArch32.

And even though we now always return "false" when asked about the
availability of the RNDR instruction, the compiler will still leave the
reference to read_rdnr() in, if optimisations are turned off (-O0).

Avoid this by providing a dummy read_rndr() implementation, that makes
the linker happy in any case.

This fixes the QEMU build for AArch32 with ENABLE_STACK_PROTECTOR=strong

Change-Id: Ibf450ba4a46167fdf3a14a527d338350ced8b5ba
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-05-23 14:14:32 +01:00
Andre Przywara
733d112f05 feat(cpufeat): deny AArch64-only features when building for AArch32
Many newer architecture features are defined for AArch64 only, so cannot
be used in an AArch32 build.

To avoid #ifdef-ing every single user, just provide trivial
implementations of the feature check functions is_feat_xxx_supported(),
which always return "false" in AArch32. The compiler will then optimise
out the dependent code automatically.

Change-Id: I1e7d653fca0e676a11858efd953c2d623f2d5c9e
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-05-23 14:14:09 +01:00
Jit Loon Lim
b653f3caf0 feat(intel): restructure sys mgr for S10/N5X
This patch is to restructure system manager. Move platform dependent
MACROs to individual platform system manager. Common system manager will
remain for those common declaration only.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I385455671413e154d04a879d33fdd774fcfefbd6
2023-05-23 21:14:07 +08:00
Jit Loon Lim
6197dc98fe feat(intel): restructure sys mgr for Agilex
This patch is to restructure system manager. Move platform dependent
MACROs to individual platform system manager. Common system manager will
remain for those common declaration only.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I2f52d3eaf47716f7dfc636bbf1a23d68a04f39cb
2023-05-23 21:13:05 +08:00
Andre Przywara
d156c5220a feat(cpufeat): add AArch32 PAN detection support
FEAT_PAN is implemented in AArch32 as well, provide the helper functions
to query the feature availability at runtime.

Change-Id: I375e3eb7b05955ea28a092ba99bb93302af48a0e
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-05-23 14:10:43 +01:00
Jit Loon Lim
c418064eb5 fix(intel): update checking for memcpy and memset
Add checking on the size of source data does not exceed source size
when using memcpy and memset.

Add checking on the size of source data in FPGA Crypto Service does
not exceed the maximum of expected data size and does not meet the
minimum of expected data size.

Signed-off-by: Phui Kei Wong <phui.kei.wong@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Idb18f05c18d9142fbe703c3f4075341d179d8bad
2023-05-23 21:09:01 +08:00
Prasad Kummari
e8d61f7d91 fix(zynqmp): handling of type el3 interrrupts
The array type_el3_interrupt_table is defined for MAX_INTR_EL3(128)
elements and only two interrupts - ARM_IRQ_SEC_SGI_7(15), IRQ_TTC3_1(77)
are being handled. Current implementation is consuming 1024 bytes which
can be optimized for the number of interrupts to be handled.
The current array is replaced with the array of struct
zynmp_intr_info_type_el3_t (id and handler as member) and with
maximum number of interrupts to be handled as  the size of array
(MAX_INTR_EL3 = 2). User is expected to adjust MAX_INTR_EL3 based on
how many interrupts are handled in TF-A.
With the updated implementation, a reduction of 960 bytes is observed.
Versal and Versal NET are using similar implementation introduced by
commit e497421d7f ("feat(versal): add infrastructure to handle
multiple interrupts") and commit 0654ab7f75 ("feat(versal-net): add
support  for platform management").

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Change-Id: I07aa388d38ac3ff3c0d25decbe0719087b27ee18
2023-05-23 10:42:23 +05:30
Jit Loon Lim
91239f2c05 feat(intel): setup SEU ERR read interface for FP8
Enable SEU ERR read interfaces for non-secure world to read out SEU status
for DDR.
SEU ERR SMC opcode updated to 0xC2000099

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: I0618dfcdc86a7c1e0c8047b7214d369866dd2281
2023-05-23 11:28:33 +08:00
Govindraj Raja
ae074b369a fix(tsp): flush uart console
tsp uses uart2 and is printing some init messages in main, but
in certain situations we may exit tsp and may not have flushed
uart data, this could later land in uart fifo overflow or
random corruption.

Time to time we have seen a character corruption on uart2 arising
out of logs from tsp main.

So flush console messages from tsp_main before leaving the function.
This is inline with our uart usage strategy across TF-A as most
entry _main function ensures uart console is flushed before exit.

The console flush is harmless and should fix the potential character
corruption if it was due to tsp_main negligence.

But we cannot also rule out that it could be a potential FVP-UART
problem, but that's quite unlikely and further CI daily's will give
us a idea if this fixes the character corruption seen or we may need
stress test FVP-UART which maybe corrupting character in certain
circumstances.

Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
Change-Id: I300c6b71c00fa92b8b97b3e77ea936b393d0f7b5
2023-05-22 13:22:42 -05:00
Joanna Farley
d3e71ead6e Merge "docs(changelog): changelog for v2.9 release" into integration 2023-05-22 16:12:59 +02:00
Sandrine Bailleux
abcdbcfcd1 docs(maintainers): add Yann Gautier in TF-A maintainers list
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I8d3966e230609f9da4c313201ed0cb0f46f27200
2023-05-22 14:45:00 +02:00
Madhukar Pappireddy
d386d53d5c Merge "docs: update feature support overview" into integration 2023-05-22 14:43:02 +02:00
Manish Pandey
9494de0798 docs: update feature support overview
The feature support overview is meant to list all the major features
present in TF-A. It should be precise, non-exhaustive and up-to-date.

Updated the document with new features and removed few unnecessary
details.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I28b378f405a6b9d8f86e7b44e435c33625e3d260
2023-05-22 12:03:22 +01:00
Manish Pandey
be3a456315 Merge "docs: update usage of ARM_ARCH_MAJOR/MINOR" into integration 2023-05-22 11:10:47 +02:00
Manish Pandey
00be88ec1a Merge "docs(n1sdp): add N1SDP PSCI instrumentation data" into integration 2023-05-22 10:47:50 +02:00
Manish Pandey
57da5c1f55 Merge "docs: add Juno runtime instrumentation data" into integration 2023-05-22 10:40:37 +02:00
Joanna Farley
c54579dda3 Merge "fix: pin poetry to version used in CI" into integration 2023-05-20 19:25:42 +02:00
Harrison Mutai
5f0f3bf408 fix: pin poetry to version used in CI
Pin poetry to version 1.3.2, which is currently used in CI, to ensure
that all builds are consistent. Also, fix typo in `doc` group name.

Change-Id: Id0c1aa88ac7ffcc241a51c693570e87abacf7ebc
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-05-20 10:16:50 +01:00
Juan Pablo Conde
b78ad00e58 docs(changelog): changelog for v2.9 release
Change-Id: Ic8cd82c5424af422feedefdc001d291001817a8b
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
2023-05-19 13:49:08 -05:00
Harrison Mutai
6338876b6d docs(n1sdp): add N1SDP PSCI instrumentation data
Change-Id: Id22715cb1d36edf6cb8719f3a0415993f067e7c9
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-05-19 17:29:23 +01:00
Madhukar Pappireddy
09c020f457 Merge "docs(spm): memory region nodes definition" into integration 2023-05-19 17:42:58 +02:00
Manish Pandey
666aec4016 Merge changes I0a307cc1,Ic2ad5a56 into integration
* changes:
  fix(morello): remove platform specific pwr_domain_suspend wrapper
  fix(n1sdp): remove platform specific pwr_domain_suspend wrapper
2023-05-19 14:57:03 +02:00
sahil
d5ca76fc4f fix(morello): remove platform specific pwr_domain_suspend wrapper
Turning redistributor off during suspend disables any wakeup interrupts
resulting in cpu getting stuck. This patch removes the platform specific
psci pwr_domain_suspend handler.

Signed-off-by: sahil <sahil@arm.com>
Change-Id: I0a307cc140447e91fd0808fcfb309593f24c14ca
2023-05-19 16:55:24 +05:30
sahil
c071c5a293 fix(n1sdp): remove platform specific pwr_domain_suspend wrapper
Turning redistributor off during suspend disables any wakeup interrupts
resulting in cpu getting stuck. This patch removes the platform specific
psci pwr_domain_suspend handler.

Signed-off-by: sahil <sahil@arm.com>
Change-Id: Ic2ad5a561be29eee9229a5cc11aa3c9320a51cb7
2023-05-19 16:54:53 +05:30
Manish Pandey
be6484cbb7 docs: update usage of ARM_ARCH_MAJOR/MINOR
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I433488ecbaf7773a9e062223599fb0d3bc892f94
2023-05-19 10:16:01 +01:00
J-Alves
433f6d2b41 docs(spm): memory region nodes definition
Update the documentation related with memory region nodes
of SP's FF-A manifest, to relate to changes from patches [1].

[1] https://review.trustedfirmware.org/q/topic:%22ja%252Fmem_region_fix%22+(status:open%20OR%20status:merged)

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I16595ec581b0ad9d2c20fca8dab64b6fd9ad001a
2023-05-19 09:37:16 +01:00
Harrison Mutai
a3077ae1e9 docs: add Juno runtime instrumentation data
Add results from running the TFTF test suite Runtime Instrumentation on Juno.

Change-Id: I4c5b64e1a80b5b88e42835f0700294a02edc8032
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-05-18 09:32:14 +01:00
Kathleen Capella
fd1479d919 fix(doc): match boot-order size to implementation
Docs had boot-order field as being u32 but code uses uint16_t.
FF-A specification does not specify a required size.

Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Change-Id: Ia4c3fc66b9e733ea1417d34c2601bce1f81c4d32
2023-05-17 16:25:31 -04:00
Andrew Davis
44edd3bd7c fix(ti): remove check for zero value in BL31 boot args
The commit 3e14df6f63 removed clearing of argument registers even when
BL31 is the first stage. In that case the registers are left in a random
state. TI platforms check that the arguments have been zero'd in early
setup and so all TI platforms are not broken. Not sure why this check was
here at all, so simply remove it to fix boot.

Fixes: 3e14df6f63 ("fix(bl31): avoid clearing of argument registers in RESET_TO_BL31 case")
Signed-off-by: Andrew Davis <afd@ti.com>
Change-Id: I02bdd16b67fb5facc4c47ec596a42f110a663377
2023-05-17 10:47:28 -05:00
Michal Simek
69a5bee4c3 feat(xilinx): fix IPI calculation for Versal/NET
Fix buffer calculation logic for Versal and Versal NET to use
LOCAL/REMOTE_ID.

Change-Id: Icf6985a19183cc8e51f3a536130695e00c32c736
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-05-17 09:32:42 +02:00
Michal Simek
068b0bc6e3 feat(xilinx): setup local/remote id in header
Use new macros IPI_LOCAL_ID/IPI_REMOTE_ID to specify source and
destination channels.

Change-Id: I558eebb4d4a83ae0ca9316824f9dba7426adbe3f
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-05-17 09:32:34 +02:00
Michal Simek
bfd0626554 feat(xilinx): clean macro names
This is preparation for cleaning up IPI local and remote side
communication. As of today macros are aligned to communication
channel but there is missing calculation based on channel
selection.

Change-Id: Iac7daf832ff372ea2fece72a15afdfe988b4b7db
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-05-17 09:32:21 +02:00
Michal Simek
237c5a74a2 fix(zynqmp): do not export apu_ipi
apu_ipi structure is not used anywhere externally that's why make it
static.

Change-Id: Icfa99e16ae36fcbcc83b0891aa3527993d49c7ed
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-05-17 09:31:45 +02:00
Michal Simek
62886363a1 fix(zynqmp): remove unused headers
There is no need to include all headers. Enough to have only needed one.

Change-Id: I4813156404969df36f66c1102cd627fdc1e3e9dc
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-05-17 09:31:34 +02:00
Michal Simek
b2258ce30c feat(xilinx): move IPI related macros to plat_ipi.h
The reason is to have all IPI related macros in the same file.

Change-Id: I88ddaa3a5dd1f10114371fc5405f8daf148ca3b8
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-05-17 09:31:28 +02:00
Rob Hughes
570a23099c fix(fiptool): move juno plat_fiptool.mk
plat_fiptool.mk files now need to be in tools/fiptool/plat_fiptool/, so
this file has been moved to the new location so that it is picked up
correctly by the build system.

Change-Id: Id3596b08bc856362e300f3dfefcaab5d75b4c400
Signed-off-by: Rob Hughes <robert.hughes@arm.com>
2023-05-17 09:19:35 +02:00
Prasad Kummari
ba56b012c8 feat(versal-net): add the IPI CRC checksum macro support
Add support for CRC checksum for IPI data when the macro
IPI_CRC_CHECK is enabled.

Change-Id: I14dee4729f88c407bafdf1d6b46106459d8e22c4
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
2023-05-17 11:29:40 +05:30
Bipin Ravi
08d7a10157 Merge "docs(prerequisites): update software and libraries prerequisites" into integration 2023-05-16 22:22:08 +02:00
Govindraj Raja
0d7e702e4f docs(prerequisites): update software and libraries prerequisites
Update to use the following software:

- mbed TLS == 3.4.0
- (DTC) >= 1.4.7
- Ubuntu 22.04 for builds.

Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
Change-Id: I384aab4dfee9cae9453eebf4091abe82ef9ccfaa
2023-05-16 17:36:18 +01:00
Manish Pandey
2834bc6b83 Merge "fix(tegra210): mark bits [23:17] as zero for Fast SMCs" into integration 2023-05-16 16:58:09 +02:00
Manish Pandey
20304ce22f Merge changes from topic "ja/mem_share_doc" into integration
* changes:
  docs(spm): threat model for memory sharing functionality
  docs(spm): add memory sharing documentation
2023-05-16 16:57:15 +02:00
Sandrine Bailleux
493d422363 Merge changes from topics "plat_tests_scalability", "sb/tc-plat-tests" into integration
* changes:
  test(tc): unify platform tests traces
  test(tc): return test failures count for tfm-testsuite
  test(tc): move platform tests in their own function
  test(tc): centralize platform error handling
  refactor(tc): define PLATFORM_TESTS for scale
2023-05-16 13:03:28 +02:00
Andre Przywara
a9779c11da fix(brcm): fix misspelled header inclusion guard
The header inclusion guard for some header for the Broadcom Stingray
board was misspelled.

Make the preprocessor symbol for the #ifndef and #define lines the
same, so that the double inclusion protection works as expected.

Change-Id: I19d73c854cd0689a248ce914ef35ae87c39ebf39
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-05-16 11:34:47 +01:00
J-Alves
9be6b168fb feat: define memory ranges for tc platform
In [1] we missed to update the SPMC manifest for the
TC platform, managing OPTEE as an SP.

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

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I68c2e0da6e63216c827f77b5b86afe9f5813e62f
2023-05-15 18:53:24 +02:00
Sandrine Bailleux
303ef33e7d test(tc): unify platform tests traces
Add some traces at the start and end of platform tests. These traces
are the same regardless of the set of platform tests we run (NV
counter tests / TF-M testsuite / future set of tests).

This makes it easier to integrate these tests in the CI because we can
now have a unified "expect" script for all platform tests, instead of
having one dedicated "expect" script for each possible set of tests.

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: I5ec30a7a25d8a9a4a90e3338a9789acff7ad4843
2023-05-15 13:02:30 +02:00