Commit Graph

12930 Commits

Author SHA1 Message Date
Manish V Badarkhe
a1c93550bc docs: remove redundant Measured Boot interface info
A separate design document for Measured Boot covers the porting
guidelines for the Measured Boot interfaces. As a result,
the Measured Boot interfaces have been removed from the porting
guide and a link to the Measured Boot design document has been
provided.

Change-Id: Ia6bd2620d830aea6aececab4af7e10a6d737f025
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-07-06 12:14:38 +01:00
Manish V Badarkhe
5038f1f90e docs: add Measured Boot design
Added design document for Measured Boot implementation in
TF-A.

Change-Id: I25b57ec555b289eb6bbf0a6aae014d7bf6d152fd
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-07-06 12:14:30 +01:00
Sandrine Bailleux
da36a23270 Merge changes from topic "mb/mb-rss-refactor" into integration
* changes:
  refactor(tc): update RSS driver inteface calls
  refactor(fvp): update RSS driver inteface calls
  refactor(rss): make RSS driver standalone for Measured Boot
2023-07-06 08:41:43 +02:00
Olivier Deprez
0e04a20170 Merge "build(tools): avoid unnecessary link" into integration 2023-07-05 14:50:04 +02:00
Vincent Stehlé
aa57ce632c build(tools): avoid unnecessary link
In their respective makefiles, cert_create, encrypt_fw and fiptool
depend on the --openssl phony target as a prerequisite. This forces
those tools to be re-linked each time.

Move the dependencies on the --openssl target from the tools to their
makefiles all targets, to avoid unnecessary linking while preserving the
OpenSSL version printing done in the --openssl targets when in debug.

Fixes: cf2dd17ddd ("refactor(security): add OpenSSL 1.x compatibility")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Change-Id: I98a3ab30f36dffc253cecaaf3a57d2712522135d
2023-07-05 13:00:18 +02:00
Manish V Badarkhe
e69400cfa6 Merge "feat(morello): fdts: add CoreSight DeviceTree bindings" into integration 2023-07-05 12:02:27 +02:00
Manish V Badarkhe
3c283af56d Merge "fix(n1sdp): configure platform specific secure SPIs" into integration 2023-07-05 12:00:33 +02:00
Sandrine Bailleux
30b44fa5ac Merge "feat(qemu): add "neoverse-v1" cpu support" into integration 2023-07-05 08:55:52 +02:00
Manish Pandey
e7644eb6ff Merge "chore(xilinx): reorder include files as per TF-A guidelines" into integration 2023-07-04 19:12:40 +02:00
Manish Pandey
38a0548546 Merge "fix(versal-net): correct device node indexes" into integration 2023-07-04 19:11:24 +02:00
Manish Pandey
55d151470d Merge "fix(st-uart): correctly check UART enabled in flush fonction" into integration 2023-07-04 19:10:40 +02:00
Sandrine Bailleux
c20ac56892 Merge "fix(intel): fix ncore ccu snoop dvm enable bug" into integration 2023-07-04 15:53:13 +02:00
Jit Loon Lim
106aa54d92 fix(intel): fix ncore ccu snoop dvm enable bug
Incorrect value stored in Coherent Subsystem ACE DVM Snoop Enable
register (CSADSER0). Set individual bit othervise previous value
is overwritten.

Signed-off-by: Anders Hedlund <anders.hedlund@windriver.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
Change-Id: Ib72fed261cbc3076ce385e19c4a5fa8e9e8b9924
2023-07-04 15:52:47 +02:00
Werner Lewis
7b0c95abc8 fix(n1sdp): configure platform specific secure SPIs
Previous implementation used common CSS interrupts, which do not match
the N1SDP platform interrupt map. Updated to configure Secure
interrupts according to the N1SDP TRM and InfraSYSDESIGN4.0
specification. Additionally, unused definitions from legacy interrupt
configuration are removed.

Signed-off-by: Werner Lewis <werner.lewis@arm.com>
Change-Id: I3dd4bcd4875e138057c62d937572d446b8f88471
2023-07-04 14:48:09 +01:00
Werner Lewis
3e6cfa7bd0 feat(morello): fdts: add CoreSight DeviceTree bindings
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
Change-Id: I6bc524aa9a4810e2c2df92df7fd13a27b0328766
2023-07-04 14:42:59 +01:00
Marcin Juszkiewicz
214de62c92 feat(qemu): add "neoverse-v1" cpu support
Add support to qemu "neoverse-v1" cpu for "qemu_sbsa" ('sbsa-ref')
platform.

Change-Id: Id710e2b960e7938d2dbe7a88d9e158a7009fc3d1
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
2023-07-04 15:42:08 +02:00
Manish V Badarkhe
cd89a704a1 refactor(tc): update RSS driver inteface calls
In order to comply with the previous RSS driver change,
interface calls have been updated.

Change-Id: I645f6e8638cedfa6ff92d07b93cbaf38bdb2e09f
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-07-03 21:34:22 +01: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
36bcf10c23 refactor(rss): make RSS driver standalone for Measured Boot
Currently, Measured Boot RSS driver gathers data from platform calls,
specifically RSS metadata. Generally, the driver should use the least
amount of platform calls possible, and the platform should provide the
data directly to the driver via the driver interface.

For this purpose, RSS Measured Boot driver interface APIs were updated
and platform calls were removed from RSS Measured Boot driver.

Change-Id: I6c797d9ac2d70215f32a084a7643884b399ee28c
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-07-03 21:34:22 +01:00
Joanna Farley
8e31faa05b Merge changes from topic "xlnx_handoff_changes" into integration
* changes:
  chore(xilinx): update warning message
  feat(versal-net): add cluster check in handoff parameters
  feat(versal-net): get the handoff params using IPI
  chore(xilinx): replace fsbl with xbl
2023-06-30 12:59:37 +02:00
Jay Buddhabhatti
66b5620c87 fix(versal-net): correct device node indexes
Currently, the peripheral node indexes are incorrect
for Versal NET due to which incorrect node error is
generated and permission to set the device as wakeup
source is failed. Correct Versal NET peripheral node
indexes to fix above issue.

Fixes: 662aafd6475e ("feat(xilinx): add device node indexes")
Change-Id: I4a2d76f375645e13512599a0272d9322ff6fafd3
Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
2023-06-30 14:33:13 +05:30
Manish Pandey
1c62cc7fbd Merge "fix(mediatek): support saving/restoring GICR registers" into integration 2023-06-30 10:11:21 +02:00
Akshay Belsare
a0a4d86c7e chore(xilinx): update warning message
Update the Warning message to be more informative
about the warning being printed.

Change-Id: I923dc5dd760908844d5e1ac8542fd1b04c9f0af5
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-06-30 10:36:37 +05:30
Akshay Belsare
01c8c6a554 feat(versal-net): add cluster check in handoff parameters
Versal NET platform supports multiple cpu clusters and the cluster
information for every partition contaning firmware component
is being passed by PLM through handoff parameters to TF-A.

Function implementation for getting cluster value for the firmware
component partition in TF-A and check for the firmware component
being targeted to be executed on Cluster 0.

Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
Change-Id: I8622699e12b0a9cda83ae46e2ad0a038ca377fda
2023-06-30 10:36:37 +05:30
Akshay Belsare
a36ac40c4e feat(versal-net): get the handoff params using IPI
Use the IPI command GET_HANDOFF_PARAM to get the PLM to TF-A handoff
parameters. The BL32/BL33 information from the handoff parameters will
be used by TF-A.

If no valid PLM to TF-A handoff parameters are available then,
the TF-A will fall back to the build time information or defaults
set in the TF-A for BL32/BL33.

Once the bootmode identification is supported the default configuration
will be done only for JTAG and for all other bootmodes PLM to TF-A
handoff parameters will be used.

Change-Id: Ia2204fe30fea6f32b4e5d2610820217e6ed23e4d
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-06-30 10:36:37 +05:30
Prasad Kummari
b9d26cd3c4 chore(xilinx): replace fsbl with xbl
The handoff functionality is common between platforms and all
platforms do not use fsbl terminology. Renaming handoff related code
to generic naming.

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Change-Id: Ic250af927f33c4fecbc2e6bab01b83a6dd2aab52
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
2023-06-30 10:36:37 +05:30
Madhukar Pappireddy
e87102f32b Merge changes from topic "gr/cpu_rename" into integration
* changes:
  chore: rename hayes to a520
  chore: rename hunter to a720
  chore: rename hunter_elp to cortex-x4
2023-06-29 17:36:44 +02:00
Govindraj Raja
dea3d71e9a chore: rename hayes to a520
Rename Cortex-hayes to Cortes-A520

Change-Id: Ic574b55b1aaf11b5bf7b583e244245e7b54bdb22
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-06-29 17:20:17 +02:00
Govindraj Raja
31b3945527 chore: rename hunter to a720
Rename cortex_hunter to cortex_a720

Change-Id: Id4e0e2cd47051c2e92b3f16373ea06ef4df1d75f
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-06-29 16:20:01 +01:00
Lauren Wehrmeister
0bc2f3d2bb Merge "fix(fvp): adjust BL31 maximum size as per total SRAM size" into integration 2023-06-29 17:14:29 +02:00
Govindraj Raja
870fcb9495 chore: rename hunter_elp to cortex-x4
Rename hunter_elp to cortex-x4

Change-Id: I78c8c009d7bee14b4793dc1d950ed81273216831
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-06-29 09:46:08 -05:00
Manish Pandey
26d67076e0 Merge changes from topic "bk/context_refactor" into integration
* changes:
  refactor(pmu): convert FEAT_MTPMU to C and move to persistent register init
  feat(pmu): introduce pmuv3 lib/extensions folder
  fix(pmu): make MDCR_EL3.MTPME=1 out of reset
  refactor(cm): introduce a real manage_extensions_nonsecure()
2023-06-29 12:31:26 +02:00
Boyan Karatotev
83a4dae1af refactor(pmu): convert FEAT_MTPMU to C and move to persistent register init
The FEAT_MTPMU feature disable runs very early after reset. This means,
it needs to be written in assembly, since the C runtime has not been
initialised yet.

However, there is no need for it to be initialised so soon. The PMU
state is only relevant after TF-A has relinquished control. The code
to do this is also very verbose and difficult to read. Delaying the
initialisation allows for it to happen with the rest of the PMU. Align
with FEAT_STATE in the process.

BREAKING CHANGE: This patch explicitly breaks the EL2 entry path. It is
currently unsupported.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I2aa659d026fbdb75152469f6d19812ece3488c6f
2023-06-29 09:59:06 +01:00
Boyan Karatotev
c73686a11c feat(pmu): introduce pmuv3 lib/extensions folder
The enablement code for the PMU is scattered and difficult to track
down. Factor out the feature into its own lib/extensions folder and
consolidate the implementation. Treat it is as an architecturally
mandatory feature as it is currently.

Additionally, do some cleanup on AArch64. Setting overflow bits in
PMCR_EL0 is irrelevant for firmware so don't do it. Then delay the PMU
initialisation until the context management stage which simplifies the
early environment assembly. One side effect is that the PMU might count
before this happens so reset all counters to 0 to prevent any leakage.

Finally, add an enable to manage_extensions_realm() as realm world uses
the pmu. This introduces the HPMN fixup to realm world.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ie13a8625820ecc5fbfa467dc6ca18025bf6a9cd3
2023-06-29 09:59:06 +01:00
Boyan Karatotev
33815eb719 fix(pmu): make MDCR_EL3.MTPME=1 out of reset
Make the default value for MTPME always be 1 to preserve the reset
behaviour on newer revisions and on older revisions where the bit is
RES0 it doesn't matter.

Before its introduction MDCR_EL3.MTPME was RES0. Upon its introduction
the field resets to 1, making the MTPMU architecturally "enabled". As
such, the logical action on TF-A's part is to "disable" it, which led to
the introduction of DISABLE_MTPMU.

This hinges on the assumption that MDCR_EL3.MTPME will always be 1
unless the above flag is set. Unfortunately this is not the case, as the
reset value is overwritten at reset with a macro that sets this bit to
0.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ie570774972f246b3aa41dc016ecbcc6fc2f581f6
2023-06-29 09:59:06 +01:00
Boyan Karatotev
24a70738b2 refactor(cm): introduce a real manage_extensions_nonsecure()
manage_extensions_nonsecure() is problematic because it updates both
context and in-place registers (unlike its secure/realm counterparts).
The in-place register updates make it particularly tricky, as those
never change for the lifetime of TF-A. However, they are only set when
exiting to NS world. As such, all of TF-A's execution before that
operates under a different context. This is inconsistent and could cause
problems.

This patch Introduce a real manage_extensions_nonsecure() which only
operates on the context structure. It also introduces a
cm_manage_extensions_el3() which only operates on register in-place that
are not context switched. It is called in BL31's entrypoints so that all
of TF-A executes with the same environment once all features have been
converted.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ic579f86c41026d2054863ef44893e0ba4c591da9
2023-06-29 09:59:06 +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
Yann Gautier
a5273808aa fix(st-uart): correctly check UART enabled in flush fonction
Use tst instead of ands to check USART_CR1_UE bit is set. If not exit
the flush function.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ibd2e18f6d8837073d0bbcb150e993985d3c0dd6f
2023-06-28 18:09:32 +02:00
Lauren Wehrmeister
098312edf7 Merge changes from topic "ms/cpu_errata" into integration
* changes:
  refactor(cpus): add Cortex-A72 errata information
  refactor(cpus): convert Rainier to use errata framework
  refactor(cpus): convert QEMU Max to use the errata framework
2023-06-28 17:28:57 +02:00
Olivier Deprez
448d4d97aa Merge "docs: remove deprecated tc0 from list of supported FVPs" into integration 2023-06-28 15:44:31 +02:00
Sandrine Bailleux
54e4b922a2 Merge "feat(qemu_sbsa): handle GIC ITS address" into integration 2023-06-28 13:46:52 +02:00
Marcin Juszkiewicz
4171e981d1 feat(qemu_sbsa): handle GIC ITS address
Read data from DeviceTree provided by QEMU, provide via SMC
to the next firmware level.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Change-Id: I95c5f00ab2cca3b5fda122dcc8d7704a7a82059b
2023-06-28 13:07:58 +02:00
Lauren Wehrmeister
f339dfd68f Merge "feat(cpus): add support for hermes cpu" into integration 2023-06-27 21:55:58 +02:00
Govindraj Raja
a00e907696 feat(cpus): add support for hermes cpu
Adding basic CPU library code to support the Hermes CPU.

Change-Id: I61946033fe5fafb56ceb2d14d4c796d85b30457e
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-06-27 10:49:38 -05:00
Maksims Svecovs
f337f39c62 refactor(cpus): add Cortex-A72 errata information
* adds add_erratum_etnry for all described erratas.
* replaces errata_report function with errata_report_shim to report
errata automatically

Change-Id: I7e3315d5cc77b77c328fff7f3988ec588b8f88b9
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
2023-06-27 15:42:21 +01:00
Maksims Svecovs
e8b30c2921 refactor(cpus): convert Rainier to use errata framework
This involves replacing:
 * the reset_func with the standard cpu_reset_func_{start,end} to apply
   errata automatically
 * the <cpu>_errata_report with the errata_report_shim to report errata
   automatically
as well as specifically related to single errata for this CPU:
 * the prologue with the workaround_<type>_start to do the checks and
   framework registration automatically
 * the epilogue with the workaround_<type>_end
 * the checker function with the check_erratum_<type> to make it more
   descriptive

Change-Id: I31cacbbdd4caa12b32e2c65ec456b0ab6b1a9101
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
2023-06-27 15:42:10 +01:00
Maksims Svecovs
e5cc52dbf6 refactor(cpus): convert QEMU Max to use the errata framework
This involves replacing:
* the <cpu>_errata_report with the errata_report_shim to report errata
automatically.

Change-Id: I78b65052dcfc1f29b7dec443bd0aaf67d0efb4eb
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
2023-06-27 15:41:56 +01:00
Manish Pandey
3995f30c55 Merge "refactor(build): merge march32/64 directives" into integration 2023-06-27 10:19:56 +02:00
Manish V Badarkhe
b7d9755ec0 Merge "refactor(fdt-wrappers): fix for unit testing errors" into integration 2023-06-27 10:10:05 +02:00
Prasad Kummari
01a326abeb chore(xilinx): reorder include files as per TF-A guidelines
This commit reorders the include files in accordance with the
guidelines provided by Trusted Firmware-A (TF-A).
The include files are rearranged to ensure a consistent and
organized structure in the codebase, facilitating better
readability and maintainability.

https: //trustedfirmware-a.readthedocs.io/en/latest/process/coding-style.html#headers-and-inclusion
https://git.trustedfirmware.org/ci/tf-a-ci-scripts.git/tree/script/static-checks/

For example, to run header check:
/tf-a-ci-scripts/script/static-checks/check-include-order.py --tree ${PWD} > Includefileorder.txt

Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
Change-Id: Ia5802722e69859596b94f31ec40755adbf7d865b
2023-06-27 10:14:09 +05:30