Commit graph

654 commits

Author SHA1 Message Date
Manish V Badarkhe
dea307fd6c refactor(fvp): remove RSS usage
Removed RSS usage from the Base AEM FVP platform, as it wasn't
functional on this platform. The Base AEM FVP platform lacks
support for RSS.
Instead, the TC2 platform with RSS is available for actual RSS
interface implementation and testing.

Change-Id: I8f68157319399ab526f9e851b26dba903db5c2e7
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-11-14 09:52:11 +02:00
Manish Pandey
f87e54f73c fix(ras): remove RAS_FFH_SUPPORT and introduce FFH_SUPPORT
This patch removes RAS_FFH_SUPPORT macro which is the combination of
ENABLE_FEAT_RAS and HANDLE_EA_EL3_FIRST_NS. Instead introduce an
internal macro FFH_SUPPORT which gets enabled when platforms wants
to enable lower EL EA handling at EL3. The internal macro FFH_SUPPORT
will be automatically enabled if HANDLE_EA_EL3_FIRST_NS is enabled.
FFH_SUPPORT along with ENABLE_FEAT_RAS will be used in source files
to provide equivalent check which was provided by RAS_FFH_SUPPORT
earlier. In generic code we needed a macro which could abstract both
HANDLE_EA_EL3_FIRST_NS and RAS_FFH_SUPPORT macros that had limitations.
Former was tied up with NS world only while the latter was tied to RAS
feature.

This is to allow Secure/Realm world to have their own FFH macros
in future.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ie5692ccbf462f5dcc3f005a5beea5aa35124ac73
2023-11-01 17:45:56 +00:00
Manish Pandey
970a4a8d8c fix(ras): restrict ENABLE_FEAT_RAS to have only two states
As part of migrating RAS extension to feature detection mechanism, the
macro ENABLE_FEAT_RAS was allowed to have dynamic detection (FEAT_STATE
2). Considering this feature does impact execution of EL3 and we need
to know at compile time about the presence of this feature. Do not use
dynamic detection part of feature detection mechanism.

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I23858f641f81fbd81b6b17504eb4a2cc65c1a752
2023-11-01 11:11:38 +00:00
Manish Pandey
e8d60a31ad Merge changes from topic "hm/mpam" into integration
* changes:
  fix(build): convert tabs and ifdef comparisons
  fix(build): disable ENABLE_FEAT_MPAM for Aarch32
2023-10-31 20:47:19 +01:00
Manish V Badarkhe
6cc9495822 Merge "refactor(fvp): do not use RSS platform token and attestation key APIs" into integration 2023-10-31 17:25:07 +01:00
Harrison Mutai
a07b4590dd fix(build): disable ENABLE_FEAT_MPAM for Aarch32
Disable FEAT_MPAM support for Aarch32 as it is not supported, following
[1]. ENABLE_FEAT_MPAM is set to 2 by default for Aarch64 in
arch_features.mk, eliminating the need for duplication in the platform
makefile.

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

Change-Id: I1c8b6844254e00e6372900f1c87f995f292ae65c
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-10-31 14:57:34 +00:00
Manish Pandey
fd7e32b810 Merge changes from topic "hm/post-image" into integration
* changes:
  refactor(fvp): move image handling into generic procedure
  refactor(bl2): make post image handling platform-specific
2023-10-31 12:59:37 +01:00
Manish Pandey
11336fb44d Merge changes from topic "gr/build_refactor" into integration
* changes:
  build(refactor): avoid ifdef comparison
  refactor(build): avoid using values for comparison
  refactor(build): reorder arch features handling
  build(n1sdp): add ARM_ARCH_MAJOR.ARM_ARCH_MINOR
  refactor(build): reorder platform Makefile evaluation
2023-10-30 17:26:04 +01:00
Govindraj Raja
d638029ffc refactor(build): avoid using values for comparison
With changes to refactor to use first platform makefiles
then parse arch_features.mk file 'ENABLE_RME' will be initialised
only when we define during build or at arch_features.mk thus
making comparison of 'ENABLE_RME' to '0' incorrect.

So keep BRBE disabled when RME is enabled at main makefile level.

Change-Id: I7e3d99eb444678d63585bd5971ada627cfc4fcc9
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-10-30 10:34:44 -05:00
Lauren Wehrmeister
48b92c604f Merge changes from topic "mb/psa-crypto-ecdsa" into integration
* changes:
  docs: mark PSA_CRYPTO as an experimental feature
  feat(fvp): increase BL1 RW area for PSA_CRYPTO implementation
  feat(mbedtls-psa): mbedTLS PSA Crypto with ECDSA
2023-10-30 16:20:24 +01:00
Harrison Mutai
568d406ce7 refactor(fvp): move image handling into generic procedure
Post image handling of the HW_CONFIG is out-of-scope for
`plat_get_next_bl_params`. Move parts of the code responsible for post
processing of loaded images into `bl2_plat_handle_post_image_load` for code
reusability and maintainability.

Change-Id: I476b3d306ebcd4529f5e542ba1063e144920bb5f
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-10-30 10:36:39 +00:00
Harrison Mutai
ed5672070d refactor(bl2): make post image handling platform-specific
In certain instances a platform may need to make modifications to an
image after it has been loaded by BL2. The existing common
implementation is a thin wrapper for a more generic arm post image
handler. To enable platforms to make changes to images when
they're loaded, move this into platform code.

Change-Id: I44025391056adb2d8a8eb4ea5984257b02027181
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-10-30 10:29:03 +00:00
Madhukar Pappireddy
efd812c3ee Merge "feat(cpus): add support for Travis CPU" into integration 2023-10-27 15:49:40 +02:00
Harrison Mutai
94c90ac816 feat(handoff): port BL31-BL33 interface to fw handoff framework
The firmware handoff framework is a light weight mechanism for sharing
information between bootloader stages. Add support for this framework at
the handoff boundary between runtime firmware BL31 and NS software on FVP.

Change-Id: Ib02e0e4c20a39e32e06da667caf2ce5a28de1e28
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-10-27 10:49:46 +01:00
Manish V Badarkhe
eb8700a938 refactor(fvp): do not use RSS platform token and attestation key APIs
Since FVP does not support RSS, RSS APIs used to provide the hardcoded
platform token and attestation key. However, that seems to be causing
un-necessary mandating of some PSA crypto definitions, that doesn't
seem appropriate.
Hence to retrieve platform token and realm attestation key, these
RSS APIs calls have been replaced with hardcoded information.

Change-Id: I5fd091025e3444a698b9d387763ce20db6b13ae1
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-10-26 21:01:00 +02:00
Juan Pablo Conde
a0594add2e feat(cpus): add support for Travis CPU
Adding basic CPU library code to support Travis CPU

Change-Id: I3c85e9fab409325d213978888a8f6d6949291258
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
2023-10-26 11:25:28 -05:00
Manish V Badarkhe
ce189383dc feat(fvp): increase BL1 RW area for PSA_CRYPTO implementation
When using PSA Crypto API, few algorithms like ECDSA require a
larger BL1 RW area. Hence added an additional BL1 RW page when
PSA_CRYPTO is selected.

Change-Id: Id6994667641a0b1e36b6a356d7c39a125d62ac01
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-10-26 08:53:20 +01:00
Manish Pandey
0e1dc0f2bc Merge "fix(mpam): refine MPAM initialization and enablement process" into integration 2023-10-25 19:14:06 +02:00
Arvind Ram Prakash
edebefbcbc fix(mpam): refine MPAM initialization and enablement process
Restricts MPAM to only NS world and enables trap to EL3 for access of
MPAM registers from lower ELs of Secure and Realm world.

This patch removes MPAM enablement from global context and adds it to
EL3 State context which enables/disables MPAM during world switches.
Renamed ENABLE_MPAM_FOR_LOWER_ELS to ENABLE_FEAT_MPAM and
removed mpam_init_el3() as RESET behaviour is trapping.

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I131f9dba5df236a71959b2d425ee11af7f3c38c4
2023-10-25 09:04:29 -05: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
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
Soby Mathew
920aa8d4d2 Merge "feat(rmmd): enable SME for RMM" into integration 2023-10-03 14:29:17 +02:00
Arunachalam Ganapathy
f92eb7e261 feat(rmmd): enable SME for RMM
This patch enables Scalable Matrix Extension (SME) for RMM. RMM will
save/restore required registers that are shared with SVE/FPU register
state so that Realm can use FPU or SVE.

The Relevant RMM support can be found here :
https://github.com/TF-RMM/tf-rmm/commit/0ccd7ae58b00

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I3bbdb840e7736dec00b71c85fcec3d5719413ffd
2023-10-02 16:55:36 +01:00
Raghu Krishnamurthy
b04343f3c9 fix(spmd): coverity scan issues
Coverity defects fixed by this patch are:
*** CID 400208:  Performance inefficiencies  (PASS_BY_VALUE)
/include/services/el3_spmd_logical_sp.h: 108 in
ffa_partition_info_regs_get_last_idx()

*** CID 400207:  Performance inefficiencies  (PASS_BY_VALUE)
/services/std_svc/spmd/spmd_logical_sp.c: 359 in
ffa_partition_info_regs_get_part_info()

Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: I9597377a8ec3d5519995e1619d99ee7102f33939
2023-09-25 13:06:13 -07:00
Olivier Deprez
4bb6bd1e5b Merge "fix(plat/arm): do not program DSU CLUSTERPWRDN register" into integration 2023-09-14 18:10:29 +02:00
Manish Pandey
3209b35d2a fix(plat/arm): do not program DSU CLUSTERPWRDN register
This reverts commit 9cf7f355ce.

Above mentioned commit was writing to cluster power required bit of
CLUSTERPWRDN register, which provides an advisory status to the power
controller.
Bit definition indication:
0 : Cluster power is not required when all cores are powered down
1 : Cluster power is required even when all cores are powered down
RESET value of this bit is 0

The current implementation in TF-A just programs this bit to 0 when
cluster power down is done but it never sets it to 1. Which actully
does not change any behaviour as the value of this bit always remains 0.

Ideally this bit has to be set to 1 when a core powers up (as RESET
value is 0) and set it to 0 for any core power down except if its last
man standing, in that case we need to ensure the target power level
from OS is cluster then we can do set it to 0.
There also are some investigation needs to be done to find that whether
we need a explicit message to power controller for turning cluster OFF
or it will happen automatically.

Considering this needs a bit of analysis as well as a platform to test
it on, revert the changes which impact the programming during cluster
power down and just keep register defnition.

Change-Id: I4c4ebedae7ca9cd081fb1e0605b9d906d77614d9
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
2023-09-14 11:42:14 +01:00
Manish V Badarkhe
03cf4e9aad fix(fvp): conditionally increase XLAT and MMAP table entries
The XLAT and MMAP table entries are increased as a part of this
patch: 12fe591 , but this is causing failures for some builds,
so conditionally increased the XLAT and MMAP table entries

Change-Id: I31e8c811bebc767d7187e045a35c9db0eef13ae0
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-09-13 15:02:18 +01:00
Manish V Badarkhe
f1dfaa42cf fix(fvp): increase the maximum size of Event Log
To make room for all image measurements using the
RME+SPM+TBB+MEASURED_BOOT test configuration, the Event Log's maximum
size has been significantly increased.

Change-Id: I0b9948dab893e14677bca0afa07167648a6c2729
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-09-07 15:55:59 +01:00
Manish V Badarkhe
12fe591b3e fix(fvp): increase maximum MMAP and XLAT entries count
Maximum entries for MMAP and XLAT have been increased in order to
support the configuration SPM+RME, along with MEASURED_BOOT and
TRUSTED_BOARD_BOOT.

Change-Id: Ic0a0aefecb49d7ccc71357c4bd94e7bd2e5f57c4
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-09-07 11:42:09 +01:00
Juan Pablo Conde
549795895c feat(cpus): add support for Nevis CPU
Adding basic CPU library code to support Nevis CPU

Change-Id: I399cc9b7b2d907b02b76ea2a3e5abb54e28fbf6c
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
2023-08-28 13:18:20 -05:00
Juan Pablo Conde
043f38fd50 build(bl32): added check for AARCH32_SP
If AACRH32_SP is not specified, it causes the DEFAULT_LINKER_SCRIPT
variable to be empty, and then the linker takes the variable following
it as if it was the linker script, which is not one. This patch
addresses that issue by requiring the AARCH32_SP variable to be set
before continuing.

Change-Id: I21db7d5bd86b98faaa1a1cd3f985daa592556a2d
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
2023-08-24 14:22:34 -05:00
Lauren Wehrmeister
abc2919c6c Merge "feat(cpus): add support for Gelas CPU" into integration 2023-08-14 21:05:23 +02:00
Madhukar Pappireddy
4ede8c39a2 Merge changes from topic "el3_direct_msg" into integration
* changes:
  docs(spm): document new build option
  feat(fvp): spmd logical partition smc handler
  feat(fvp): add spmd logical partition
  feat(spmd): get logical partitions info
  feat(spmd): add partition info get regs
  refactor(ff-a): move structure definitions
  feat(spmd): el3 direct message API
  feat(spmd): add spmd logical partitions
2023-08-14 17:12:59 +02:00
Raghu Krishnamurthy
a1a9a95071 feat(fvp): spmd logical partition smc handler
This patch adds a basic el3 spmd logical partition to the fvp platform
via a platform specific smc handler. One of the use cases for el3
logical partitions is to have the ability to translate sip calls into
ff-a direct requests via the use of spmd logical partitions. The smc
handler creates a direct request based on the incoming smc parameters
and forwards the call as a direct request from the spmd logical
partition to the target secure partition.

Change-Id: If8ba9aab8203924bd00fc1dcdf9cd05a9a04a147
2023-08-11 18:57:50 -07:00
Raghu Krishnamurthy
5cf311f3a4 feat(fvp): add spmd logical partition
This patch changes spmd.mk to include one or more SPMD logical
partitions specific to a platform. It also adds a basic SPMD logical
partition to fvp.

Change-Id: I2075e0458c92813913b28cbf4cfffc1f151e65cf
Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
2023-08-11 18:56:36 -07:00
Juan Pablo Conde
02586e0e28 feat(cpus): add support for Gelas CPU
This patch adds the necessary CPU library code to support the Gelas CPU

Change-Id: I13ec4a8bb7055c1ebd0796a4a1378983d930fcb3
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
2023-08-11 15:57:33 -05:00
Lauren Wehrmeister
29ae73e3fb Merge changes from topic "mb/mb-signer-id" into integration
* changes:
  feat(qemu): add dummy plat_mboot_measure_key() function
  docs(rss): update RSS doc for signer-ID
  feat(imx): add dummy 'plat_mboot_measure_key' function
  feat(tc): implement platform function to measure and publish Public Key
  feat(auth): measure and publicise the Public Key
  feat(fvp): implement platform function to measure and publish Public Key
  feat(fvp): add public key-OID information in RSS metadata structure
  feat(auth): add explicit entries for key OIDs
  feat(rss): set the signer-ID in the RSS metadata
  feat(auth): create a zero-OID for Subject Public Key
  docs: add details about plat_mboot_measure_key function
  feat(measured-boot): introduce platform function to measure and publish Public Key
2023-08-07 16:53:35 +02:00
Arvind Ram Prakash
7e030b3763 fix(errata-abi): added Neoverse N2 to Errata ABI list
added the missing Neoverse N2 flag required for
enabling Neoverse N2 CPU in Errata ABI

Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I06c6fa67e2f1ccc053f1b1b9261e189c56f4347a
2023-08-03 22:42:24 +02:00
Manish V Badarkhe
db55d23d34 feat(fvp): implement platform function to measure and publish Public Key
Implemented 'plat_mboot_measure_key' platform function for FVP platform
to measure and publish the public key information via RSS.

Change-Id: I0c9d6d6ac3650a939437e9331ed3c9246f242830
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-07-28 09:01:15 +01:00
Manish V Badarkhe
bfbb1cbaac feat(fvp): add public key-OID information in RSS metadata structure
Added public key-OID information in the RSS metadata structure.

Change-Id: I5ee5d41519980091296deaa1882fdfe9ae6766c0
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-07-28 09:01:15 +01:00
Jayanth Dodderi Chidanand
60784c3eef chore(fvp): add Aarch32 Cortex-A53 to the build
Change-Id: I493893d38d2db80e2c4d2efcf832c712a9abe5a8
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
2023-07-27 09:35:12 +01:00
Madhukar Pappireddy
cd91aa17c9 Merge "fix(fvp): adjust BL2 maximum size as per total SRAM size" into integration 2023-07-20 23:45:49 +02:00
Manish V Badarkhe
965aacea91 fix(fvp): adjust BL2 maximum size as per total SRAM size
Adjusted BL2 maximum size as per total SRAM size.

Change-Id: Ic3b398574a17e8a784e7c4dbe3fe69d1fb2b5e16
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-07-20 15:20:38 +01:00
Maksims Svecovs
4d0b66323b feat(mte): adds feature detection for MTE_PERM
Adds feature detection for v8.9 feature FEAT_MTE_PERM. Adds respective
ID_AA64PFR2_EL1 definitions and ENABLE_FEAT_MTE_PERM define.

Change-Id: If24b42f1207154e639016b0b840b2d91c6ee13d4
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
2023-07-20 09:00:22 +01:00
Wing Li
e0ef05bb2c fix(fvp): update system suspend in OS-initiated mode
This patch fixes system suspend in OS-initiated mode by setting the
value of `last_at_pwrlvl` in the `psci_power_state_t` object to
`PLAT_MAX_PWR_LVL`, which otherwise would result in undefined behavior.

This is conditionally compiled into the build depending on the value of
the `PSCI_OS_INIT_MODE` build option.

Change-Id: Ia0fb1e68af9320370325642b17c4569e9580aa3a
Signed-off-by: Wing Li <wingers@google.com>
2023-07-10 14:13:24 -07:00
Manish V Badarkhe
a99a378d0a refactor(fvp): update RSS driver inteface calls
In order to comply with the previous RSS driver change,
interface calls have been updated.

Change-Id: I0a1f3c6a6f8017468d86903cc0158805c6461c28
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-07-03 21:34:22 +01:00
Manish V Badarkhe
24e224b41c fix(fvp): adjust BL31 maximum size as per total SRAM size
Adjusted BL31 maximum size as per total SRAM size.

Change-Id: Ifdfdedb8af3e001cebba8e60c973f3c72be11652
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-06-28 21:53:51 +01:00
Manish V Badarkhe
e8947b27fe Merge "feat(fvp): allow configurable FVP Trusted SRAM size" into integration 2023-06-23 16:01:09 +02:00
Manish Pandey
0ad935f72a Merge changes from topic "ffa_el3_spmc_fixes" into integration
* changes:
  fix(tsp): fix destination ID in direct request
  fix(el3-spm): fix LSP direct message response
  fix(el3-spm): improve direct messaging validation
2023-06-22 16:49:55 +02:00
Marc Bonnici
c040621dba fix(el3-spm): fix LSP direct message response
Ensure that the example LSP correctly sets the
sender/receiver field in a direct response.

Signed-off-by: Marc Bonnici <marc.bonnici@arm.com>
Change-Id: I482c08d4657617adb00b0f3cf3c8ddc84f1bf7c8
2023-06-21 22:12:03 +01:00