| #
084b8864 |
| 23-Oct-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "gr/cov_fixes" into integration
* changes: fix(dsu): fix illegal address Coverity finding fix(sdei): fix coverity finding array index read
|
| #
6d113285 |
| 16-Oct-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
fix(sdei): fix coverity finding array index read
Fix - CID 463142: (#1 of 1): Overflowed array index read (INTEGER_OVERFLOW)
Based on issue - https://scan4.scan.coverity.com/#/project-view/68818/1
fix(sdei): fix coverity finding array index read
Fix - CID 463142: (#1 of 1): Overflowed array index read (INTEGER_OVERFLOW)
Based on issue - https://scan4.scan.coverity.com/#/project-view/68818/11439?selectedIssue=463142
Add boundary checks overflow checks.
Change-Id: I56022b605008f8d35231d70d058c4d449d618d34 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| #
5776045b |
| 23-Apr-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
Merge "fix(sdei): return SDEI_EINVAL if signaling state is incorrect" into integration
|
| #
b142ede7 |
| 07-Oct-2024 |
Igor Podgainõi <igor.podgainoi@arm.com> |
fix(sdei): return SDEI_EINVAL if signaling state is incorrect
In case a step is omitted when an SDEI event is registered, enabled, unmasked and then signaled, incorrect code paths may be reached.
T
fix(sdei): return SDEI_EINVAL if signaling state is incorrect
In case a step is omitted when an SDEI event is registered, enabled, unmasked and then signaled, incorrect code paths may be reached.
This patch adds additional checks to return early from such an incorrect state.
Change-Id: Ia2753e9a1b95544e1afa72603574fe830f51ea9f Signed-off-by: Igor Podgainõi <igor.podgainoi@arm.com> Signed-off-by: Mark Dykes <mark.dykes@arm.com>
show more ...
|
| #
a3b16996 |
| 02-Aug-2019 |
Alexei Fedorov <Alexei.Fedorov@arm.com> |
Merge "Switch AARCH32/AARCH64 to __aarch64__" into integration
|
| #
402b3cf8 |
| 09-Jul-2019 |
Julius Werner <jwerner@chromium.org> |
Switch AARCH32/AARCH64 to __aarch64__
NOTE: AARCH32/AARCH64 macros are now deprecated in favor of __aarch64__.
All common C compilers pre-define the same macros to signal which architecture the cod
Switch AARCH32/AARCH64 to __aarch64__
NOTE: AARCH32/AARCH64 macros are now deprecated in favor of __aarch64__.
All common C compilers pre-define the same macros to signal which architecture the code is being compiled for: __arm__ for AArch32 (or earlier versions) and __aarch64__ for AArch64. There's no need for TF-A to define its own custom macros for this. In order to unify code with the export headers (which use __aarch64__ to avoid another dependency), let's deprecate the AARCH32 and AARCH64 macros and switch the code base over to the pre-defined standard macro. (Since it is somewhat unintuitive that __arm__ only means AArch32, let's standardize on only using __aarch64__.)
Change-Id: Ic77de4b052297d77f38fc95f95f65a8ee70cf200 Signed-off-by: Julius Werner <jwerner@chromium.org>
show more ...
|
| #
873e394b |
| 11-Feb-2019 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1810 from antonio-nino-diaz-arm/an/setjmp
Make setjmp/longjmp compliant with the C standard and move them to libc
|
| #
e0566305 |
| 08-Feb-2019 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Make setjmp.h prototypes comply with the C standard
Instead of having a custom implementation of setjmp() and longjmp() it is better to follow the C standard.
The comments in setjmp.h are no longer
Make setjmp.h prototypes comply with the C standard
Instead of having a custom implementation of setjmp() and longjmp() it is better to follow the C standard.
The comments in setjmp.h are no longer needed as there are no deviations from the expected one, so they have been removed.
All SDEI code that relied on them has been fixed to use the new function prototypes and structs.
Change-Id: I6cd2e21cb5a5bcf81ba12283f2e4c067bd5172ca Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| #
8013bb57 |
| 16-Jan-2019 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1758 from pbeesley-arm/pb/spelling
Correct typographical errors
|
| #
8aabea33 |
| 11-Jan-2019 |
Paul Beesley <paul.beesley@arm.com> |
Correct typographical errors
Corrects typos in core code, documentation files, drivers, Arm platforms and services.
None of the corrections affect code; changes are limited to comments and other do
Correct typographical errors
Corrects typos in core code, documentation files, drivers, Arm platforms and services.
None of the corrections affect code; changes are limited to comments and other documentation.
Change-Id: I5c1027b06ef149864f315ccc0ea473e2a16bfd1d Signed-off-by: Paul Beesley <paul.beesley@arm.com>
show more ...
|
| #
9a207532 |
| 04-Jan-2019 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1726 from antonio-nino-diaz-arm/an/includes
Sanitise includes across codebase
|
| #
09d40e0e |
| 14-Dec-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths.
The following folders inside include/lib have been left unchanged:
- include/lib/cpus/${ARCH} - inclu
Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths.
The following folders inside include/lib have been left unchanged:
- include/lib/cpus/${ARCH} - include/lib/el3_runtime/${ARCH}
The reason for this change is that having a global namespace for includes isn't a good idea. It defeats one of the advantages of having folders and it introduces problems that are sometimes subtle (because you may not know the header you are actually including if there are two of them).
For example, this patch had to be created because two headers were called the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platform to avoid collision."). More recently, this patch has had similar problems: 46f9b2c3a282 ("drivers: add tzc380 support").
This problem was introduced in commit 4ecca33988b9 ("Move include and source files to logical locations"). At that time, there weren't too many headers so it wasn't a real issue. However, time has shown that this creates problems.
Platforms that want to preserve the way they include headers may add the removed paths to PLAT_INCLUDES, but this is discouraged.
Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| #
c5476386 |
| 31-Oct-2018 |
Antonio Niño Díaz <antonio.ninodiaz@arm.com> |
Merge pull request #1659 from vwadekar/sdei-fix-compilation
sdei: include "context.h" to fix compilation errors
|
| #
c4491aa9 |
| 31-Oct-2018 |
Varun Wadekar <vwadekar@nvidia.com> |
sdei: include "context.h" to fix compilation errors
This patch includes context.h from sdei_private.h to fix the following compilation errors:
<snip> In file included from services/std_svc/sdei/sde
sdei: include "context.h" to fix compilation errors
This patch includes context.h from sdei_private.h to fix the following compilation errors:
<snip> In file included from services/std_svc/sdei/sdei_event.c:9:0: services/std_svc/sdei/sdei_private.h: In function 'sdei_client_el': services/std_svc/sdei/sdei_private.h:164:2: error: unknown type name 'cpu_context_t' cpu_context_t *ns_ctx = cm_get_context(NON_SECURE); ^ services/std_svc/sdei/sdei_private.h:165:2: error: unknown type name 'el3_state_t' el3_state_t *el3_ctx = get_el3state_ctx(ns_ctx); ^ services/std_svc/sdei/sdei_private.h:165:2: error: implicit declaration of function 'get_el3state_ctx' [-Werror=implicit-function-declaration] services/std_svc/sdei/sdei_private.h:165:25: error: initialization makes pointer from integer without a cast [-Werror] el3_state_t *el3_ctx = get_el3state_ctx(ns_ctx); ^ services/std_svc/sdei/sdei_private.h:167:2: error: implicit declaration of function 'read_ctx_reg' [-Werror=implicit-function-declaration] return ((read_ctx_reg(el3_ctx, CTX_SCR_EL3) & SCR_HCE_BIT) != 0U) ? ^ services/std_svc/sdei/sdei_private.h:167:33: error: 'CTX_SCR_EL3' undeclared (first use in this function) return ((read_ctx_reg(el3_ctx, CTX_SCR_EL3) & SCR_HCE_BIT) != 0U) ? ^ services/std_svc/sdei/sdei_private.h:167:33: note: each undeclared identifier is reported only once for each function it appears in cc1: all warnings being treated as errors <snip>
Change-Id: Id0cad56accf81b19cb0d301784f3f086dd052722 Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| #
6d4f6aea |
| 22-Aug-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1528 from antonio-nino-diaz-arm/an/libc
libc: Cleanup library
|
| #
93c78ed2 |
| 16-Aug-2018 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
libc: Fix all includes in codebase
The codebase was using non-standard headers. It is needed to replace them by the correct ones so that we can use the new libc headers.
Change-Id: I530f71d9510cb03
libc: Fix all includes in codebase
The codebase was using non-standard headers. It is needed to replace them by the correct ones so that we can use the new libc headers.
Change-Id: I530f71d9510cb036e69fe79823c8230afe890b9d Acked-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| #
11dfe0b4 |
| 22-Aug-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1532 from jeenu-arm/misra-fixes
MISRA fixes
|
| #
ba6e5ca6 |
| 02-Aug-2018 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
SDEI: MISRA fixes
These changes address most of the required MISRA rules. In the process, some from generic code is also fixed.
No functional changes.
Change-Id: I6235a355e006f0b1c7c1c4d811b3964a6
SDEI: MISRA fixes
These changes address most of the required MISRA rules. In the process, some from generic code is also fixed.
No functional changes.
Change-Id: I6235a355e006f0b1c7c1c4d811b3964a64d0434f Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| #
b70dcbc1 |
| 22-Jun-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1443 from jeenu-arm/sdei-fixes
SDEI client EL determination fix
|
| #
a8778dd5 |
| 22-Jun-2018 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
SDEI: Fix determining client EL
commit 2ccfcb2ea555eb86122e7780010cc50fcee08f54 ("SDEI: Determine client EL from NS context's SCR_EL3") intended to read from SCR_EL3, but wrongly read from SPSR_EL3
SDEI: Fix determining client EL
commit 2ccfcb2ea555eb86122e7780010cc50fcee08f54 ("SDEI: Determine client EL from NS context's SCR_EL3") intended to read from SCR_EL3, but wrongly read from SPSR_EL3 instead. This patch fixes that.
Change-Id: I8ffea39cc98ef59cb8e7a4c6ef4cb12011c58536 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| #
9dfd7553 |
| 22-Jun-2018 |
Dimitris Papastamos <dimitris.papastamos@arm.com> |
Merge pull request #1437 from jeenu-arm/ras-remaining
SDEI dispatch changes to enable RAS use cases
|
| #
cdb6ac94 |
| 16-Feb-2018 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
SDEI: Make dispatches synchronous
SDEI event dispatches currently only sets up the Non-secure context before returning to the caller. The actual dispatch only happens upon exiting EL3 next time.
Ho
SDEI: Make dispatches synchronous
SDEI event dispatches currently only sets up the Non-secure context before returning to the caller. The actual dispatch only happens upon exiting EL3 next time.
However, for various error handling scenarios, it's beneficial to have the dispatch happen synchronously. I.e. when receiving SDEI interrupt, or for a successful sdei_dispatch_event() call, the event handler is executed; and upon the event completion, dispatcher execution resumes after the point of dispatch. The jump primitives introduced in the earlier patch facilitates this feature.
With this patch:
- SDEI interrupts and calls to sdei_dispatch_event prepares the NS context for event dispatch, then sets a jump point, and immediately exits EL3. This results in the client handler executing in Non-secure.
- When the SDEI client completes the dispatched event, the SDEI dispatcher does a longjmp to the jump pointer created earlier. For the caller of the sdei_dispatch_event() in particular, this would appear as if call returned successfully.
The dynamic workaround for CVE_2018_3639 is slightly shifted around as part of related minor refactoring. It doesn't affect the workaround functionality.
Documentation updated.
NOTE: This breaks the semantics of the explicit dispatch API, and any exiting usages should be carefully reviewed.
Change-Id: Ib9c876d27ea2af7fb22de49832e55a0da83da3f9 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| #
2ccfcb2e |
| 21-Jun-2018 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
SDEI: Determine client EL from NS context's SCR_EL3
Currently, the dispatcher reads from SCR_EL3 register directly to determine the EL of SDEI client. This is with the assumption that SCR_EL3 is not
SDEI: Determine client EL from NS context's SCR_EL3
Currently, the dispatcher reads from SCR_EL3 register directly to determine the EL of SDEI client. This is with the assumption that SCR_EL3 is not modified throughout. However, with RAS work flows, it's possible that SCR_EL3 register contains values corresponding to Secure world, and therefore EL determination can go wrong. To mitigate this, always read the register from the saved Non-secure context.
Change-Id: Ic85e4021deb18eb58757f676f9a001174998543a Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| #
af2c9ecd |
| 17-Jan-2018 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
SDEI: Allow platforms to define explicit events
The current macros only allow to define dynamic and statically-bound SDEI events. However, there ought be a mechanism to define SDEI events that are e
SDEI: Allow platforms to define explicit events
The current macros only allow to define dynamic and statically-bound SDEI events. However, there ought be a mechanism to define SDEI events that are explicitly dispatched; i.e., events that are dispatched as a result of a previous secure interrupt or other exception
This patch introduces SDEI_EXPLICIT_EVENT() macro to define an explicit event. They must be placed under private mappings. Only the priority flags are allowed to be additionally specified.
Documentation updated.
Change-Id: I2e12f5571381195d6234c9dfbd5904608ad41db3 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| #
c195f1a7 |
| 13-Nov-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #1152 from jeenu-arm/ehf-and-sdei
EHF and SDEI
|