| ffb77421 | 04-Dec-2023 |
Chris Kay <chris.kay@arm.com> |
build: use new toolchain variables for tools
This change migrates the values of `CC`, `CPP`, `AS` and other toolchain variables to the new `$(toolchain)-$(tool)` variables, which were introduced by
build: use new toolchain variables for tools
This change migrates the values of `CC`, `CPP`, `AS` and other toolchain variables to the new `$(toolchain)-$(tool)` variables, which were introduced by the toolchain refactor patch. These variables should be equivalent to the values that they're replacing.
Change-Id: I644fe4ce82ef1894bed129ddb4b6ab94fb04985d Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| b22e6898 | 11-Apr-2023 |
Yi Chou <yich@google.com> |
feat(cros_widevine): add ChromeOS widevine SMC handler
The ChromeOS will use the SMC to pass some secrets from firmware to optee.
Change-Id: Iaf3357d40a7ed22415926acd9d7979df24dd81f1 Signed-off-by:
feat(cros_widevine): add ChromeOS widevine SMC handler
The ChromeOS will use the SMC to pass some secrets from firmware to optee.
Change-Id: Iaf3357d40a7ed22415926acd9d7979df24dd81f1 Signed-off-by: Yi Chou <yich@google.com>
show more ...
|
| 7671008f | 20-Nov-2023 |
Manish Pandey <manish.pandey2@arm.com> |
fix(ehf): restrict secure world FIQ routing model to SPM_MM
Exception handling framework (EHF) changes the semantics of interrupts, sync and async external aborts. As far as interrupts are concerned
fix(ehf): restrict secure world FIQ routing model to SPM_MM
Exception handling framework (EHF) changes the semantics of interrupts, sync and async external aborts. As far as interrupts are concerned it changes the routing model of foreign interrupts (FIQs) by changing SCR_EL3.FIQ to 1 for both non-secure and secure except when SPMD is used along with Hafnium/SPM at S-EL2 [1]. For NS world it means : G1S and G0 interrupts are routed to EL3 For Secure world it means : G1NS and G0 are routed to EL3
There is no upstream use case utilizing EHF and re-routing EL3 interrupts to the Secure world except when SPM_MM is present.
Modify the FIQ routing model during EHF init just for known use cases, Always for NS world and for secure world only if SPM_MM is present.
[1]:https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/16047
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ic292bbe8dd02d560aece5802d79569d868d8500f
show more ...
|
| bfef8b90 | 08-Nov-2023 |
Juan Pablo Conde <juanpablo.conde@arm.com> |
feat(context-mgmt): report context memory usage
This patch provides a reporting functionality to display the memory consumed by the context in each security state and for each exception level. Flag
feat(context-mgmt): report context memory usage
This patch provides a reporting functionality to display the memory consumed by the context in each security state and for each exception level. Flag PLATFORM_REPORT_CTX_MEM_USE enables or disables this feature.
Change-Id: I1515366bf87561dcedf2b3206be167804df681d4 Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com> Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 8ddb02d5 | 30-Nov-2023 |
André Przywara <andre.przywara@arm.com> |
Merge changes from topic "fix-lto-build" into integration
* changes: fix(build): don't generate build-id fix(build): add forgotten BL_LDFLAGS to lto command line feat(build): check that .text
Merge changes from topic "fix-lto-build" into integration
* changes: fix(build): don't generate build-id fix(build): add forgotten BL_LDFLAGS to lto command line feat(build): check that .text section starts at page boundary
show more ...
|
| 630a06c4 | 03-Nov-2023 |
Olivier Deprez <olivier.deprez@arm.com> |
fix(el3-spmc): remove experimental flag
The EL3 SPMC is known to be deployed into end products and properly tested since its introduction into TF-A v2.7.
Signed-off-by: Olivier Deprez <olivier.depr
fix(el3-spmc): remove experimental flag
The EL3 SPMC is known to be deployed into end products and properly tested since its introduction into TF-A v2.7.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Change-Id: I96bb897cfefef20c33cfc39627b10746dce5485c
show more ...
|
| 3d6edc32 | 05-Sep-2023 |
Andrey Skvortsov <andrej.skvortzov@gmail.com> |
feat(build): check that .text section starts at page boundary
Linker may decide to put new unspecified sections before .text section. That will cause non-working image, because entry point isn't at
feat(build): check that .text section starts at page boundary
Linker may decide to put new unspecified sections before .text section. That will cause non-working image, because entry point isn't at __BLXX_START__. Device just not booted with such image.
This happened for example with .note.gnu.build-id section generated for LTO build in some cases. Now linker will report this situation as an error.
``` /usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: .text is not aligned on a page boundary. collect2: error: ld returned 1 exit status ```
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Change-Id: I5ae46ddd1e6e431e1df1715d1d301f6dd7181cc7
show more ...
|
| 6d22b089 | 11-Oct-2023 |
Manish Pandey <manish.pandey2@arm.com> |
fix(el3-runtime): restrict lower el EA handlers in FFH mode
This patch does following changes to restrict handling of lower EL EA's only if FFH mode is enabled.
- Compile ea_delegate.S only if FFH
fix(el3-runtime): restrict lower el EA handlers in FFH mode
This patch does following changes to restrict handling of lower EL EA's only if FFH mode is enabled.
- Compile ea_delegate.S only if FFH mode is enabled. - For Sync exception from lower ELs if the EC is not SMC or SYS reg trap it was assumed that it is an EA, which is not correct. Move the known Sync exceptions (EL3 Impdef) out of sync EA handler. - Report unhandled exceptions if there are SError from lower EL in KFH mode, as this is unexpected. - Move code out of ea_delegate.S which are used for KFH mode.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I577089677d0ec8cde7c20952172bee955573d2ed
show more ...
|
| f87e54f7 | 10-Oct-2023 |
Manish Pandey <manish.pandey2@arm.com> |
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 inter
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
show more ...
|
| 6597fcf1 | 26-Jun-2023 |
Manish Pandey <manish.pandey2@arm.com> |
feat(ras): use FEAT_IESB for error synchronization
For synchronization of errors at exception boundries TF-A uses "esb" instruction with FEAT_RAS or "dsb" and "isb" otherwise. The problem with esb i
feat(ras): use FEAT_IESB for error synchronization
For synchronization of errors at exception boundries TF-A uses "esb" instruction with FEAT_RAS or "dsb" and "isb" otherwise. The problem with esb instruction is, along with synching errors it might also consume the error, which is not ideal in all scenarios. On the other hand we can't use dsb always as its in the hot path.
To solve above mentioned problem the best way is to use FEAT_IESB feature which provides controls to insert an implicit Error synchronization event at exception entry and exception return.
Assumption in TF-A is, if RAS Extension is present then FEAT_IESB will also be present and enabled.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ie5861eec5da4028a116406bb4d1fea7dac232456
show more ...
|
| d04c04a4 | 25-May-2023 |
Manish Pandey <manish.pandey2@arm.com> |
feat(el3-runtime): modify vector entry paths
Vector entries in EL3 from lower ELs, first check for any pending async EAs from lower EL before handling the original exception. This happens when there
feat(el3-runtime): modify vector entry paths
Vector entries in EL3 from lower ELs, first check for any pending async EAs from lower EL before handling the original exception. This happens when there is an error (EA) in the system which is not yet signaled to PE while executing at lower EL. During entry into EL3 the errors (EA) are synchronized causing async EA to pend at EL3.
On detecting the pending EA (via ISR_EL1.A) EL3 either reflects it back to lower EL (KFH) or handles it in EL3 (FFH) based on EA routing model.
In case of Firmware First handling mode (FFH), EL3 handles the pended EA first before returing back to handle the original exception.
While in case of Kernel First handling mode (KFH), EL3 will return back to lower EL without handling the original exception. On returing to lower EL, EA will be pended. In KFH mode there is a risk of back and forth between EL3 and lower EL if the EA is masked at lower EL or priority of EA is lower than that of original exception. This is a limitation in current architecture but can be solved in future if EL3 gets a capability to inject virtual SError.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I3a2a31de7cf454d9d690b1ef769432a5b24f6c11
show more ...
|
| 461c0a5d | 18-Jul-2023 |
Elizabeth Ho <elizabeth.ho@arm.com> |
refactor(cm): move EL3 registers to global context
Currently, EL3 context registers are duplicated per-world per-cpu. Some registers have the same value across all CPUs, so this patch moves these re
refactor(cm): move EL3 registers to global context
Currently, EL3 context registers are duplicated per-world per-cpu. Some registers have the same value across all CPUs, so this patch moves these registers out into a per-world context to reduce memory usage.
Change-Id: I91294e3d5f4af21a58c23599af2bdbd2a747c54a Signed-off-by: Elizabeth Ho <elizabeth.ho@arm.com> Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| edebefbc | 11-Oct-2023 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
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 patc
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
show more ...
|
| f5e1bed2 | 12-Oct-2023 |
Nishant Sharma <nishant.sharma@arm.com> |
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
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
show more ...
|
| 1f6bb41d | 06-Sep-2023 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
refactor(el3-runtime): plat_ic_has_interrupt_type returns bool
Rather than returning 0 or 1, the above function returns bool false or true. No functional change.
Change-Id: Iea904ffc368568208fa8203
refactor(el3-runtime): plat_ic_has_interrupt_type returns bool
Rather than returning 0 or 1, the above function returns bool false or true. No functional change.
Change-Id: Iea904ffc368568208fa8203e0d2e0cdaa500b1e0 Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
show more ...
|
| 07f867b1 | 03-Aug-2023 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
fix(el3-runtime): leverage generic interrupt controller helpers
Rather than validating the type of interrupts supported by the platform interrupt controller, the interrupt management framework can d
fix(el3-runtime): leverage generic interrupt controller helpers
Rather than validating the type of interrupts supported by the platform interrupt controller, the interrupt management framework can directly use helper utilities implemented by the generic interrupt controller driver.
Change-Id: I735f8d2742a2c7974d11c0a5ddc771ad807c635c Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
show more ...
|
| ed8f06dd | 12-Jul-2023 |
thagon01-arm <Thaddeus.Gonzalez-Serna@arm.com> |
feat(fvp): capture timestamps in bl stages
When ENABLE_RUNTIME_INSTRUMENTATION flag is set timestamps are captured and output to the fvp console at various boot stages using the PMF library (which a
feat(fvp): capture timestamps in bl stages
When ENABLE_RUNTIME_INSTRUMENTATION flag is set timestamps are captured and output to the fvp console at various boot stages using the PMF library (which are based on aarch timers).
Timestamps are captured at entry and exit points for Bl1, Bl2 and, Bl3 respectively.
Change-Id: I7c0c502e5dbf73d711700b2fe0085ca3eb9346d2 Signed-off-by: Thaddeus Serna <Thaddeus.Gonzalez-Serna@arm.com>
show more ...
|
| 889e3d1c | 14-Aug-2023 |
Prasad Kummari <prasad.kummari@amd.com> |
fix(bl31): resolve runtime console garbage in next stage
When BL31 software is sending data through a communication channel, there's a chance that the final portion of the data could become disrupte
fix(bl31): resolve runtime console garbage in next stage
When BL31 software is sending data through a communication channel, there's a chance that the final portion of the data could become disrupted, if another software (BL32/RMM) starts setting up the channel at the same time. To solve this issue, make sure to flush the console data from BL31, before initializing BL32/RMM. This makes sure that the communication stays reliable.
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com> Change-Id: Icb8003e068b0b93bc4672e05f69001d9694a175c
show more ...
|
| 3991b889 | 20-Jul-2023 |
Manish Pandey <manish.pandey2@arm.com> |
refactor(el3-runtime): move interrupt exception handler from macro to a function
interrupt exception handler in vector entry is used as a asm macro (added as inline code) instead of a function call.
refactor(el3-runtime): move interrupt exception handler from macro to a function
interrupt exception handler in vector entry is used as a asm macro (added as inline code) instead of a function call. Since we have limited space (0x80) for a vector entry there is a chance that it may overflow in the future.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ieb59f249c58b52e56e0217268fa4dc40b420f8d3
show more ...
|
| 83a4dae1 | 16-Feb-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
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 ru
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
show more ...
|
| 24a70738 | 08-Mar-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
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
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
show more ...
|
| b2d85178 | 24-May-2023 |
Olivier Deprez <olivier.deprez@arm.com> |
fix: pass SMCCCv1.3 SVE hint to internal flags
This change fixes the initial support for SMCCCv1.3 SVE hint bit [1]. In the aarch64 smc handler, the FID[16] bit is improperly extracted and results i
fix: pass SMCCCv1.3 SVE hint to internal flags
This change fixes the initial support for SMCCCv1.3 SVE hint bit [1]. In the aarch64 smc handler, the FID[16] bit is improperly extracted and results in the corresponding flags bit to be always set. Fix by doing the proper masking and set into the flags register.
[1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/17511
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Change-Id: I62b8e211d48a50f28e184ff27cd718f51d8d56bf
show more ...
|
| f7d445fc | 27-Apr-2023 |
Michal Simek <michal.simek@amd.com> |
chore(bl): add UNALIGNED symbols for TEXT/RODATA
Add symbols to mark end of TEXT/RODATA before page alignment. Similar change was done by commit 8d69a03f6a7d ("Various improvements/cleanups on the l
chore(bl): add UNALIGNED symbols for TEXT/RODATA
Add symbols to mark end of TEXT/RODATA before page alignment. Similar change was done by commit 8d69a03f6a7d ("Various improvements/cleanups on the linker scripts") for RO_END/COHERENT_RAM. These symbols help to know how much free space is in the final binary because of page alignment.
Also show all *UNALIGNED__ symbols via poetry. For example: poetry run memory -p zynqmp -b debug
Change-Id: I322beba37dad76be9f4e88ca7e5b3eff2df7d96e Signed-off-by: Michal Simek <michal.simek@amd.com>
show more ...
|
| 9b5498a7 | 19-Apr-2023 |
Harrison Mutai <harrison.mutai@arm.com> |
build(bl31): add symbols for memory layout
Add symbols for mapping the physical memory layout of BL31. There are symbols that partially satisfy this requirement, however, the naming of these is inco
build(bl31): add symbols for memory layout
Add symbols for mapping the physical memory layout of BL31. There are symbols that partially satisfy this requirement, however, the naming of these is inconsistent.
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com> Change-Id: I413cc4e9d7471582eed61d631bed6214bd17a564
show more ...
|
| c84200ec | 10-May-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "fix(pmu): unconditionally save PMCR_EL0" into integration |