Commit graph

13564 commits

Author SHA1 Message Date
Olivier Deprez
d5be802752 docs(spm-mm): remove reference to SEL2 SPMC
As the SEL2 SPMC design doc is migrated to Hafnium tree, remove the
reference to this implementation from TF-A's SPM-MM doc.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I1609c7d1d098420412dffc7b1309cc9c11502f8a
2023-10-31 11:19:41 +01:00
Olivier Deprez
6c33e8712e docs: remove SEL2 SPMC threat model
The SEL2/Hafnium SPMC implementation threat model is now hosted at [1].

[1] https://hafnium.readthedocs.io/en/latest/threat_model_spm.html

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I83d3f21ef0ee9364529c7b80de9872034ff92b09
2023-10-31 11:19:41 +01:00
Olivier Deprez
0fd975acad docs: remove unused SPM related diagrams
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ia60c4aa6a0aa0da5765d295e658964e6faa5960a
2023-10-31 11:19:41 +01:00
Lauren Wehrmeister
ed2d256a68 Merge changes from topic "mb/cov-fix" into integration
* changes:
  fix(tbbr): guard defines under MBEDTLS_CONFIG_FILE
  refactor(tbbr): enforce compile-time error for invalid algorithm selection
2023-10-27 22:05:35 +02:00
Sandrine Bailleux (on vacation)
a089646711 Merge changes from topic "gpt_updates" into integration
* changes:
  refactor(arm): use gpt_partition_init
  feat(partition): add interface to init gpt
  refactor(partition): convert warn to verbose
  feat(partition): add support to use backup GPT header
  refactor(partition): get GPT header location from MBR
  feat(arm): add IO policy to use backup gpt header
  feat(tbbr): add image id for backup GPT
2023-10-27 16:37:18 +02:00
Madhukar Pappireddy
efd812c3ee Merge "feat(cpus): add support for Travis CPU" into integration 2023-10-27 15:49:40 +02:00
Madhukar Pappireddy
047b328d26 Merge "fix(ti): align static device region addresses to reduce MMU table count" into integration 2023-10-27 15:47:17 +02:00
Manish Pandey
cb70aed442 Merge "feat(handoff): port BL31-BL33 interface to fw handoff framework" into integration 2023-10-27 15:46:01 +02:00
Govindraj Raja
08ec77c7fe refactor(arm): use gpt_partition_init
Current interface partition_init accepts GPT image id and parses the
GPT image but doesn't return any error on failure.

So use gpt_partition_init which implicitly initialises with GPT image
ID and returns a value.

Change-Id: I63280aa672388f1f8d9dc377ae13002c9f861f03
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-10-27 08:31:55 -05:00
Govindraj Raja
f08460dc08 feat(partition): add interface to init gpt
Current interface 'partition_init' accepts parameter image_id
and returns no value. But the entire partition driver is build
only to parse and handle GPT partitions, so add new interface
gpt_partition_init which would return failure to platform code
if it fails to parse the image.

Change-Id: Iaf574d2ad01a15d0723c1475290c31dc4a078835
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-10-27 08:31:54 -05:00
Govindraj Raja
0f23e7eb1e refactor(partition): convert warn to verbose
Convert all warn messages to verbose messages. As most warning are
needed during debug only and and won't increase the binary size by
default.

Change-Id: Icc5d5157f13507ccbc34675c20357117cad98255
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-10-27 08:31:54 -05:00
Govindraj Raja
ad2dd65871 feat(partition): add support to use backup GPT header
Currently we just use primary GPT header which is located in second
entry after MBR header, but if this block is corrupted or CRC
mismatch occurs we could try to use the backup GPT header located at
LBAn and GPT entries following this from LBA-33.

Add suitable warning messages before returning any errors to identify
the cause of issue.

Change-Id: I0018ae9eafbacb683a18784d2c8bd917c70f50e1
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-10-27 08:31:54 -05:00
Govindraj Raja
fce8a70edd refactor(partition): get GPT header location from MBR
GPT header is located in first LBA after MBR entry and mbr header has
details of beginning of first entry, so use mbr header entry first_lba
data to locate GPT header rather than GPT_HEADER_OFFSET.

GPT header size is available in gpt_header, so use that
rather than using DEFAULT_GPT_HEADER_SIZE.

The location of GPT entries is available once we parse gpt_header
and is available as partitiona_lba use that to load gpt_entries rather
than GPT_ENTRY_OFFSET.

Change-Id: I3c11f8cc9d4b0b1778a37fe342fb845ea4a4eff1
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-10-27 08:31:54 -05:00
Govindraj Raja
3e6d245772 feat(arm): add IO policy to use backup gpt header
Add a IO block spec to use GPT backup header if primary fails.
Currently we use only the primary gpt header which is in the second
block(LBA-1) after the MBR block(LBA-0) so we restrict IO access to
primary gpt header and its entries.

But we plan to use backup GPT which is the last block of the
partition (LBA-n) in case our primary GPT header fails verification
or is corrupted.

Offset and length of the block spec will be updated runtime from
partition driver after parsing MBR data.

Change-Id: Id1d49841d6f4cbcc3248af19faf2fbd8e24a8ba1
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-10-27 08:31:54 -05:00
Govindraj Raja
1051606c3d feat(tbbr): add image id for backup GPT
Add image identifier to access backup-GPT header and entry,
when we fail to get primary GPT header.

Currently we use only the primary gpt header, But we plan to
use backup GPT header in case our primary GPT header fails
verification or is corrupted.

Change-Id: I12eedd5d2a5cda21c64254d461d09d400d4edb30
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
2023-10-27 08:31:54 -05: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
Lauren Wehrmeister
113273aac4 Merge changes from topic "sm/err_errata" into integration
* changes:
  fix(cpus): fix the rev-var of Neoverse-V1
  fix(errata-abi): update the Neoverse-N2 errata ABI struct
  fix(errata-abi): update the neoverse-N1 errata ABI struct
  fix(cpus): fix the rev-var of Cortex-X2
  fix(errata-abi): update the Cortex-A78C errata ABI struct
  fix(cpus): update the rev-var for Cortex-A78AE
  fix(errata-abi): update the Cortex-A76 errata ABI struct
  fix(cpus): fix the rev-var for Cortex-A710
2023-10-26 21:03:06 +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
81c2e1566d fix(tbbr): guard defines under MBEDTLS_CONFIG_FILE
Several platforms, such as NXP platforms, employ Trusted Boot support
without relying on MBEDTLS_CONFIG. This patch addresses the build
issues that arose on such platforms as a result of recent change
c1ec23dd60 [1].

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

Change-Id: Idfbeeafb8a30dc15bb0060beb5b17819a8807084
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-10-26 11:30:39 +01:00
Manish V Badarkhe
2ea42fec35 refactor(tbbr): enforce compile-time error for invalid algorithm selection
Enforced compile-time error on invalid algorithm selection.

Change-Id: I517aa11c9fa9fda49483f95587f43529085c9d5d
Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
2023-10-26 11:29:51 +01:00
Manish Pandey
41095bd3f9 Merge "fix(arm): fix GIC macros for GICv4.1 support" into integration 2023-10-26 12:00:33 +02:00
Manish Pandey
2c1cbfdddd Merge "fix(spmd): fix FFA_VERSION forwarding" into integration 2023-10-26 11:27:26 +02:00
Andrew Davis
53a868f676 fix(ti): align static device region addresses to reduce MMU table count
Align our device memory regions to the next highest MMU table level (LV2).
This allows the xlat_tables library code to use a single entry in the
higher order table, vs having to create a new table for LV3 entries.

This reduces our tables to just 4: 2 LV2 and 1 LV3 plus 1 spare in case
alignment changes ever cause one to be split. This saves 24KB of our
128KB total TF-A SRAM (~18%!).

While here, as USE_COHERENT_MEM does not change MAX_XLAT_TABLES but
does change our total MAX_MMAP_REGIONS, move that check accordingly.

Signed-off-by: Andrew Davis <afd@ti.com>
Change-Id: I4cb8e3b2cc3d05c6c9a84d887dd6ec56bde7a786
2023-10-25 17:01:03 -05:00
Manish Pandey
0e1dc0f2bc Merge "fix(mpam): refine MPAM initialization and enablement process" into integration 2023-10-25 19:14:06 +02:00
Moritz Fischer
f1df8f10c6 fix(arm): fix GIC macros for GICv4.1 support
Newer platforms such as Neoverse V2 with GICv4.1 will report
0x3 instead of 0x1 in ID_AA64PFR0_EL1.

Update the logic to not accidentially take the GICv2 path
when printing the GIC registers.

Change-Id: Ia0d546cc5dcaa0dcad49a75b5921b0df5e176d34
Signed-off-by: Moritz Fischer <moritzf@google.com>
2023-10-25 16:14:31 +00:00
Manish Pandey
a093d394a7 Merge "fix(build): convert tabs to spaces" into integration 2023-10-25 16:49:51 +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
Olivier Deprez
76d53ee1aa fix(spmd): fix FFA_VERSION forwarding
When FFA_VERSION is forwarded from SPMD to SPMC, ensure that the full
NS GP regs context incl. x8-x17 is carried when building the SPMD to
SPMC direct message.

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I3467c0e04de95ab80f7c86a0763021a5fa961e4d
2023-10-25 11:27:10 +02:00
Olivier Deprez
4a2ff22fd4 Merge "feat(mt8195): increase TZRAM" into integration 2023-10-25 09:55:08 +02:00
Manish Pandey
c20b0c58c2 Merge "feat(st): update STM32MP DT files" into integration 2023-10-25 09:53:23 +02:00
Manish Pandey
17e0a8c5db Merge changes from topic "st_remove_shm" into integration
* changes:
  docs(stm32mp15): mark STM32MP15_OPTEE_RSV_SHM deprecated
  feat(stm32mp15): disable OP-TEE shared memory
2023-10-25 09:44:27 +02:00
Manish Pandey
13f54450c9 Merge "fix(st): properly check LOADADDR" into integration 2023-10-25 09:38:41 +02:00
Manish Pandey
0efa651234 Merge "fix(cpus): workaround for Cortex-A510 erratum 2080326" into integration 2023-10-25 09:28:23 +02:00
Sona Mathew
6e86475d55 fix(cpus): workaround for Cortex-A510 erratum 2080326
Cortex-A510 erratum 2080326 is a Cat B erratum that applies
to all revisions <= r0p2 and is fixed in r0p3.
The workaround sequence helps perform a DSB after each TLBI
instruction and can be applied only for version r0p2 and has
minimal performance impact.
The workaround is not applicable for versions < r0p2.

SDEN documentation:
https://developer.arm.com/documentation/SDEN1873361/latest

Change-Id: Ib9bce8b711c25a79f7b2f891ae6f8b366fc80ddd
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:35:21 -05:00
Sona Mathew
ab2b56df26 fix(cpus): fix the rev-var of Neoverse-V1
Update the revision and variant information in the
errata ABI file, neoverse_v1.S file for erratum ID - 2294912
to match the revision and variant in the latest SDEN.

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

Change-Id: I38a0f53c3515860ba442b5c0872c8ab051fdda6f
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:15:17 -05:00
Sona Mathew
80af87e476 fix(errata-abi): update the Neoverse-N2 errata ABI struct
Updated the structure for Neoverse_N2 in the errata ABI file
for the missing entries from the neoverse_n2.S file.

Change-Id: I635c39014a7b3e842a978a59e122d508d4bcf3c1
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:15:17 -05:00
Sona Mathew
56747a5caa fix(errata-abi): update the neoverse-N1 errata ABI struct
Updated the structure for Neoverse_N1 in the errata ABI file
for the missing entries from the neoverse_n1.S file.

Change-Id: I79a1a72b807781d65a6afc9e0367e77b21eecf41
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:15:17 -05:00
Sona Mathew
8ae66d624e fix(cpus): fix the rev-var of Cortex-X2
Update the revision and variant information in the
errata ABI file, cortex_X2.S file for erratum ID - 2058056
to match the revision and variant in the latest SDEN.

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

Change-Id: I28ee39949d977c53d6f5243100f0c29bc3c0428c
Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
2023-10-24 14:15:17 -05:00
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