| f5360cfa | 17-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(trbe): enable FEAT_TRBE for FEAT_STATE_CHECKED
At the moment we only support FEAT_TRBE to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime dete
refactor(trbe): enable FEAT_TRBE for FEAT_STATE_CHECKED
At the moment we only support FEAT_TRBE to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime detection (ENABLE_TRBE_FOR_NS=2), by splitting is_feat_trbe_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access TRBE related registers.
The FVP platform decided to compile in support unconditionally (=1), even though FEAT_TRBE is an ARMv9 feature, so is not available with the FVP model's default command line. Change that to the now supported dynamic option (=2), so the right decision can be made by the code at runtime.
Change-Id: Iee7f88ea930119049543a8a4a105389997e7692c Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| dc2b8e80 | 23-Feb-2023 |
Bipin Ravi <bipin.ravi@arm.com> |
Merge changes from topic "panic_cleanup" into integration
* changes: refactor(bl31): use elx_panic for sysreg_handler64 refactor(aarch64): rename do_panic and el3_panic refactor(aarch64): remo
Merge changes from topic "panic_cleanup" into integration
* changes: refactor(bl31): use elx_panic for sysreg_handler64 refactor(aarch64): rename do_panic and el3_panic refactor(aarch64): remove weak links to el3_panic refactor(aarch64): refactor usage of elx_panic refactor(aarch64): cleanup HANDLE_EA_EL3_FIRST_NS usage
show more ...
|
| 17d07a55 | 21-Feb-2023 |
Govindraj Raja <govindraj.raja@arm.com> |
refactor(bl31): use elx_panic for sysreg_handler64
When we reach sysreg_handler64 from any trap handling we are entering this path from lower EL and thus we should be calling lower_el_panic reportin
refactor(bl31): use elx_panic for sysreg_handler64
When we reach sysreg_handler64 from any trap handling we are entering this path from lower EL and thus we should be calling lower_el_panic reporting mechanism to print panic report.
Make report_elx_panic available through assembly func elx_panic which could be used for reporting any lower_el_panic.
Change-Id: Ieb260cf20ea327a59db84198b2c6a6bfc9ca9537 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 338dbe2f | 22-Feb-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes I51c13c52,I3358c51e into integration
* changes: build: always prefix section names with `.` build: communicate correct page size to linker |
| bd62ce98 | 16-Jan-2023 |
Govindraj Raja <govindraj.raja@arm.com> |
refactor(aarch64): rename do_panic and el3_panic
Current panic call invokes do_panic which calls el3_panic, but now panic handles only panic from EL3 anid clear separation to use lower_el_panic() wh
refactor(aarch64): rename do_panic and el3_panic
Current panic call invokes do_panic which calls el3_panic, but now panic handles only panic from EL3 anid clear separation to use lower_el_panic() which handles panic from lower ELs.
So now we can remove do_panic and just call el3_panic for all panics.
Change-Id: I739c69271b9fb15c1176050877a9b0c0394dc739 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| f300ef66 | 16-Jan-2023 |
Govindraj Raja <govindraj.raja@arm.com> |
refactor(aarch64): remove weak links to el3_panic
Cleanup weak links to el3_panic and restrict crash_reporting usage to bl31.
Crash reporting is not used with bl1, bl2 and weak linkage to el3_panic
refactor(aarch64): remove weak links to el3_panic
Cleanup weak links to el3_panic and restrict crash_reporting usage to bl31.
Crash reporting is not used with bl1, bl2 and weak linkage to el3_panic is used, this can cause ambiguity in understanding the code so remove this weak linkage and introduce funcs that should be used when we have crash reporting for el3 panics.
Change-Id: Ic5c711143ba36898ef9574a078b8fa02effceb12 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 7e619ecc | 16-Jan-2023 |
Govindraj Raja <govindraj.raja@arm.com> |
refactor(aarch64): refactor usage of elx_panic
Currently we call el3_panic for panics from EL3 and elx_panic for panics from lower ELs.
When we boot into a rich OS environment and interact with BL3
refactor(aarch64): refactor usage of elx_panic
Currently we call el3_panic for panics from EL3 and elx_panic for panics from lower ELs.
When we boot into a rich OS environment and interact with BL31 using SMC/ABI calls and we can also decide to handle any lower EL panics in EL3. Panic can occur in lower EL from rich OS or during SMC/ABI calls after context switch to EL3.
But after booting into any rich OS we may land in panic either from rich OS or while servicing any SMC call, here the logic to use el3_panic or elx_panic is flawed as spsr_el3[3:0] is always EL3h and end up in elx_panic even if panic occurred from EL3 during SMC handling.
We try to decouple the elx_panic usage for its intended purpose, introduce lower_el_panic which would call elx_panic, currently lower_el_panic is called from default platform_ea_handle which would be called due to panic from any of the lower ELs.
Also remove the weak linkage for elx_panic and rename it to report_elx_panic which could be used with lower_el_panic.
Change-Id: I268bca89c01c60520d127ef6c7ba851460edc747 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| cd8f6af3 | 21-Feb-2023 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes I63b584cf,I617f3d41 into integration
* changes: refactor(el3_runtime): unify handle/enter_lower_el_async_ea refactor(el3_runtime): introduce save_x30 macro |
| da04341e | 14-Feb-2023 |
Chris Kay <chris.kay@arm.com> |
build: always prefix section names with `.`
Some of our specialized sections are not prefixed with the conventional period. The compiler uses input section names to derive certain other section name
build: always prefix section names with `.`
Some of our specialized sections are not prefixed with the conventional period. The compiler uses input section names to derive certain other section names (e.g. `.rela.text`, `.relacpu_ops`), and these can be difficult to select in linker scripts when there is a lack of a delimiter.
This change introduces the period prefix to all specialized section names.
BREAKING-CHANGE: All input and output linker section names have been prefixed with the period character, e.g. `cpu_ops` -> `.cpu_ops`.
Change-Id: I51c13c5266d5975fbd944ef4961328e72f82fc1c Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| 6f7de9a8 | 11-Jan-2023 |
Manish Pandey <manish.pandey2@arm.com> |
refactor(el3_runtime): unify handle/enter_lower_el_async_ea
handle_lower_el_async_ea and enter_lower_el_async_ea are same except for saving x30 register, with previous patch x30 is now freed before
refactor(el3_runtime): unify handle/enter_lower_el_async_ea
handle_lower_el_async_ea and enter_lower_el_async_ea are same except for saving x30 register, with previous patch x30 is now freed before calling these function we don't need both of them.
This patch also unifies the naming convention, now we have 3 handlers - handle_lower_el_ea_esb - handle_lower_el_sync_ea - handle_lower_el_async_ea
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I63b584cf059bac80195aa334981d50fa6272cf49
show more ...
|
| d87c0e27 | 11-Jan-2023 |
Manish Pandey <manish.pandey2@arm.com> |
refactor(el3_runtime): introduce save_x30 macro
Most of the macros/routine in vector entry need a free scratch register. Introduce a macro "save_x30" and call it right at the begining of vector entr
refactor(el3_runtime): introduce save_x30 macro
Most of the macros/routine in vector entry need a free scratch register. Introduce a macro "save_x30" and call it right at the begining of vector entries where x30 is used. It is more exlicit and less error prone
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I617f3d41a120739e5e3fe1c421c79ceb70c1188e
show more ...
|
| 82274936 | 16-Jan-2023 |
Chris Kay <chris.kay@arm.com> |
build: clarify linker script generation
The following build system variables have been renamed:
- `LINKERFILE` -> `DEFAULT_LINKER_SCRIPT` - `BL_LINKERFILE` -> `DEFAULT_LINKER_SCRIPT_SOURCE` - `<IMA
build: clarify linker script generation
The following build system variables have been renamed:
- `LINKERFILE` -> `DEFAULT_LINKER_SCRIPT` - `BL_LINKERFILE` -> `DEFAULT_LINKER_SCRIPT_SOURCE` - `<IMAGE>_LINKERFILE` -> `<IMAGE>_DEFAULT_LINKER_SCRIPT_SOURCE`
These new names better reflect how each variable is used:
1. the default linker script is passed via `-dT` instead of `-T` 2. linker script source files are first preprocessed
Additionally, linker scripts are now placed in the build directory relative to where they exist in the source directory. For example, the `bl32/sp_min/sp_min.ld.S` would now preprocess to `sp_min/sp_min.ld` instead of just `bl32.ld`
BREAKING-CHANGE: The `LINKERFILE`, `BL_LINKERFILE` and `<IMAGE_LINKERFILE>` build system variables have been renamed. See the commit message for more information.
Change-Id: If8cef65dcb8820e8993736702c8741e97a66e6cc Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| f90fe02f | 29-Sep-2022 |
Chris Kay <chris.kay@arm.com> |
style: normalize linker script code style
There are a variety of code styles used by the various linker scripts around the code-base. This change brings them in line with one another and attempts to
style: normalize linker script code style
There are a variety of code styles used by the various linker scripts around the code-base. This change brings them in line with one another and attempts to make the scripts more friendly for skim-readers.
Change-Id: Ibee2afad0d543129c9ba5a8a22e3ec17d77e36ea Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| 344e5e81 | 19-Jan-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "feat_state_rework" into integration
* changes: feat(fvp): enable FEAT_HCX by default refactor(context-mgmt): move FEAT_HCX save/restore into C refactor(cpufeat): conv
Merge changes from topic "feat_state_rework" into integration
* changes: feat(fvp): enable FEAT_HCX by default refactor(context-mgmt): move FEAT_HCX save/restore into C refactor(cpufeat): convert FEAT_HCX to new scheme feat(fvp): enable FEAT_FGT by default refactor(context-mgmt): move FEAT_FGT save/restore code into C refactor(amu): convert FEAT_AMUv1 to new scheme refactor(cpufeat): decouple FGT feature detection and build flags refactor(cpufeat): check FEAT_FGT in a new way refactor(cpufeat): move helpers into .c file, rename FEAT_STATE_ feat(aarch64): make ID system register reads non-volatile
show more ...
|
| c5a3ebbd | 15-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(context-mgmt): move FEAT_HCX save/restore into C
At the moment we save and restore the HCRX_EL2 register in assembly, and just depend on the build time flags. To allow runtime checking, and
refactor(context-mgmt): move FEAT_HCX save/restore into C
At the moment we save and restore the HCRX_EL2 register in assembly, and just depend on the build time flags. To allow runtime checking, and to avoid too much code in assembly, move that over to C, and use the new combined build/runtime feature check.
This also allows to drop the assert, since this should now be covered by the different FEAT_STATE_x options.
Change-Id: I3e20b9ba17121d423cd08edc20bbf4e7ae7c0178 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| d242128c | 15-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(cpufeat): convert FEAT_HCX to new scheme
Use the generic check function in feat_detect.c, and split the feature check into two functions, as done for FEAT_FGT before.
Signed-off-by: Andre
refactor(cpufeat): convert FEAT_HCX to new scheme
Use the generic check function in feat_detect.c, and split the feature check into two functions, as done for FEAT_FGT before.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Change-Id: I0a4f973427c10d5d15c414ff5e12b18b7e645fae
show more ...
|
| 76a91d87 | 06-Jan-2023 |
Manish Pandey <manish.pandey2@arm.com> |
refactor(el3_runtime): remove unnecessary assembly macros
Following macros removed - handle_async_ea : It duplicates "check_and_unmask_ea" functionality - check_if_serror_from_EL3: This macro is
refactor(el3_runtime): remove unnecessary assembly macros
Following macros removed - handle_async_ea : It duplicates "check_and_unmask_ea" functionality - check_if_serror_from_EL3: This macro is small and called only once, replace this macro with instructions at the caller.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Id7eec6263ec23cc8792139f491c563f616fd3618
show more ...
|
| 1ae75529 | 21-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
feat(fvp): emulate trapped RNDR
When a platform decides to use FEAT_RNG_TRAP, every RNDR or RNDRSS read will trap into EL3. The platform can then emulate those instructions, by either executing the
feat(fvp): emulate trapped RNDR
When a platform decides to use FEAT_RNG_TRAP, every RNDR or RNDRSS read will trap into EL3. The platform can then emulate those instructions, by either executing the real CPU instructions, potentially conditioning the results, or use rate-limiting or filtering to protect the hardware entropy pool. Another possiblitiy would be to use some platform specific TRNG device to get entropy and returning this.
To demonstrate platform specific usage, add a demo implementation for the FVP: It will execute the actual CPU instruction and just return the result. This should serve as reference code to implement platform specific policies.
We change the definition of read_rndr() and read_rndrrs() to use the alternative sysreg encoding, so that all assemblers can handle that.
Add documentation about the new platform specific RNG handler function.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Change-Id: Ibce817b3b06ad20129d15531b81402e3cc3e9a9e
show more ...
|
| ccd81f1e | 21-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
feat(el3-runtime): introduce system register trap handler
At the moment we only handle SMC traps from lower ELs, but ignore any other synchronous traps and just panic. To cope with system register t
feat(el3-runtime): introduce system register trap handler
At the moment we only handle SMC traps from lower ELs, but ignore any other synchronous traps and just panic. To cope with system register traps, which we might need to emulate, introduce a C function to handle those traps, and wire that up in the exception handler to be called.
We provide a dispatcher function (in C), that will call platform specific implementation for certain (classes of) system registers. For now this is empty.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Change-Id: If147bcb49472eb02791498700300926afbcf75ff
show more ...
|
| e61713b0 | 07-Dec-2022 |
Manish Pandey <manish.pandey2@arm.com> |
fix(el3_runtime): do not save scr_el3 during EL3 entry
scr_el3 registers cannot be modified in lower ELs which means it retains the same value which is stored in the EL3 cpu context structure for th
fix(el3_runtime): do not save scr_el3 during EL3 entry
scr_el3 registers cannot be modified in lower ELs which means it retains the same value which is stored in the EL3 cpu context structure for the given world. So, we should not save the register when entering to EL3 from lower EL as we have the copy of it present in cpu context.
During EL3 execution SCR_EL3 value can be modifed for following cases 1. Changes which is required for EL3 execution, this change is temp and do not need to be saved. 2. Changes which affects lower EL execution, these changes need to be written to cpu context as well and will be retrieved when scr_el3 is restored as part of exiting EL3
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I9cc984ddf50e27d09e361bd83b1b3c9f068cf2fd
show more ...
|
| 680b7aa9 | 10-Nov-2022 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "mp/ras_refactoring" into integration
* changes: fix(debug): decouple "get_el_str()" from backtrace fix(bl31): harden check in delegate_async_ea |
| 0fe7b9f2 | 11-Oct-2022 |
Olivier Deprez <olivier.deprez@arm.com> |
feat: pass SMCCCv1.3 SVE hint bit to dispatchers
SMCCCv1.3 introduces the SVE hint bit added to the SMC FID (bit 16) denoting that the world issuing an SMC doesn't expect the callee to preserve the
feat: pass SMCCCv1.3 SVE hint bit to dispatchers
SMCCCv1.3 introduces the SVE hint bit added to the SMC FID (bit 16) denoting that the world issuing an SMC doesn't expect the callee to preserve the SVE state (FFR, predicates, Zn vector bits greater than 127). Update the generic SMC handler to copy the SVE hint bit state to SMC flags and mask out the bit by default for the services called by the standard dispatcher. It is permitted by the SMCCC standard to ignore the bit as long as the SVE state is preserved. In any case a callee must preserve the NEON state (FPCR/FPSR, Vn 128b vectors) whichever the SVE hint bit state.
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> Change-Id: I2b163ed83dc311b8f81f96b23c942829ae9fa1b5
show more ...
|
| d435238d | 11-Oct-2022 |
Manish Pandey <manish.pandey2@arm.com> |
fix(bl31): harden check in delegate_async_ea
Following hardening done around ESR_EL3 register usage - Panic if exception is anyting other than SError - AET bit is only valid if DFSC is 0x11, move
fix(bl31): harden check in delegate_async_ea
Following hardening done around ESR_EL3 register usage - Panic if exception is anyting other than SError - AET bit is only valid if DFSC is 0x11, move DFSC check before AET.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ib15159920f6cad964332fd40f88943aee2bc73b4
show more ...
|
| 1436e37d | 21-Jun-2022 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
feat(drtm): add remediation driver support in DRTM
Added remediation driver for DRTM to set/get the error from non-volatile memory
Change-Id: I8f0873dcef4936693e0f39a3c95096cb689c04b7 Signed-off-by
feat(drtm): add remediation driver support in DRTM
Added remediation driver for DRTM to set/get the error from non-volatile memory
Change-Id: I8f0873dcef4936693e0f39a3c95096cb689c04b7 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Signed-off-by: Lucian Paul-Trifu <lucian.paultrifu@gmail.com>
show more ...
|
| 40814266 | 17-Jun-2022 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
feat(drtm): add Event Log driver support for DRTM
Added Event Log driver support for DRTM. This driver is responsible for the doing the hash measurement of various DRTM components as per [1], and pu
feat(drtm): add Event Log driver support for DRTM
Added Event Log driver support for DRTM. This driver is responsible for the doing the hash measurement of various DRTM components as per [1], and putting these measurements in the Event Log buffer.
[1]: https://developer.arm.com/documentation/den0113/a, section 3.16
Change-Id: I9892c313cf6640b82e261738116fe00f7975ee12 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
show more ...
|