Commit graph

13678 commits

Author SHA1 Message Date
Sona Mathew
7f2caecdbc fix(errata-abi): update the Cortex-A78C errata ABI struct
Updated the structure for Cortex-A78C in the errata ABI file
for missing entries from the cortex_a78c.S file.

Change-Id: I3d994337221de03264be235f1727de7494ed4312
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:15:02 -05:00
Sona Mathew
c814619a36 fix(cpus): update the rev-var for Cortex-A78AE
Update the revision and variant information in the
cortex_a78_ae.s and errata ABI file for erratum ID - 2376748
based on the latest SDEN.

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

Change-Id: I082aac41adf717b0d5d59046a8933a3f5a3de94f
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:09:54 -05:00
Sona Mathew
92d5b501d4 fix(errata-abi): update the Cortex-A76 errata ABI struct
Updated the structure for Cortex-A76 in the errata ABI file
for the missing entries from the cortex_a76.S file.

Change-Id: Iceaf26fb2de493a877c4c100c0137f9255fc8b9f
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:09:54 -05:00
Sona Mathew
2bf7939a7b fix(cpus): fix the rev-var for Cortex-A710
Update the revision and variant information in the
errata ABI file, cortex_A710.S file for erratum ID - 2058056
and erratum ID - 2055002 to match the revision and variant
in the latest SDEN.

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

Change-Id: Ie010dae90dabf8670f588a06f9a606cf41e22afa
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:09:54 -05:00
Sandrine Bailleux
d6b458e82a Merge changes Ia66dd232,Ie0ddbe0b,Idd191614 into integration
* changes:
  fix(rcar3-drivers): update DDR setting
  fix(rcar3): fix CPG register code comment
  fix(rcar3): update Draak and Eagle board IDs
2023-10-24 16:57:13 +02:00
Manish Pandey
3018854b5f Merge changes from topic "gcc_linker_aarch32" into integration
* changes:
  feat(st): support gcc as linker
  fix(build): allow gcc linker on Aarch32 platforms
2023-10-23 17:59:26 +02:00
Sandrine Bailleux
eab006e591 Merge "fix(cert-create): fix key loading logic" into integration 2023-10-23 15:30:26 +02:00
Govindraj Raja
1ca73b4f4a fix(build): convert tabs to spaces
Convert any used tabs in arch_features.mk to spaces to avoid makefile
build issues. Only recipes should be indented with tabs.

ENABLE_TRBE_FOR_NS should be enabled only for aarch64 but accidentally
its enabled for aarch32 as well in FVP makefile.

Change-Id: Iee913a04d6b60a4738183a17421754c2638e8e6d
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-10-23 08:12:30 -05:00
Yann Gautier
9f72f5eac8 fix(st): properly check LOADADDR
LOADADDR variable is retrieved from line starting with RAM in map file.
But if the build path contains RAM, this keywords will appear several
times and the grep will fail. Correct that by really checking the line
starting with RAM thanks to grep '^RAM'.

Change-Id: I2ce23edb5255028b1a56ba45c16569a42ae21ae2
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/328648
2023-10-23 11:56:30 +02:00
Olivier Deprez
d1a974a3b7 Merge changes from topic "mp/test_espi" into integration
* changes:
  feat(fvp): new SiP call to set an interrupt pending
  refactor(arm): allow platform specific SiP support
2023-10-20 18:46:51 +02:00
Manish Pandey
8382b976a4 Merge "fix(build): pass parameters through response files" into integration 2023-10-20 16:46:56 +02:00
Manish Pandey
bf41b992ae Merge "docs(maintainers): remove Jorge Ramirez-Ortiz from rcar3 maintainers" into integration 2023-10-20 15:58:21 +02:00
Madhukar Pappireddy
20324013b1 feat(fvp): new SiP call to set an interrupt pending
This patch introduces an SiP SMC call for FVP platform to set an
interrupt pending. This is needed for testing purposes.

Change-Id: I3dc68ffbec36d90207c30571dc1fa7ebfb75046e
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-10-19 22:42:45 -05:00
Madhukar Pappireddy
7a2130b4a5 refactor(arm): allow platform specific SiP support
This patch introduces handler to add support for SiP calls to be
handled at EL3 for Arm platforms.

Consequently, the support for SPMD LSP is moved to corresponding
Arm platform SiP source file. This will allow us to add support
for a new SiP call in subsequent patch.

Change-Id: Ie29cb57fc622f96be3b67bebf34ce37cc82947d8
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2023-10-19 22:42:38 -05:00
Yann Gautier
12e683a680 docs(stm32mp15): mark STM32MP15_OPTEE_RSV_SHM deprecated
TF-A is no more in charge of configuring OP-TEE shared memory.
Set the STM32MP15_OPTEE_RSV_SHM flag as deprecated (as well as the code
depending on it).

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I863d9a1e45e0bfc2f45d9bd84b90d626738934ab
2023-10-19 17:58:11 +02:00
Yann Gautier
fb1d3bd933 feat(stm32mp15): disable OP-TEE shared memory
OP-TEE manages its own memory, and can open some areas through TZC400.
There is no need to configure this shared memory in TF-A.
Just assure that CFG_CORE_RESERVED_SHM=n for OP-TEE compilation.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ib54acd60d9ec243d6ef9cc6b74937b4183d9ffa5
2023-10-19 17:57:05 +02:00
Harrison Mutai
430be4396b fix(build): pass parameters through response files
CMD.exe limits prompts to 8191 characters [1], unfortunately our command
line lengths when building with make get really long and in certain
instances exceed this limit. Get around this by passing options to the
compiler and linker via the response file mechanism.

[1] https://learn.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/command-line-string-limitation

Change-Id: I6fee83c5892542f887daf25227fcb595a36f26b9
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-10-19 15:35:59 +01:00
Sandrine Bailleux
bb3b0c0b09 fix(cert-create): fix key loading logic
When key_load() attempts to load the key from a file and it fails to
open this file, the 'err_code' output argument is set to
'KEY_ERR_OPEN' error code. However, it is incorrectly overwritten
later on with 'KEY_ERR_NONE' or 'KEY_ERR_LOAD'.

The latter case messes up with the key creation scenario. The
'KEY_ERR_LOAD' error leads the tool to exit, when it should attempt to
create the said key file if invoked with the --new-keys/-n option.

Note that, to complicate matters further, which of 'KEY_ERR_OPEN' or
'KEY_ERR_NONE' values is returned by key_load() depends on the version
of OpenSSL in use:

 - If using v3+, KEY_ERROR_LOAD is returned.

 - If using <v3, KEY_ERROR_NONE is returned as a result of the key
   pair container being initialized by key_new().

This patch fixes this bug and also takes the opportunity to refactor
key_load() implementation to (hopefully) make it more straight-forward
and easier to reason about.

Fixes: 616b3ce27d "feat(cert-create): add pkcs11 engine support"
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Reported-by: Wenchen Tan <xtaens@qq.com>
Change-Id: Ia78ff442e04c5ff98e6ced8d26becbd817a8ccb7
2023-10-19 11:34:55 +02:00
Manish Pandey
eabcb27ae1 Merge "docs: add code-owners for Firmare Handoff Library" into integration 2023-10-19 10:53:25 +02:00
Yann Gautier
4c8e8ea772 feat(st): update STM32MP DT files
This is an alignment with Linux DT files that have been merged in
stm32 tree [1], and will be in Linux 6.7.
The /omit-if-no-ref/ in overlay files are now removed, as already in
pinctrl files.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32.git

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Iab94b0ba7a4a0288ca53d1ae57ab590566967415
2023-10-19 09:45:43 +02:00
Manish Pandey
d17c73241f docs: add code-owners for Firmare Handoff Library
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I2c64e7582a744f54b54085d3a1d7ac91e269ce3d
2023-10-18 13:31:42 +01:00
Sandrine Bailleux
542ff7653e docs(maintainers): remove Jorge Ramirez-Ortiz from rcar3 maintainers
On behalf of Jorge himself.

Change-Id: I2dca445a240f7bc16c02365e936b064f6a246d89
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2023-10-18 08:27:49 +02:00
Joanna Farley
f8363a8e2c Merge changes from topic "xlnx_dtb_console" into integration
* changes:
  feat(versal-net): retrieval of console information from dtb
  feat(versal): retrieval of console information from dtb
  refactor(xilinx): create generic function for clock retrieval
  feat(zynqmp): retrieval of console information from dtb
2023-10-17 16:27:13 +02:00
Olivier Deprez
47dddbe7b0 Merge "feat(mt8188): add EMI MPU support for SCP and DSP" into integration 2023-10-17 15:44:11 +02:00
Joanna Farley
159ebbfe80 Merge changes from topic "dcc-console" into integration
* changes:
  fix(dcc): enable DCC also for crash console
  build(changelog): add new scope for DCC
2023-10-17 15:22:54 +02:00
Yoshifumi Hosoya
138ddcbf4d fix(rcar3-drivers): update DDR setting
Update R-Car H3/M3/M3N DDR setting rev.0.42.

Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: Ia66dd2329ab3a3ca39132a737e92b3a4864db02d
2023-10-16 20:45:27 +02:00
Sandrine Bailleux
7bcd3cf557 Merge changes from topic "ecdsa_p384" into integration
* changes:
  refactor(arm): remove ARM_ROTPK_KEY_LEN comparison
  fix(st): setting default KEY_SIZE
  docs(cert-create): add key size options for ecdsa
  feat(arm): ecdsa p384/p256 full key support
  feat(tbbr): update PK_DER_LEN for ECDSA P-384 keys
  feat(auth): ecdsa p384 key support
  feat(cert-create): ecdsa p384 key support
2023-10-16 17:34:45 +02:00
laurenw-arm
c623fb2dad refactor(arm): remove ARM_ROTPK_KEY_LEN comparison
Removing ARM_ROTPK_KEY_LEN definition and comparison in full key .S
files since there is little value in comparing the defined value with a
static size. This becomes more maintenance than value addition.

Removing defines no longer required and general clean up of .S full key
files.

Change-Id: Id286b7078ab9e190e37a43804e2a8d1b0934c235
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-10-16 10:02:13 -05:00
Yann Gautier
7762531216 feat(st): support gcc as linker
One of the internal make rules for ST platforms uses the linker, but
with dedicated options for ld. Adapt the rule to check if the linker
is gcc and use updated options.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: If566dccfa329f9d34a80673a60c6fadd642a0231
2023-10-16 13:47:59 +02:00
Yann Gautier
cfe6767f7d fix(build): allow gcc linker on Aarch32 platforms
When trying to compile and link with gcc on an Aarch32 platform, there
is the following error:
arm-none-eabi-gcc: error: unrecognized command-line option
 '-mno-fix-cortex-a53-843419'; did you mean '-mno-fix-cortex-m3-ldrd'?

This option seems specific to Aarch64 version of GCC.
Enclose it with a check on ARCH=aarch64.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I8c8cb784ce2f2938c4c6999745dda09ee9a5669d
2023-10-16 13:47:59 +02:00
Toshiyuki Ogasahara
69c371bc16 fix(rcar3): fix CPG register code comment
Update the code comment to match referenced register.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Change-Id: Ie0ddbe0bffd31794425f0967c865e2928ce8d78d
2023-10-15 05:07:20 +02:00
Marek Vasut
281edfee02 fix(rcar3): update Draak and Eagle board IDs
The Draak board ID is 7, Eagle is 3, update them to match
HW documentation. Drop the U suffix from Ebisu board ID.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: Idd191614a6f1f8dbbc13b8e0bc1f089090f9d20b
2023-10-15 05:07:10 +02:00
laurenw-arm
6f3ca8ada6 fix(st): setting default KEY_SIZE
Setting default KEY_SIZE to 256 for ECDSA since it is currently being
set to 2048 by make_helpers/defaults.mk, which is an invalid size for
ECDSA

Change-Id: I4c0edf714dcd2a31d5e50ea060b1b5348167387d
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-10-13 10:12:57 -05:00
laurenw-arm
6adeeb4728 docs(cert-create): add key size options for ecdsa
Adding the possible key sizes for the ecdsa key algorithm.

Change-Id: I58947bc749fed911766a1462a0c2ba520b8f7c69
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-10-13 09:59:25 -05:00
laurenw-arm
b8ae68908d feat(arm): ecdsa p384/p256 full key support
Add full key support for ECDSA P384 and P256.

New .S files and p384 pem file created along with new
plat_get_rotpk_info() flag ARM_ROTPK_DEVEL_FULL_DEV_ECDSA_KEY_ID.

Change-Id: I578b257eca41070bb4f4791ef429f2b8a66b1eb3
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-10-13 09:59:25 -05:00
laurenw-arm
c1ec23dd60 feat(tbbr): update PK_DER_LEN for ECDSA P-384 keys
Adding the PK_DER_LEN option for 384 key size when adding ECDSA P384 key
support

Change-Id: I0f19aebad20d1c552976dc3c22ed396d79614769
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-10-13 09:59:25 -05:00
laurenw-arm
557f7d806a feat(auth): ecdsa p384 key support
Use KEY_SIZE 384 to enable ECDSA P384 key support by
setting MBEDTLS_ECP_DP_SECP384R1_ENABLED.

Selected by setting KEY_ALG=ecdsa and KEY_SIZE=384.

Change-Id: I382f34fc4da98f166a2aada5d16fdf44632b47f5
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-10-13 09:59:25 -05:00
laurenw-arm
c512c89cde feat(cert-create): ecdsa p384 key support
Adding ECDSA P384 (secp384r1) key creation support through key_bits
obtained from KEY_SIZE.

Change-Id: I571251caef20222990bd927cdfb5f35bf2a185d0
Signed-off-by: Lauren Wehrmeister <lauren.wehrmeister@arm.com>
2023-10-13 09:59:25 -05:00
Michal Simek
9c1c8f0101 feat(xilinx): switch boot console to runtime
Switch boot console to runtime at bl31_plat_runtime_setup() for all Xilinx
SOCs to follow default behavior. Till now boot console is used for the
whole lifecycle of TF-A. On the other hand there is no option to configure
different boot and run time console that's why this isn't really a issue.

Documentation is describing default behavior like this:
"
Function : bl31_plat_runtime_setup() [optional]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

::

    Argument : void
    Return   : void

The purpose of this function is allow the platform to perform any BL31 runtime
setup just prior to BL31 exit during cold boot. The default weak
implementation of this function will invoke ``console_switch_state()`` to switch
console output to consoles marked for use in the ``runtime`` state.
"

Change-Id: I08baa722dfd8b37b4440e84accf3baaeb01a686f
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-10-13 11:16:30 +02:00
Manish V Badarkhe
ad4e978774 Merge changes from topic "ns/spmc_at_el3" into integration
* changes:
  feat(rdn2): introduce platform handler for Group0 interrupt
  feat(rdn2): add plat hook for memory transaction
  feat(rdn2): introduce accessor function to obtain datastore
  feat(spm): separate StMM SP specifics to add support for a S-EL0 SP
  feat(rdn2): add defines needed for spmc-el3
  feat(ras): reuse SPM_MM specific defines for SPMC_AT_EL3
  feat(bl31): reuse SPM_MM specific defines for SPMC_AT_EL3
  feat(arm): reuse SPM_MM specific defines for SPMC_AT_EL3
  feat(el3-spmc): add a flag to enable support to load SEL0 SP
  refactor(spm-mm): reorganize secure partition manager shim code
2023-10-12 19:30:25 +02:00
Nishant Sharma
c47d0491ed feat(rdn2): introduce platform handler for Group0 interrupt
This patch introduces a handler for RDN2 platform to triage Group0
secure interrupts. Currently, it is empty but serves as a
placeholder for future Group0 interrupt sources.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: If0b64e507e9105813d9a5d16f70101cf0d8ca5a4
2023-10-12 11:41:51 +01:00
Nishant Sharma
f99dcbace7 feat(rdn2): add plat hook for memory transaction
RdN2 does not make MEM_SHARE/LEND requests. Instead, add a dummy
implementation of memory management related platform hooks.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: Ifce55b6661f03d379e2fd2dc5625200d550d8038
2023-10-12 11:41:31 +01:00
Nishant Sharma
f458934265 feat(rdn2): introduce accessor function to obtain datastore
In order to provide the EL3 SPMC a sufficient datastore to
record memory descriptor, introduce an accessor function
so that the backing memory can be allocated in a platform
defined manner to accommodate memory constraints and
desired usecases.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: If5842e79c2ad22ccc17362b114f47d9900d82f7e
2023-10-12 11:40:54 +01:00
Nishant Sharma
549bc04f14 feat(spm): separate StMM SP specifics to add support for a S-EL0 SP
This patch separates the code from SPM_MM to get xlat table context and
move it to a common location. In addition, only APIs required from both
SPM_MM and FF-A EL3 SPMC are moved to the common location.

This allows understanding better what is required to support a S-EL0 SP
instead of trying to retrofit what already exists.

Signed-off-by: Achin Gupta <achin.gupta@arm.com>
Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: I142d7fbef5239869176d0de93842c66051d7ed78
2023-10-12 11:40:24 +01:00
Nishant Sharma
b4bed4b769 feat(rdn2): add defines needed for spmc-el3
Add the following platform specific flags to enable SPMC build.

SECURE_PARTITION_COUNT: Number of secure partitions supported
NS_PARTITION_COUNT: Number of non secure partitions supported
MAX_EL3_LP_DESCS_COUNT: Number of logical partitions supported

Signed-off-by: Sayanta Pattanayak <sayanta.pattanayak@arm.com>
Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: I33d46be9dffd0acfc088bc1701dc0b1ed92dbf46
2023-10-12 10:47:18 +01:00
Nishant Sharma
6e92a82c81 feat(ras): reuse SPM_MM specific defines for SPMC_AT_EL3
For EL3 SPMC configuration enabled platforms, allow the reuse of
SPM_MM specific definitions.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: Ic88db49d4f854c718d064b2c301a639fc2df2857
2023-10-12 10:45:28 +01:00
Nishant Sharma
f5e1bed266 feat(bl31): reuse SPM_MM specific defines for SPMC_AT_EL3
For EL3 SPMC configuration enabled platforms, allow the reuse of
SPM_MM specific definitions.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: I5ef694f7e2f6d48ec7db26f92ccb350ed537e3f1
2023-10-12 10:44:34 +01:00
Nishant Sharma
5df1dccd0b feat(arm): reuse SPM_MM specific defines for SPMC_AT_EL3
For EL3 SPMC configuration enabled platforms, allow the reuse of
SPM_MM specific definitions.

Signed-off-by: Sayanta Pattanayak <sayanta.pattanayak@arm.com>
Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: Ia24b97343c7b8c6b22a4d54c5bb9cee2c480241f
2023-10-12 10:37:54 +01:00
Nishant Sharma
801cd3c84a feat(el3-spmc): add a flag to enable support to load SEL0 SP
Introduce a build flag for enabling the support for loading SEL0 SP in
EL3 SPMC.

Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: I1d63ae4d0d8374a732113565be90d58861506e39
2023-10-12 10:35:57 +01:00
Nishant Sharma
1132f06885 refactor(spm-mm): reorganize secure partition manager shim code
In preparation for adding the support for SEL0 SP in EL3 SPMC,
restructure the existing SPM_MM shim code in a way that allows reuse
of the code for both SPM_MM interface and FF-A EL3 SPMC interface. The
code for changing exception levels is identical for both.

With this restructuring of the code, the shim exception code is moved to
the common sub-directory.

Signed-off-by: Sayanta Pattanayak <sayanta.pattanayak@arm.com>
Signed-off-by: Nishant Sharma <nishant.sharma@arm.com>
Change-Id: Iadda9cf73f12b56e6a1d31fc21b5ba5dc355867f
2023-10-12 10:34:50 +01:00