Commit graph

12682 commits

Author SHA1 Message Date
Wing Li
d34886140c fix(psci): add optional pwr_domain_validate_suspend to plat_psci_ops_t
This patch adds a new optional member `pwr_domain_validate_suspend` to
the `plat_psci_ops_t` structure that allows a platform to optionally
perform platform specific validations in OS-initiated mode. This is
conditionally compiled into the build depending on the value of the
`PSCI_OS_INIT_MODE` build option.

In https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/17682,
the return type of the `pwr_domain_suspend` handler was updated from
`void` to `int` to allow a platform to optionally perform platform
specific validations in OS-initiated mode. However, when an error code
other than `PSCI_E_SUCCESS` is returned, the current exit path does not
undo the operations in `psci_suspend_to_pwrdown_start`, and as a result,
the system ends up in an unexpected state.

The fix in this patch prevents the need to undo the operations in
`psci_suspend_to_pwrdown_start`, by allowing the platform to first
perform any necessary platform specific validations before the PSCI
generic code proceeds to the point of no return where the CPU_SUSPEND
request is expected to complete successfully.

Change-Id: I05d92c7ea3f5364da09af630d44d78252185db20
Signed-off-by: Wing Li <wingers@google.com>
2023-05-31 23:54:19 -07:00
Wing Li
a43be0f610 fix(sc7280): update pwr_domain_suspend
Change-Id: I0ee6598e9a9a01aea49e05307c68bde9993debba
Signed-off-by: Wing Li <wingers@google.com>
2023-05-31 23:54:19 -07:00
Wing Li
f51d277de3 fix(fvp): update pwr_domain_suspend
Change-Id: Ied4063ac6e685368818b2296c2d1800f4b272b86
Signed-off-by: Wing Li <wingers@google.com>
2023-05-31 23:54:19 -07:00
Joanna Farley
c0d8ee3861 Merge "fix(zynqmp): handling of type el3 interrrupts" into integration 2023-05-26 10:19:10 +02:00
Manish Pandey
60df3d75ed Merge "fix(tsp): flush uart console" into integration 2023-05-25 16:45:15 +02:00
Manish Pandey
4bb0cdc159 Merge changes I31ec0001,Ib06cd024,I7c11f15d,Ie0d5d4c8,I285f3b59, ... into integration
* changes:
  fix(el3-spmc): correctly account for emad_offset
  refactor(el3-spmc): avoid unnecessarily revalidating offset
  fix(el3-spmc): only call spmc_shm_check_obj() on complete objects
  refactor(spmc): assert on out-of-bounds emad access
  refactor(el3-spmc): spmc_shmem_obj_get_emad() will never fail
  fix(el3-spmc): validate descriptor headers
  fix(el3-spmc): use version-dependent minimum descriptor length
  refactor(el3-spmc): check emad_count offset
2023-05-25 12:35:46 +02:00
Joanna Farley
16cb3be875 Merge changes from topic "xlnx_smcc_soc_id" into integration
* changes:
  feat(versal-net): add support for SMCC ARCH SOC ID
  feat(versal): add support for SMCC ARCH SOC ID
  refactor(versal-net): move macros to common header
  feat(xilinx): add support to get chipid
2023-05-24 16:43:25 +02:00
Joanna Farley
76778ffa34 Merge "fix(zynqmp): make zynqmp_devices structure smaller" into integration 2023-05-24 16:37:33 +02:00
Michal Simek
7e3e79995a fix(zynqmp): make zynqmp_devices structure smaller
Pack the structure and make id/ver smaller and sorted.
The change saves 400bytes in RODATA section.

Change-Id: I8bcbe8fd589ba193551a0dd2cd19572516252e73
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-05-24 15:37:41 +02:00
Madhukar Pappireddy
de40404b7c Merge "fix(brcm): fix misspelled header inclusion guard" into integration 2023-05-24 15:32:48 +02:00
Joanna Farley
e80770449a Merge changes from topic "xilinx-ipi" into integration
* changes:
  feat(xilinx): fix IPI calculation for Versal/NET
  feat(xilinx): setup local/remote id in header
  feat(xilinx): clean macro names
  fix(zynqmp): do not export apu_ipi
  fix(zynqmp): remove unused headers
  feat(xilinx): move IPI related macros to plat_ipi.h
2023-05-24 14:40:51 +02:00
Joanna Farley
32d6396aa6 Merge "feat(versal-net): add the IPI CRC checksum macro support" into integration 2023-05-24 14:39:05 +02:00
Soby Mathew
b709f12db3 Merge "feat(rme): save PAuth context when RME is enabled" into integration 2023-05-24 14:23:38 +02:00
Akshay Belsare
1873e7f7d8 feat(versal-net): add support for SMCC ARCH SOC ID
Add support for SMCCC_ARCH_SOC_ID as per SMC Calling Convention for
Versal NET platform.
The SMCC ARCH SOC ID call is used by system software to obtain the SiP
defined SoC identification details.

Change-Id: I6648051c7f5fa27d2f02080209da36ee8d5a9d95
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-05-24 14:09:04 +02:00
Akshay Belsare
079c6e2403 feat(versal): add support for SMCC ARCH SOC ID
Add support for SMCCC_ARCH_SOC_ID as per SMC Calling Convention for
Versal platform.
The SMCC ARCH SOC ID call is used by system software to obtain the SiP
defined SoC identification details.

Change-Id: I1466a9ad1bc8dde1cda516ddd3edbaa6a5941237
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-05-24 14:08:54 +02:00
Akshay Belsare
4265bcae14 refactor(versal-net): move macros to common header
Move the macros to common header from platform specific folder, so that
the same macros can be re-used in other platforms.

Change-Id: I355b024f5e870c6fc104598bc571dbaa29503ae2
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-05-24 14:08:45 +02:00
Akshay Belsare
0563601f03 feat(xilinx): add support to get chipid
Add support for PM API SYS to get the chip ID from the target.
The API calls the IPI command to read the Chip idcode and revision.

Change-Id: Id4d7d812cbf77c5e2fc7785b8afb379214f8dd19
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-05-24 14:08:39 +02:00
Joanna Farley
545330b844 Merge "fix(versal-net): fix BLXX memory limits for user defined values" into integration 2023-05-24 14:06:39 +02:00
Joanna Farley
74bda905e8 Merge changes Ica1f9786,Ic96e3680 into integration
* changes:
  fix(versal): fix BLXX memory limits for user defined values
  fix(zynqmp): fix BLXX memory limits for user defined values
2023-05-24 14:03:17 +02:00
Michal Simek
a80da3899a fix(versal-net): fix BLXX memory limits for user defined values
When compiling with user defined areas of memory the platform code
calculates the size with (base + size - 1).  However, the linker
file aligns section on a page boundary. So having the -1 in
the size calculations leads to an error message looking like this:

bl31.elf section `coherent_ram' will not fit in region `RAM'
aarch64-buildroot-linux-uclibc-ld: region `RAM' overflowed by 1 byte

While at it fix all other occurences of predefined values that were
calculated with -1.

Fixes: 1d333e6909 ("feat(versal-net): add support for Xilinx
Versal NET platform")
Change-Id: I4455f63ee3ad52369f517a7d8d3627faf0b28c0f
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-05-24 12:40:46 +02:00
Shruti Gupta
13cc1aa70a feat(rme): save PAuth context when RME is enabled
This patch enables CTX_INCLUDE_PAUTH_REGS for RME builds.
The RMM-EL3 specification is also updated to reflect the changes
and also version of the same is bumped from 0.1 to 0.2.

Signed-off-by: Shruti Gupta <shruti.gupta@arm.com>
Change-Id: I2e96a592d2b75abaee24294240c1727c5ceba420
2023-05-24 10:56:40 +01:00
Ilias Apalodimas
f123b91fdd fix(versal): fix BLXX memory limits for user defined values
When compiling with user defined areas of memory the platform code
calculates the size with (base + size - 1).  However, the linker file
aligns section on a page boundary.  So having the -1 in the size
calculations leads to an error message looking like this:

bl31.elf section `coherent_ram' will not fit in region `RAM'
aarch64-buildroot-linux-uclibc-ld: region `RAM' overflowed by 1 byte

While at it fix all other occurences of predefined values that were
calculated with -1

Fixes: commit f91c3cb1df ("arm64: versal: Add support for new Xilinx Versal ACAPs")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Change-Id: Ica1f97867b701e7fcd60ea8ea07d2ae96c485443
2023-05-24 10:46:49 +03:00
Ilias Apalodimas
8ce2fbffe3 fix(zynqmp): fix BLXX memory limits for user defined values
When compiling with user defined areas of memory the platform code
calculates the size with (base + size - 1).  However, the linker file
aligns section on a page boundary.  So having the -1 in the size
calculations leads to an error message looking like this:

bl31.elf section `coherent_ram' will not fit in region `RAM'
aarch64-buildroot-linux-uclibc-ld: region `RAM' overflowed by 1 byte

Commit 9b4ed0af02 ("feat(plat/zynqmp): fix section `coherent_ram' will not fit in region `RAM'")
applied a similar fix, but only in the predefined for BL31LIMIT/BASE.

While at it fix all other occurences of predefined values that were
calculated with -1

Fixes: 01555332fa ("zynqmp: Revise memory configuration options")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Change-Id: Ic96e36808d01f6bb92e6839cec92fc52320dd3f3
2023-05-24 10:46:49 +03:00
Sandrine Bailleux
2abbb457fa Merge "fix(intel): update checking for memcpy and memset" into integration 2023-05-24 08:31:09 +02:00
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
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
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