Commit graph

13846 commits

Author SHA1 Message Date
J-Alves
04e7f80823 fix(spm): not defining load-address in SP config
The FF-A specification has made it such that SPs
may optionally specify their load address in the manifest.

This info was being retrieved to generate some information
for the SPMC manifest. However, it is not a mandatory utility.

This change relaxes the case in which the SP manifest doesn't
have a load address.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Ic4c1b1ec6666522900c113903be45ba0eb5d0bf6
2024-01-11 17:31:59 +00:00
Manish Pandey
e631ac3b21 Merge "build(mpam): add new build option CTX_INCLUDE_MPAM_REGS" into integration 2023-12-29 14:12:10 +01:00
Arvind Ram Prakash
9acff28ae4 build(mpam): add new build option CTX_INCLUDE_MPAM_REGS
New build option CTX_INCLUDE_MPAM_REGS is added to select
if the firmware needs to save the MPAM EL2 registers during world
switches. This option is currently disabled as MPAM is only
enabled for NS world.

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: Ie2e5e184cdb65f7e1a98d8fe81590253fd859679
2023-12-27 11:50:41 -06:00
Sandrine Bailleux (on vacation)
5551264910 Merge changes I548e3034,I65c7fd1b,I1cdacc0f,If9ac35af into integration
* changes:
  feat(intel): support QSPI ECC Linux for Agilex
  feat(intel): support QSPI ECC Linux for N5X
  feat(intel): support QSPI ECC Linux for Stratix10
  feat(intel): add in QSPI ECC for Linux
2023-12-27 11:21:09 +01:00
Sandrine Bailleux (on vacation)
0fd6ed1355 Merge "fix(intel): add HPS remapper to remap base address for SDM" into integration 2023-12-27 11:20:13 +01:00
Sandrine Bailleux (on vacation)
4d64be308a Merge "docs: update links to tf.org-wide process documents" into integration 2023-12-27 11:19:14 +01:00
Bipin Ravi
9ac42bf263 Merge "fix(cpus): workaround for Cortex X3 erratum 2743088" into integration 2023-12-21 18:07:00 +01:00
Sieu Mun Tang
d6ae69c8c6 feat(intel): support QSPI ECC Linux for Agilex
Add QSPI ECC new opcodes for Linux to access to SDM register

Change-Id: I548e30340320ae2c2c9d60d20b218ee844516d64
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-12-22 00:44:35 +08:00
Jit Loon Lim
6cf16b3682 feat(intel): support QSPI ECC Linux for N5X
Add QSPI ECC new opcodes for Linux to access to SDM register

Change-Id: I65c7fd1bfc21baa6c45d9f8a0ee9618e6061e8d7
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-12-22 00:39:55 +08:00
Jit Loon Lim
8be16e44cf feat(intel): support QSPI ECC Linux for Stratix10
Add QSPI ECC new opcodes for Linux to access to SDM register

Change-Id: I1cdacc0f10dfa2a969f0bc5086277fd9081d02e2
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-12-22 00:39:55 +08:00
Jit Loon Lim
4d122e5f19 feat(intel): add in QSPI ECC for Linux
Add QSPI ECC new opcodes for Linux to access to SDM register

Change-Id: If9ac35afdddb91db6bad6b474060cd001f6d89e6
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-12-22 00:39:55 +08:00
Sieu Mun Tang
b727664e0d fix(intel): add HPS remapper to remap base address for SDM
Remap base address for SDM to access DRAM.

Change-Id: If064bd1ff4571d3217b136d9b5ebbfdecb68231e
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-12-22 00:26:42 +08:00
Manish Pandey
11f99e8df5 Merge "refactor(cm): move MPAM3_EL3 reg to per world context" into integration 2023-12-21 16:16:17 +01:00
Sandrine Bailleux
979c5482de docs: update links to tf.org-wide process documents
tf.org-wide documents have been migrated away from
developer.trustedfirmware.org, because the latter will be
decomissioned at some point in the future. These documents are now
hosted in a new 'tf_docs' repository hosted on Github [1] and can be
easily browsed through a new ReadTheDocs website at [2].

Update all relevant links in TF-A documentation to refer to [2].

[1] https://github.com/TrustedFirmware/tf_docs
[2] https://trusted-firmware-docs.readthedocs.io/

Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Change-Id: Ib9d39c36250a05754fe5e46cb6f3044ecb776534
2023-12-21 13:59:49 +01:00
Arvind Ram Prakash
ac4f6aaf85 refactor(cm): move MPAM3_EL3 reg to per world context
Refactor MPAM3_EL3 to be world-specific, eliminating redundant cross-CPU
value duplication and reducing memory footprint.

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: Iddf020a5462737e01ac35e4f2b2b204a8759fafb
2023-12-21 12:37:21 +00:00
Harrison Mutai
f43e9f57dc fix(cpus): workaround for Cortex X3 erratum 2743088
Cortex X3 erratum 2743088 is a Cat B erratum that applies to all
revisions <= r1p1 and is fixed in r1p2. The workaround is to add a DSB
instruction before the ISB of the powerdown code sequence specified in
the TRM.

SDEN documentation: https://developer.arm.com/documentation/2055130

Change-Id: I2c8577e3ca0781af8b1c3912e577d3bd77f92709
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-12-20 17:34:28 +00:00
Manish Pandey
1063650255 Merge "refactor(cm): reset the cptr_el3 before perworld context setup" into integration 2023-12-20 18:24:17 +01:00
Joanna Farley
215edffcb6 Merge changes from topic "xlnx_enable_errata" into integration
* changes:
  docs(versal): add ERRATA_ABI_SUPPORT build documentation
  feat(versal): enable errata management feature
2023-12-20 17:53:58 +01:00
Prasad Kummari
96c031c7fe docs(versal): add ERRATA_ABI_SUPPORT build documentation
Add information about Versal platform for ERRATA_ABI_SUPPORT and
provide the build commands.

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Change-Id: I8466ea446814f888ae56f5cbb7bbdc06099d54f8
2023-12-20 17:25:39 +05:30
Prasad Kummari
d766f994d2 feat(versal): enable errata management feature
The errata ABI feature-specific build flag, the flag enabling CPUs
in the CPU list, and the flags testing non-ARM interconnect-based
errata when enabled from a platform level are added to the AMD-Xilinx
Versal platform makefile to assess the errata ABI feature
implementation.

ERRATA_ABI_SUPPORT : Boolean option to enable support for Errata
management firmware interface for the BL31 image. By default,
its disabled set to zero.

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Change-Id: I54cda23d699abc0782f44172c28933f5cbb010b8
2023-12-20 17:25:15 +05:30
Jayanth Dodderi Chidanand
4087ed6c12 refactor(cm): reset the cptr_el3 before perworld context setup
Currently, the registers which are maintained per-world, does not
take into account the reset value while configuring the context for
the respective world.
This leads to an issue, wherein the register retains the same value
across world switch, which is an error.

This patch addresses this problem, by configuring the register
(cptr_el3) precisely according to the world, the cpu is in
execution via resetting it before initializing the world specific context.

Change-Id: I592d82af373155fca67eed109c199341c305f0b9
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-12-19 22:22:10 +00:00
Sandrine Bailleux
9118bdf401 Merge "fix(intel): fix hardcoded mpu frequency ticks" into integration 2023-12-19 16:12:59 +01:00
Sandrine Bailleux
92f8e8986f Merge "fix(intel): bl31 overwrite OCRAM configuration" into integration 2023-12-19 16:07:22 +01:00
Sandrine Bailleux
108a1c1d9d Merge "fix(intel): update DDR range checking for Agilex5" into integration 2023-12-19 15:32:06 +01:00
Sandrine Bailleux
4cae77d206 Merge "fix(intel): update fcs functions to check ddr range" into integration 2023-12-19 14:26:28 +01:00
Bipin Ravi
7b78a022e5 Merge "fix(cpus): workaround for Cortex-A520 erratum 2858100" into integration 2023-12-19 04:50:46 +01:00
Bipin Ravi
3618ee23fe Merge "fix(errata): add Cortex-A520 definitions" into integration 2023-12-18 21:51:21 +01:00
Arvind Ram Prakash
34db3531ba fix(cpus): workaround for Cortex-A520 erratum 2858100
Cortex-A520 erratum 2858100 is a Cat B erratum that applies to
all revisions <=r0p1 and is still open. The workaround is to
set bit[29] of CPUACTLR_EL1.

SDEN Documentation:
https://developer.arm.com/documentation/SDEN-2444153/latest

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I5a07163f919352583b03328abd5659bf7b268677
2023-12-18 14:04:26 -06:00
Arvind Ram Prakash
ae19093f2a fix(errata): add Cortex-A520 definitions
Include the missing Cortex-A520 header.

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I45153a1aa2d6dace38650268a32106f5201f48bd
2023-12-18 13:59:53 -06:00
Manish Pandey
23c5c69f77 Merge "fix(cpus): fix incorrect AMU trap settings for N2 CPU" into integration 2023-12-18 18:51:10 +01:00
Manish Pandey
afa1da7506 Merge "feat(intel): support SDM mailbox safe inject seu error for Linux" into integration 2023-12-18 18:39:10 +01:00
Manish Pandey
1da798a9f5 Merge "feat(handoff): enhance transfer list library" into integration 2023-12-18 18:08:37 +01:00
Raymond Mao
40fd755bad feat(handoff): enhance transfer list library
Define new transfer entry TL_TAG_OPTEE_PAGABLE_PART for OP-TEE.
Add API for achieving handoff args from transfer entries.
Add API for dumping the transfer list.
Add tl->flags, tl->reserved and TL_FLAGS_HAS_CHECKSUM to align to
the spec update.
Update TL signature to 4a0f_b10b to align to the spec update.
Minor fixes for the coding and comment style.

Change-Id: I0e159672e4ef4c50576f70b82e1b7bae08407acc
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
2023-12-18 15:52:51 +00:00
Jit Loon Lim
150d2be0d2 fix(intel): fix hardcoded mpu frequency ticks
This patch is used to update the hardcoded mpu freq ticks
to obtain the freqq from the hardware setting itself.

Change-Id: I7b9eb49f2512b85fb477110f06ae86ef289aee58
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
2023-12-18 10:12:29 +08:00
Jit Loon Lim
fffcb25c3c feat(intel): support SDM mailbox safe inject seu error for Linux
Linux RAS shall handle the SEU error received from SDM and report
an error message to user

Change-Id: I89181a388063ce9bd6f56b45b1851ccb08582437
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-12-15 13:58:29 +08:00
Sieu Mun Tang
f4aaa9fd6e fix(intel): update DDR range checking for Agilex5
Update DDR range checking for Agilex when total max size of
DRAM_BASE and DRAM_SIZE overflow unsigned 64bit.

Change-Id: Iaecfa5daae48da0af46cc1831d10c0e6a79613c2
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-12-15 11:15:10 +08:00
Jit Loon Lim
e8a3454cb7 fix(intel): update fcs functions to check ddr range
The src addr and dest addr of fcs functions are not checked against
their valid ddr range. Thus adding the ddr range checking to avoid
overlap/overwritten ddr address.

Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Signed-off-by: Sieu Mun Tang <sieu.mun.tang@intel.com>
Change-Id: I9b4d4155dd16d9d5d36e0c91e4a2600c17867daf
2023-12-15 01:48:04 +08:00
Sandrine Bailleux
d0574da589 Merge changes I038dc2bf,Iade15431 into integration
* changes:
  fix(rcar3): change RAM protection configurations
  fix(rcar3): fix load address range check
2023-12-14 14:08:43 +01:00
Sandrine Bailleux
4d877b35cf Merge "fix(rcar3-drivers): check loaded NS image area" into integration 2023-12-14 10:03:17 +01:00
Toshiyuki Ogasahara
e9afde1a2e fix(rcar3): change RAM protection configurations
Change RAM protection control not to overwrite the images by DSMAC.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Change-Id: I038dc2bf90e721692d392ea4de5441647aa62029
---
Marek: - Move axi DRAM out and merge AXI_SPTCR15 setting into it
       - Set AXI_SPTCR1 from 0x0E000E0EU to 0x0E000000U to let
         TEE pick TFA DT
2023-12-13 22:12:15 +01:00
Tobias Rist
ae4860b0f5 fix(rcar3-drivers): check loaded NS image area
Check if next NS image invades a previous loaded image.
Correct non secure image area to avoid loading a NS image to secure

Move GZ compressed payload at 32 * compressed payload size offset,
so it is loaded in non-secure area and can be decompressed into
non-secure area too. It is unlikely that the up to 2 MiB compressed
BL33 blob would decompress to payload larger than 64 MiB .

Signed-off-by: Tobias Rist <tobias.rist@joynext.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Fix for compressed BL33
Change-Id: I52fd556aab50687e4791e5dbc45d425f802c8757
2023-12-13 22:12:15 +01:00
Takuya Sakata
4f7e0fa38f fix(rcar3): fix load address range check
Fixed the check of the address range which the program is loaded to.
Use the addresses and sizes in the BL31 and BL32 certificates to check
that they are within the range of the target address and size
defined inside the TF-A.
It also uses the addresses and sizes in the BL33x certificates to check
that they are outside the protected area defined inside the TF-A.

Signed-off-by: Hideyuki Nitta <hideyuki.nitta.jf@hitachi.com>
Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Code clean up
Change-Id: Iade15431fc86587489fb0ca9106f6baaf7e926e2
2023-12-13 22:12:15 +01:00
Bipin Ravi
62d1adb69a Merge changes from topic "sm/erratum" into integration
* changes:
  fix(cpus): workaround for Cortex-A520 erratum 2630792
  fix(cpus): workaround for Cortex-X2 erratum 2778471
  fix(cpus): workaround for Cortex-A710 erratum 2778471
2023-12-13 19:33:43 +01:00
Sona Mathew
f03bfc3045 fix(cpus): workaround for Cortex-A520 erratum 2630792
Cortex-A520 erratum is a Cat B erratum that applies
to revisions r0p0 and r0p1 and is still open.
The workaround is to set CPUACTLR_EL1[38] to 1.

SDEN Documentation:
https://developer.arm.com/documentation/SDEN-2444153/latest

Change-Id: Idb6f32f680ee1378a57c2d2f809ea847fffe5910
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-12-12 15:45:28 -06:00
Sona Mathew
b01a93d778 fix(cpus): workaround for Cortex-X2 erratum 2778471
Cortex-X2 erratum 2778471 is a Cat B erratum that applies
to revisions r0p1, r1p0, r2p0 and r2p1 and is still open.
The workaround is to set CPUACTLR3_EL1[47] to 1.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-1775100/latest

Change-Id: Ia95f0e276482283bf50e06c58c2bc5faab3f62c6
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-12-12 15:45:28 -06:00
Sona Mathew
c9508d6a10 fix(cpus): workaround for Cortex-A710 erratum 2778471
Cortex-A710 erratum 2778471 is a Cat B erratum that applies
to revisions r0p1, r1p0, r2p0 and r2p1 and is still open.
The workaround is to set CPUACTLR3_EL1[47] to 1.

SDEN documentation:
https://developer.arm.com/documentation/SDEN-1775101/latest

Change-Id: Id3bb4a2673e41ff237682e46784d37752daf2f83
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-12-12 15:45:25 -06:00
Manish V Badarkhe
41beb36880 Merge "fix(sgi): apply workarounds for N2 CPU erratum" into integration 2023-12-11 18:32:53 +01:00
Thomas Abraham
7934b68af6 fix(sgi): apply workarounds for N2 CPU erratum
For RD-N2 and variant platforms, enable workarounds available for the
N2 CPU erratum.

Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
Change-Id: Ib0240f56813a913309e5a6a1902e2990979e9617
2023-12-11 17:17:53 +00:00
Madhukar Pappireddy
940c1e6429 Merge changes If2743827,I163f8169,I97a69650 into integration
* changes:
  feat(imx8m): add 3600 MTps DDR PLL rate
  fix(imx8m): align 3200 MTps rate with U-Boot
  fix(imx8m): handle 3734 in addition to 3733 and 3732 MTps rates
2023-12-11 16:28:33 +01:00
Thomas Abraham
54b86d47eb fix(cpus): fix incorrect AMU trap settings for N2 CPU
The TAM bits of CPTR_EL2 and CPTR_EL3 are incorrectly set in the reset
handling sequence of the Neoverse N2 CPU. As these bits are set, any
access of AMU registers from EL0/EL1 and EL2 respectively are
incorrectly trapped to a higher EL. Fix this by clearing the TAM bits in
both the CPTR_EL2 and CPTR_EL3 registers.

Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
Change-Id: I357b16dfc7d7367b8a0c8086faac28f3e2866cd8
2023-12-10 17:01:44 +00:00