| 2d7e8282 | 04-Sep-2017 |
Soby Mathew <soby.mathew@arm.com> |
Introduce tf_vprintf() and tf_string_print()
This patch introduces tf_vprintf() and tf_string_print() APIs which is needed by the logging framework introduced in a later patch.
Change-Id: Ie4240443
Introduce tf_vprintf() and tf_string_print()
This patch introduces tf_vprintf() and tf_string_print() APIs which is needed by the logging framework introduced in a later patch.
Change-Id: Ie4240443d0e04e070502b51e371e546dd469fd33 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
show more ...
|
| 4d91838b | 27-Jul-2017 |
Julius Werner <jwerner@chromium.org> |
Fix x30 reporting for unhandled exceptions
Some error paths that lead to a crash dump will overwrite the value in the x30 register by calling functions with the no_ret macro, which resolves to a BL
Fix x30 reporting for unhandled exceptions
Some error paths that lead to a crash dump will overwrite the value in the x30 register by calling functions with the no_ret macro, which resolves to a BL instruction. This is not very useful and not what the reader would expect, since a crash dump should usually show all registers in the state they were in when the exception happened. This patch replaces the offending function calls with a B instruction to preserve the value in x30.
Change-Id: I2a3636f2943f79bab0cd911f89d070012e697c2a Signed-off-by: Julius Werner <jwerner@chromium.org>
show more ...
|
| 6311f63d | 07-Jun-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
Tegra: enable 'signed-comparison' compilation warning/errors
This patch enables the 'sign-compare' flag, to enable warning/errors for comparisons between signed/unsigned variables. The warning has b
Tegra: enable 'signed-comparison' compilation warning/errors
This patch enables the 'sign-compare' flag, to enable warning/errors for comparisons between signed/unsigned variables. The warning has been enabled for all the Tegra platforms, to start with.
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| da5241cb | 17-May-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Introduce `tf_snprintf`
This is a reduced version of `snprintf` that only supports formats '%d', '%i' and '%u'. It can be used when the full `snprintf` is not needed in order to save memory. If it f
Introduce `tf_snprintf`
This is a reduced version of `snprintf` that only supports formats '%d', '%i' and '%u'. It can be used when the full `snprintf` is not needed in order to save memory. If it finds an unknown format specifier, it prints an error message and panics.
Change-Id: I2cb06fcdf74cda2c43caf73ae0762a91499fc04e Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 6ba71d65 | 10-May-2017 |
dp-arm <dimitris.papastamos@arm.com> |
Align tf_printf implementation between AArch32 and AArch64
No need for these wrapper functions anymore. The compiler-rt builtins provide runtime support for 64-bit division and modulo operations.
Align tf_printf implementation between AArch32 and AArch64
No need for these wrapper functions anymore. The compiler-rt builtins provide runtime support for 64-bit division and modulo operations.
Change-Id: Ib785d37c86f0c82ebd34c35023a4c1822c03e7df Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
show more ...
|
| f132b4a0 | 04-May-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #925 from dp-arm/dp/spdx
Use SPDX license identifiers |
| 82cb2c1a | 03-May-2017 |
dp-arm <dimitris.papastamos@arm.com> |
Use SPDX license identifiers
To make software license auditing simpler, use SPDX[0] license identifiers instead of duplicating the license text in every file.
NOTE: Files that have been imported by
Use SPDX license identifiers
To make software license auditing simpler, use SPDX[0] license identifiers instead of duplicating the license text in every file.
NOTE: Files that have been imported by FreeBSD have not been modified.
[0]: https://spdx.org/
Change-Id: I80a00e1f641b8cc075ca5a95b10607ed9ed8761a Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
show more ...
|
| 16292f54 | 05-Apr-2017 |
David Cunado <david.cunado@arm.com> |
Update terminology: standard SMC to yielding SMC
Since Issue B (November 2016) of the SMC Calling Convention document standard SMC calls are renamed to yielding SMC calls to help avoid confusion wit
Update terminology: standard SMC to yielding SMC
Since Issue B (November 2016) of the SMC Calling Convention document standard SMC calls are renamed to yielding SMC calls to help avoid confusion with the standard service SMC range, which remains unchanged.
http://infocenter.arm.com/help/topic/com.arm.doc.den0028b/ARM_DEN0028B_SMC_Calling_Convention.pdf
This patch adds a new define for yielding SMC call type and deprecates the current standard SMC call type. The tsp is migrated to use this new terminology and, additionally, the documentation and code comments are updated to use this new terminology.
Change-Id: I0d7cc0224667ee6c050af976745f18c55906a793 Signed-off-by: David Cunado <david.cunado@arm.com>
show more ...
|
| ffc299f6 | 24-Apr-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #911 from danh-arm/dh/refactor-bl2-image-load
Minor refactor of BL2 image load v2 |
| 044bb2fa | 20-Apr-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Remove build option `ASM_ASSERTION`
The build option `ENABLE_ASSERTIONS` should be used instead. That way both C and ASM assertions can be enabled or disabled together.
All occurrences of `ASM_ASSE
Remove build option `ASM_ASSERTION`
The build option `ENABLE_ASSERTIONS` should be used instead. That way both C and ASM assertions can be enabled or disabled together.
All occurrences of `ASM_ASSERTION` in common code and ARM platforms have been replaced by `ENABLE_ASSERTIONS`.
ASM_ASSERTION has been removed from the user guide.
Change-Id: I51f1991f11b9b7ff83e787c9a3270c274748ec6f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| c2a9ee63 | 18-Apr-2017 |
Dan Handley <dan.handley@arm.com> |
Minor refactor of BL2 image load v2
Previously, get_next_bl_params_from_mem_params_desc() populated arg0 in the EL3 runtime entrypoint with a bl_params_t pointer. This is the responsibility of the g
Minor refactor of BL2 image load v2
Previously, get_next_bl_params_from_mem_params_desc() populated arg0 in the EL3 runtime entrypoint with a bl_params_t pointer. This is the responsibility of the generic LOAD_IMAGE_V2 framework instead of the descriptor-based image loading utility functions. Therefore this patch moves that code to bl2_load_images().
Also, this patch moves the code that flushes the bl_params structure to flush_bl_params_desc(), together with the other descriptor-based image loading flushing code.
Change-Id: I4541e3f50e3878dde7cf89e9e8f31fe0b173fb9d Signed-off-by: Dan Handley <dan.handley@arm.com>
show more ...
|
| cc8b5632 | 18-Apr-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Add `ENABLE_ASSERTIONS` build option
Add the new build option `ENABLE_ASSERTIONS` that controls whether or not assert functions are compiled out. It defaults to 1 for debug builds and to 0 for relea
Add `ENABLE_ASSERTIONS` build option
Add the new build option `ENABLE_ASSERTIONS` that controls whether or not assert functions are compiled out. It defaults to 1 for debug builds and to 0 for release builds.
Additionally, a following patch will be done to allow this build option to hide auxiliary code used for the checks done in an `assert()`. This code is is currently under the DEBUG build flag.
Assert messages are now only printed if LOG_LEVEL >= LOG_LEVEL_INFO, which is the default for debug builds.
This patch also updates the User Guide.
Change-Id: I1401530b56bab25561bb0f274529f1d12c5263bc Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 1e09ff93 | 16-Feb-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Remove dead loops in assert() in C and ASM
The desired behaviour is to call `plat_panic_handler()`, and to use `no_ret` to do so from ASM.
Change-Id: I88b2feefa6e6c8f9bf057fd51ee0d2e9fb551e4f Signe
Remove dead loops in assert() in C and ASM
The desired behaviour is to call `plat_panic_handler()`, and to use `no_ret` to do so from ASM.
Change-Id: I88b2feefa6e6c8f9bf057fd51ee0d2e9fb551e4f Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 801cf93c | 17-Feb-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Add and use plat_crash_console_flush() API
This API makes sure that all the characters sent to the crash console are output before returning from it.
Porting guide updated.
Change-Id: I1785f970a40
Add and use plat_crash_console_flush() API
This API makes sure that all the characters sent to the crash console are output before returning from it.
Porting guide updated.
Change-Id: I1785f970a40f6aacfbe592b6a911b1f249bb2735 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| d50ece03 | 20-Feb-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Simplify translation tables headers dependencies
The files affected by this patch don't really depend on `xlat_tables.h`. By changing the included file it becomes easier to switch between the two ve
Simplify translation tables headers dependencies
The files affected by this patch don't really depend on `xlat_tables.h`. By changing the included file it becomes easier to switch between the two versions of the translation tables library.
Change-Id: Idae9171c490e0865cb55883b19eaf942457c4ccc Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 308d359b | 02-Dec-2016 |
Douglas Raillard <douglas.raillard@arm.com> |
Introduce unified API to zero memory
Introduce zeromem_dczva function on AArch64 that can handle unaligned addresses and make use of DC ZVA instruction to zero a whole block at a time. This zeroing
Introduce unified API to zero memory
Introduce zeromem_dczva function on AArch64 that can handle unaligned addresses and make use of DC ZVA instruction to zero a whole block at a time. This zeroing takes place directly in the cache to speed it up without doing external memory access.
Remove the zeromem16 function on AArch64 and replace it with an alias to zeromem. This zeromem16 function is now deprecated.
Remove the 16-bytes alignment constraint on __BSS_START__ in firmware-design.md as it is now not mandatory anymore (it used to comply with zeromem16 requirements).
Change the 16-bytes alignment constraints in SP min's linker script to a 8-bytes alignment constraint as the AArch32 zeromem implementation is now more efficient on 8-bytes aligned addresses.
Introduce zero_normalmem and zeromem helpers in platform agnostic header that are implemented this way: * AArch32: * zero_normalmem: zero using usual data access * zeromem: alias for zero_normalmem * AArch64: * zero_normalmem: zero normal memory using DC ZVA instruction (needs MMU enabled) * zeromem: zero using usual data access
Usage guidelines: in most cases, zero_normalmem should be preferred.
There are 2 scenarios where zeromem (or memset) must be used instead: * Code that must run with MMU disabled (which means all memory is considered device memory for data accesses). * Code that fills device memory with null bytes.
Optionally, the following rule can be applied if performance is important: * Code zeroing small areas (few bytes) that are not secrets should use memset to take advantage of compiler optimizations.
Note: Code zeroing security-related critical information should use zero_normalmem/zeromem instead of memset to avoid removal by compilers' optimizations in some cases or misbehaving versions of GCC.
Fixes ARM-software/tf-issues#408
Change-Id: Iafd9663fc1070413c3e1904e54091cf60effaa82 Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|
| bd83b41a | 20-Dec-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #791 from jeenu-arm/asm-assert-32
AArch32: Print ASM_ASSERT and panic messages |
| 99c5ebaf | 08-Nov-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Export is_mem_free() function
The is_mem_free() function used to be local to bl_common.c. This patch exports it so that it can be used outside of bl_common.c.
Change-Id: I01dcb4229f3a36f56a4724b567
Export is_mem_free() function
The is_mem_free() function used to be local to bl_common.c. This patch exports it so that it can be used outside of bl_common.c.
Change-Id: I01dcb4229f3a36f56a4724b567c5e6c416dc5e98 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| e12cb61f | 28-Nov-2016 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
AArch32: Print ASM_ASSERT and panic messages
ASM_ASSERT failure and panic messages are suppressed at present. This patch enables printing the PC location for panic messages, and file name and line n
AArch32: Print ASM_ASSERT and panic messages
ASM_ASSERT failure and panic messages are suppressed at present. This patch enables printing the PC location for panic messages, and file name and line number upon assembly assert failure.
Change-Id: I80cb715988e7ce766f64da1e1d7065a74a096a0c Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| 1b5fa6ef | 12-Dec-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #774 from jeenu-arm/no-return-macro
Define and use no_ret macro where no return is expected |
| a806dad5 | 30-Nov-2016 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
Define and use no_ret macro where no return is expected
There are many instances in ARM Trusted Firmware where control is transferred to functions from which return isn't expected. Such jumps are ma
Define and use no_ret macro where no return is expected
There are many instances in ARM Trusted Firmware where control is transferred to functions from which return isn't expected. Such jumps are made using 'bl' instruction to provide the callee with the location from which it was jumped to. Additionally, debuggers infer the caller by examining where 'lr' register points to. If a 'bl' of the nature described above falls at the end of an assembly function, 'lr' will be left pointing to a location outside of the function range. This misleads the debugger back trace.
This patch defines a 'no_ret' macro to be used when jumping to functions from which return isn't expected. The macro ensures to use 'bl' instruction for the jump, and also, for debug builds, places a 'nop' instruction immediately thereafter (unless instructed otherwise) so as to leave 'lr' pointing within the function range.
Change-Id: Ib34c69fc09197cfd57bc06e147cc8252910e01b0 Co-authored-by: Douglas Raillard <douglas.raillard@arm.com> Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| 0f325c67 | 22-Nov-2016 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Optimize cache flush when authenticating images
When loading and authenticating an image, all parent images must also be authenticated. The parent images are just certificates that don't need to be
Optimize cache flush when authenticating images
When loading and authenticating an image, all parent images must also be authenticated. The parent images are just certificates that don't need to be used by any other CPU except the one loading the image, and so there is no need to flush the cache of memory regions where they are loaded.
Change-Id: Ice8d6979d1c02eabf1a543281ae1a07d098e4a99 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 1a0a3f06 | 28-Jun-2016 |
Yatharth Kochar <yatharth.kochar@arm.com> |
AArch32: Common changes needed for BL1/BL2
This patch adds common changes to support AArch32 state in BL1 and BL2. Following are the changes:
* Added functions for disabling MMU from Secure state.
AArch32: Common changes needed for BL1/BL2
This patch adds common changes to support AArch32 state in BL1 and BL2. Following are the changes:
* Added functions for disabling MMU from Secure state. * Added AArch32 specific SMC function. * Added semihosting support. * Added reporting of unhandled exceptions. * Added uniprocessor stack support. * Added `el3_entrypoint_common` macro that can be shared by BL1 and BL32 (SP_MIN) BL stages. The `el3_entrypoint_common` is similar to the AArch64 counterpart with the main difference in the assembly instructions and the registers that are relevant to AArch32 execution state. * Enabled `LOAD_IMAGE_V2` flag in Makefile for `ARCH=aarch32` and added check to make sure that platform has not overridden to disable it.
Change-Id: I33c6d8dfefb2e5d142fdfd06a0f4a7332962e1a3
show more ...
|
| 72600226 | 12-Sep-2016 |
Yatharth Kochar <yatharth.kochar@arm.com> |
Add new version of image loading.
This patch adds capability to load BL images based on image descriptors instead of hard coded way of loading BL images. This framework is designed such that it can
Add new version of image loading.
This patch adds capability to load BL images based on image descriptors instead of hard coded way of loading BL images. This framework is designed such that it can be readily adapted by any BL stage that needs to load images.
In order to provide the above capability the following new platform functions are introduced:
bl_load_info_t *plat_get_bl_image_load_info(void); This function returns pointer to the list of images that the platform has populated to load.
bl_params_t *plat_get_next_bl_params(void); This function returns a pointer to the shared memory that the platform has kept aside to pass trusted firmware related information that next BL image needs.
void plat_flush_next_bl_params(void); This function flushes to main memory all the params that are passed to next image.
int bl2_plat_handle_post_image_load(unsigned int image_id) This function can be used by the platforms to update/use image information for given `image_id`.
`desc_image_load.c` contains utility functions which can be used by the platforms to generate, load and executable, image list based on the registered image descriptors.
This patch also adds new version of `load_image/load_auth_image` functions in-order to achieve the above capability.
Following are the changes for the new version as compared to old: - Refactor the signature and only keep image_id and image_info_t arguments. Removed image_base argument as it is already passed through image_info_t. Given that the BL image base addresses and limit/size are already provided by the platforms, the meminfo_t and entry_point_info arguments are not needed to provide/reserve the extent of free memory for the given BL image.
- Added check for the image size against the defined max size. This is needed because the image size could come from an unauthenticated source (e.g. the FIP header). To make this check, new member is added to the image_info_t struct for identifying the image maximum size.
New flag `LOAD_IMAGE_V2` is added in the Makefile. Default value is 0.
NOTE: `TRUSTED_BOARD_BOOT` is currently not supported when `LOAD_IMAGE_V2` is enabled.
Change-Id: Ia7b643f4817a170d5a2fbf479b9bc12e63112e79
show more ...
|
| 51c79b73 | 30-Aug-2016 |
Soby Mathew <soby.mathew@arm.com> |
AArch32: resolve build error when LOG_LEVEL=50
This patch resolves a build error in Trusted Firmware when `ARCH=aarch32` and LOG_LEVEL >= 50.
Change-Id: I62a23ded4a25304533cdcc5ff11442aee041709b |