| f6ace15f | 31-Aug-2016 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #689 from yatharth-arm/yk/plat_report_expn
Remove looping around `plat_report_exception` |
| 5bbc451e | 17-Aug-2016 |
Yatharth Kochar <yatharth.kochar@arm.com> |
Remove looping around `plat_report_exception`
This patch removes the tight loop that calls `plat_report_exception` in unhandled exceptions in AArch64 state. The new behaviour is to call the `plat_re
Remove looping around `plat_report_exception`
This patch removes the tight loop that calls `plat_report_exception` in unhandled exceptions in AArch64 state. The new behaviour is to call the `plat_report_exception` only once followed by call to `plat_panic_handler`. This allows platforms to take platform-specific action when there is an unhandled exception, instead of always spinning in a tight loop.
Note: This is a subtle break in behaviour for platforms that expect `plat_report_exception` to be continuously executed when there is an unhandled exception.
Change-Id: Ie2453804b9b7caf9b010ee73e1a90eeb8384e4e8
show more ...
|
| efc759ad | 18-Aug-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #686 from danh-arm/dh/remove-inv-dcache-after-auth
Remove dcache invalidation after image authentication |
| ad4494dc | 28-Jul-2016 |
Dan Handley <dan.handley@arm.com> |
Remove dcache invalidation after image authentication
At the end of successful image authentication in load_auth_image(), the data cache for the virtual address range corresponding to the image is i
Remove dcache invalidation after image authentication
At the end of successful image authentication in load_auth_image(), the data cache for the virtual address range corresponding to the image is invalidated (by a call to inv_dcache_range()). The intent seems to be to ensure the data caches do not contain any sensitive data used during authentication, which subsequent code can read. However, this same address range is already flushed (cleaned and invalidated by a call to flush_dcache_range()) at the end of load_image(), and the subsequent invalidate has no functional effect.
This patch removes the redundant call to inv_dcache_range(). It also moves the flush_dcache_range() call from the end of load_image() to the end of load_auth_image(), so the image data will remain in the caches during authentication, improving performance.
This also improves the comments that explain the rationale for calling flush_dcache_range() after image loading/authentication.
Change-Id: I14f17ad2935075ef6f3d1327361c5088bfb2d284
show more ...
|
| 1ae0a49a | 05-May-2016 |
Soby Mathew <soby.mathew@arm.com> |
AArch32: Add API to invoke runtime service handler
This patch adds an API in runtime service framework to invoke the registered handler corresponding to the SMC function identifier. This is helpful
AArch32: Add API to invoke runtime service handler
This patch adds an API in runtime service framework to invoke the registered handler corresponding to the SMC function identifier. This is helpful for AArch32 because the number of arguments required by the handler is more than registers available as per AArch32 program calling conventions and requires the use of stack. Hence this new API will do the necessary argument setup and invoke the appropriate handler. Although this API is primarily intended for AArch32, it can be used for AArch64 as well.
Change-Id: Iefa15947fe5a1df55b0859886e677446a0fd7241
show more ...
|
| bc202b44 | 05-May-2016 |
Soby Mathew <soby.mathew@arm.com> |
AArch32: Add tf_printf support
The tf_printf library uses 64 bit division to print numbers in appropriate formats but AArch32 mode cannot do 64 bit division natively. Hence this patch adds additiona
AArch32: Add tf_printf support
The tf_printf library uses 64 bit division to print numbers in appropriate formats but AArch32 mode cannot do 64 bit division natively. Hence this patch adds additional number printing routines to handle AArch32 mode in tf_printf library. The decimal format printing capability is limited to 32 bit integers whereas 64 bits are supported in hexadecimal format. The library assumes that secure world is running in Little-Endian mode to do bit manipulations on 64 bit. Suitable assertions are present to enforce this assumption.
Change-Id: I55a21e448cef4915d1834d76e48a84ccf0bec36d
show more ...
|
| f24307de | 05-May-2016 |
Soby Mathew <soby.mathew@arm.com> |
AArch32: Add assembly helpers
This patch adds various assembly helpers for AArch32 like :
* cache management : Functions to flush, invalidate and clean cache by MVA. Also helpers to do cache operat
AArch32: Add assembly helpers
This patch adds various assembly helpers for AArch32 like :
* cache management : Functions to flush, invalidate and clean cache by MVA. Also helpers to do cache operations by set-way are also added.
* stack management: Macros to declare stack and get the current stack corresponding to current CPU.
* Misc: Macros to access co processor registers in AArch32, macros to define functions in assembly, assert macros, generic `do_panic()` implementation and function to zero block of memory.
Change-Id: I7b78ca3f922c0eda39beb9786b7150e9193425be
show more ...
|
| 578b3ad7 | 28-Jul-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #673 from soby-mathew/sm/coverity_issue
Improve debug assertion for runtime svc number |
| 5e5e4162 | 26-Jul-2016 |
Soby Mathew <soby.mathew@arm.com> |
Improve debug assertion for runtime svc number
This patch improves the debug assertion for runtime svc number - Remove useless comparison ensuring that the number of descriptors is a positive nu
Improve debug assertion for runtime svc number
This patch improves the debug assertion for runtime svc number - Remove useless comparison ensuring that the number of descriptors is a positive number. The variable is an unsigned integer so can't be negative. - Check that the end address of the descriptors is sane relative to the start address.
Change-Id: Iea7be6b34e33b8b1cbd394eb923cc834ea964831
show more ...
|
| 7b6d330c | 12-Jul-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Ensure addresses in is_mem_free() don't overflow
This patch adds some runtime checks to prevent some potential pointer overflow issues in the is_mem_free() function. The overflow could happen in the
Ensure addresses in is_mem_free() don't overflow
This patch adds some runtime checks to prevent some potential pointer overflow issues in the is_mem_free() function. The overflow could happen in the case where the end addresses, computed as the sum of a base address and a size, results in a value large enough to wrap around. This, in turn, could lead to unpredictable behaviour.
If such an overflow is detected, the is_mem_free() function will now declare the memory region as not free. The overflow is detected using a new macro, called check_uptr_overflow().
This patch also modifies all other places in the 'bl_common.c' file where an end address was computed as the sum of a base address and a size and instead keeps the two values separate. This avoids the need to handle pointer overflows everywhere. The code doesn't actually need to compute any end address before the is_mem_free() function is called other than to print information message to the serial output.
This patch also introduces 2 slight changes to the reserve_mem() function:
- It fixes the end addresses passed to choose_mem_pos(). It was incorrectly passing (base + size) instead of (base + size - 1).
- When the requested allocation size is 0, the function now exits straight away and says so using a warning message. Previously, it used to actually reserve some memory. A zero-byte allocation was not considered as a special case so the function was using the same top/bottom allocation mechanism as for any other allocation. As a result, the smallest area of memory starting from the requested base address within the free region was reserved.
Change-Id: I0e695f961e24e56ffe000718014e0496dc6e1ec6
show more ...
|
| 3a26a28c | 28-Jun-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Make runtime_svc_init() function more robust
- Added some debug assertions checking that the runtime services indexes computed by get_unique_oen() are sane.
- Do not print the name of the serv
Make runtime_svc_init() function more robust
- Added some debug assertions checking that the runtime services indexes computed by get_unique_oen() are sane.
- Do not print the name of the service when its descriptor is invalid. If the descriptor is corrupted then its name field could be corrupted as well and we would end up reading an arbitrary amount of invalid memory.
Change-Id: I16f61065277d01fe1555d5a9cf743f7b52ccaa60
show more ...
|
| 9d24d353 | 28-Jun-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Improvements to runtime service init code
Light refactoring of the code in runtime_svc.c file.
- Declare validate_rt_svc_desc()'s argument as const.
- Remove 'goto' path in runtime_svc_init(). I
Improvements to runtime service init code
Light refactoring of the code in runtime_svc.c file.
- Declare validate_rt_svc_desc()'s argument as const.
- Remove 'goto' path in runtime_svc_init(). It was used in one place only.
- Improve code readability by declaring a local variable holding the service pointer.
Change-Id: I3b15c5adb9f37b786b5b993a9be70ea9dd017a83
show more ...
|
| 532ed618 | 24-Mar-2016 |
Soby Mathew <soby.mathew@arm.com> |
Introduce `el3_runtime` and `PSCI` libraries
This patch moves the PSCI services and BL31 frameworks like context management and per-cpu data into new library components `PSCI` and `el3_runtime` resp
Introduce `el3_runtime` and `PSCI` libraries
This patch moves the PSCI services and BL31 frameworks like context management and per-cpu data into new library components `PSCI` and `el3_runtime` respectively. This enables PSCI to be built independently from BL31. A new `psci_lib.mk` makefile is introduced which adds the relevant PSCI library sources and gets included by `bl31.mk`. Other changes which are done as part of this patch are:
* The runtime services framework is now moved to the `common/` folder to enable reuse. * The `asm_macros.S` and `assert_macros.S` helpers are moved to architecture specific folder. * The `plat_psci_common.c` is moved from the `plat/common/aarch64/` folder to `plat/common` folder. The original file location now has a stub which just includes the file from new location to maintain platform compatibility.
Most of the changes wouldn't affect platform builds as they just involve changes to the generic bl1.mk and bl31.mk makefiles.
NOTE: THE `plat_psci_common.c` FILE HAS MOVED LOCATION AND THE STUB FILE AT THE ORIGINAL LOCATION IS NOW DEPRECATED. PLATFORMS SHOULD MODIFY THEIR MAKEFILES TO INCLUDE THE FILE FROM THE NEW LOCATION.
Change-Id: I6bd87d5b59424995c6a65ef8076d4fda91ad5e86
show more ...
|
| 4c0d0390 | 16-Jun-2016 |
Soby Mathew <soby.mathew@arm.com> |
Rework type usage in Trusted Firmware
This patch reworks type usage in generic code, drivers and ARM platform files to make it more portable. The major changes done with respect to type usage are as
Rework type usage in Trusted Firmware
This patch reworks type usage in generic code, drivers and ARM platform files to make it more portable. The major changes done with respect to type usage are as listed below:
* Use uintptr_t for storing address instead of uint64_t or unsigned long. * Review usage of unsigned long as it can no longer be assumed to be 64 bit. * Use u_register_t for register values whose width varies depending on whether AArch64 or AArch32. * Use generic C types where-ever possible.
In addition to the above changes, this patch also modifies format specifiers in print invocations so that they are AArch64/AArch32 agnostic. Only files related to upcoming feature development have been reworked.
Change-Id: I9f8c78347c5a52ba7027ff389791f1dad63ee5f8
show more ...
|
| 50f7101a | 15-Jun-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #650 from Xilinx/zynqmp-updates
Zynqmp updates |
| a6b995fb | 27-May-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Update comments in load_image()
- Fix the function documentation. Since commit 16948ae1, load_image() uses image IDs rather than image names.
- Clarify the consequences of a null entry point ar
Update comments in load_image()
- Fix the function documentation. Since commit 16948ae1, load_image() uses image IDs rather than image names.
- Clarify the consequences of a null entry point argument.
- Slightly reorganize the code to remove an unnecessary 'if' statement.
Change-Id: Iebea3149a37f23d3b847a37a206ed23f7e8ec717
show more ...
|
| 8d8c61ea | 03-Jun-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #636 from soby-mathew/sm/cpu_ctx_rem_aarch32_regs
Build option to include AArch32 registers in cpu context |
| 8cd16e6b | 17-May-2016 |
Soby Mathew <soby.mathew@arm.com> |
Build option to include AArch32 registers in cpu context
The system registers that are saved and restored in CPU context include AArch32 systems registers like SPSR_ABT, SPSR_UND, SPSR_IRQ, SPSR_FIQ
Build option to include AArch32 registers in cpu context
The system registers that are saved and restored in CPU context include AArch32 systems registers like SPSR_ABT, SPSR_UND, SPSR_IRQ, SPSR_FIQ, DACR32_EL2, IFSR32_EL2 and FPEXC32_EL2. Accessing these registers on an AArch64-only (i.e. on hardware that does not implement AArch32, or at least not at EL1 and higher ELs) platform leads to an exception. This patch introduces the build option `CTX_INCLUDE_AARCH32_REGS` to specify whether to include these AArch32 systems registers in the cpu context or not. By default this build option is set to 1 to ensure compatibility. AArch64-only platforms must set it to 0. A runtime check is added in BL1 and BL31 cold boot path to verify this.
Fixes ARM-software/tf-issues#386
Change-Id: I720cdbd7ed7f7d8516635a2ec80d025f478b95ee
show more ...
|
| e0ae9fab | 24-May-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Introduce some helper macros for exception vectors
This patch introduces some assembler macros to simplify the declaration of the exception vectors. It abstracts the section the exception code is pu
Introduce some helper macros for exception vectors
This patch introduces some assembler macros to simplify the declaration of the exception vectors. It abstracts the section the exception code is put into as well as the alignments constraints mandated by the ARMv8 architecture. For all TF images, the exception code has been updated to make use of these macros.
This patch also updates some invalid comments in the exception vector code.
Change-Id: I35737b8f1c8c24b6da89b0a954c8152a4096fa95
show more ...
|
| 1c87351b | 18-Apr-2016 |
Soren Brinkmann <soren.brinkmann@xilinx.com> |
context: Fix typo in comment
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> |
| 3ca9928d | 22-Mar-2016 |
Soby Mathew <soby.mathew@arm.com> |
Refactor the xlat_tables library code
The AArch32 long descriptor format and the AArch64 descriptor format correspond to each other which allows possible sharing of xlat_tables library code between
Refactor the xlat_tables library code
The AArch32 long descriptor format and the AArch64 descriptor format correspond to each other which allows possible sharing of xlat_tables library code between AArch64 and AArch32. This patch refactors the xlat_tables library code to seperate the common functionality from architecture specific code. Prior to this patch, all of the xlat_tables library code were in `lib/aarch64/xlat_tables.c` file. The refactored code is now in `lib/xlat_tables/` directory. The AArch64 specific programming for xlat_tables is in `lib/xlat_tables/aarch64/xlat_tables.c` and the rest of the code common to AArch64 and AArch32 is in `lib/xlat_tables/xlat_tables_common.c`. Also the data types used in xlat_tables library APIs are reworked to make it compatible between AArch64 and AArch32.
The `lib/aarch64/xlat_tables.c` file now includes the new xlat_tables library files to retain compatibility for existing platform ports. The macros related to xlat_tables library are also moved from `include/lib/aarch64/arch.h` to the header `include/lib/xlat_tables.h`.
NOTE: THE `lib/aarch64/xlat_tables.c` FILE IS DEPRECATED AND PLATFORM PORTS ARE EXPECTED TO INCLUDE THE NEW XLAT_TABLES LIBRARY FILES IN THEIR MAKEFILES.
Change-Id: I3d17217d24aaf3a05a4685d642a31d4d56255a0f
show more ...
|
| f2f5a7bd | 22-Mar-2016 |
Soby Mathew <soby.mathew@arm.com> |
Differentiate `long` and `long long` formats in tf_printf
This patch adds support to differentiate between `long` and `long long` format specifiers in tf_printf(). In AArch64, they are the same whic
Differentiate `long` and `long long` formats in tf_printf
This patch adds support to differentiate between `long` and `long long` format specifiers in tf_printf(). In AArch64, they are the same which is a 64-bit word. But, in AArch32 they are different and tf_printf() needs to handle these format specifiers separately. This patch also fixes the type of variables used to generic C types.
Change-Id: If3bbb0245cd0183acbe13bc1fe0d9743f417578f
show more ...
|
| a8f6e21e | 07-Apr-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #563 from sbranden/tf_issue_380
Add support for %z in tf_print() |
| adb4fcfb | 22-Mar-2016 |
Gerald Lejeune <gerald.lejeune@st.com> |
Enable asynchronous abort exceptions during boot
Asynchronous abort exceptions generated by the platform during cold boot are not taken in EL3 unless SCR_EL3.EA is set.
Therefore EA bit is set alon
Enable asynchronous abort exceptions during boot
Asynchronous abort exceptions generated by the platform during cold boot are not taken in EL3 unless SCR_EL3.EA is set.
Therefore EA bit is set along with RES1 bits in early BL1 and BL31 architecture initialisation. Further write accesses to SCR_EL3 preserve these bits during cold boot.
A build flag controls SCR_EL3.EA value to keep asynchronous abort exceptions being trapped by EL3 after cold boot or not.
For further reference SError Interrupts are also known as asynchronous external aborts.
On Cortex-A53 revisions below r0p2, asynchronous abort exceptions are taken in EL3 whatever the SCR_EL3.EA value is.
Fixes arm-software/tf-issues#368
Signed-off-by: Gerald Lejeune <gerald.lejeune@st.com>
show more ...
|
| bda77010 | 23-Mar-2016 |
Scott Branden <sbranden@broadcom.com> |
Add support for %z in tf_print()
Add support for %z format specific in tf_printf() to support printing data of type size_t
Fixes ARM-software/tf-issues#380
Signed-off-by Scott Branden <scott.brand
Add support for %z in tf_print()
Add support for %z format specific in tf_printf() to support printing data of type size_t
Fixes ARM-software/tf-issues#380
Signed-off-by Scott Branden <scott.branden@broadcom.com>
show more ...
|