summaryrefslogtreecommitdiff
path: root/fwu
AgeCommit message (Collapse)Author
2018-02-28Replace magic numbers in linkerscripts by PAGE_SIZEAntonio Nino Diaz
This way it is easier to understand the code and it is still valid even if the page size changes. Change-Id: I731ad0aa99a012eae4990ea95f507661a35ab818 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2017-09-04Issue reset SMC in ns_bl1u to prepare for the next imageDimitris Papastamos
After loading and authenticating an image, we need to issue a reset SMC for TF to clear its internal state. Without a reset SMC, the image overlap checks fail because the state is not cleared. This breaks FWU when TFTF is built with FWU_BL_TEST=0. Change-Id: Idf27d0ac07131c2ea838b36344d51b8b94d58ccd Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com> Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2017-06-16Fix FWU test on JunoSoby Mathew
This patch fixes an issue found in FWU test on Juno. Previously the test erraneously issued the IMAGE_RESET smc for SCP_BL2U image and thus caused the BL2U load an invalid image to SCP. This is fixed in the test by skipping issueing IMAGE_RESET smc for SCP_BL2U. Also this IMAGE_RESET smc should only be issued if FWU_BL_TEST flag is set which is also now corrected. Change-Id: Id534e12246702815833833e2eeb2aa19aa3417e1 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
2017-06-05FWU: Fix image overlaps in testsAntonio Nino Diaz
Make the tests work with the new check for overlaps added to the Trusted Firmware code. Change-Id: I5bf9818042e6a186166e979c77b49d62d222cb5d Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2017-05-17NS_BL1U: Fix output of error messagesSandrine Bailleux
The CHECK_SMC_RESULT() macro prints an error message when the value returned by the targeted SMC call is not the expected one. According to the SMC calling convention, an SMC returns 0 on success or a negative value otherwise. Therefore, the format string used to print the error message really ought to a signed integer specifier rather than an unsigned one. This gives a more accurate and useful error message. Change-Id: I50a29a2ec67a4051696e03011cd78468dd63611c Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2017-05-17NS_BL1U: Fail early if image size is invalidSandrine Bailleux
Change-Id: I035a0eaf8e2ce141f3300d3ee8b5bbdabba556e7 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2017-05-17NS_BL1U: Print image name in addition to its IDSandrine Bailleux
Change-Id: Id978ba71e7a076222a0f31b33fa29f3809e21aa2 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2017-05-17NS_BL1U: Reorganize FWU testsSandrine Bailleux
Move most of the FWU tests code in a separate file. The aim is to better isolate the tests from the rest of the normal operations carried by NS_BL1U (i.e. loading and authenticating subsequent images involved in the FWU process). There are still a couple of test SMCs interleaved in ns_bl1u_main() so this could be further improved. The test code in NS_BL1U has also been regorganized to improve its readability. Change-Id: If9d86852e59e2d3a40d8e148b9ae707c2b046e22 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2017-05-10Implement asm_assert()Antonio Nino Diaz
Even though the code had a few references to this function and to ASM_ASSERTION they were only leftover code from when that code was copied from the Trusted Firmware. The function asm_assert has actually been implemented, using the plat crash console for printing the error messages. All occurrences of ASM_ASSERTION replaced by ENABLE_ASSERTIONS. Change-Id: I73350eda3eb53d173b7767986c3b0e891b87cf1a Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2017-05-05AArch32: Add NS_BL1U and NS_BL2U supportYatharth Kochar
Change-Id: Ice09a70a7543ffebbd2cf8c8bed8f96daa25c801 Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
2016-11-10Isolate fwu-specific IO codeAntonio Nino Diaz
Added `plat_fwu_io_setup`, which is defined for arm platforms. Added it to the documentation. Renamed `arm_io_setup()` to `arm_fwu_io_setup()` and made it a weak function. Removed the `plat_arm_io_setup()` associated to it because this is not platform code and it's problematic for the actual `plat_arm_io_setup()` that will be implemented in a following patch. `plat_fwu_io_setup` calls `arm_fwu_io_storage` in ARM platforms. Change-Id: Ibfb63139a6c0b0991ab70e935a3723d454d8d70c
2016-09-26AArch32: Rework SMC helpersSoby Mathew
This patch introduces SMC framework for AArch32. The existing SMC helper functions have been made architecture-agnostic. The `smc64_args` structure is renamed to just `smc_args`. Similarly the `smc64_ret_values` is renamed to `smc_ret_values`. All the users of the SMC helpers are also modified in this patch. This patch also removes the `noinline` directive from the function prototype of `asm_tftf_smc64()`. This is because this assembly function is a separate compilation unit and the compiler cannot inline it anyway hence making the `noinline` directive redundant. Change-Id: I6fc34fc95dc7c0ac030113e43f681dff8d2d7ccf
2016-09-26AArch32: Add basic supportSoby Mathew
This patch pulls in required AArch32 support from ARM Trusted Firmware. The previous `spinlock.S` file which was AArch64 specific is now moved into the `aarch64` folder. The `asm_macros.S` file has been refactored and the common macros are moved to a new file `asm_macros_common.S`. The makefiles are also updated for these changes. Change-Id: I46e5f7472ee1025b158c3587e7dc12210425f929
2016-07-22Move plat_common.c out of AArch64 folderSoby Mathew
The functions implemented in plat_common.c can be easily reused between architectures with minor modification. Hence this patch moves the file out of the `aarch64` to its parent directory. The corresponding makefiles are also modified. Change-Id: Ia77129f14497f3a5801735bf753afc5c6a6f77e3
2016-07-22Refactor the xlat_tables librarySoby Mathew
This patch refactors the xlat_tables library to make it inline with the refactoring done in Trusted Firmware. The xlat_tables is now a separate library component in the `lib/` folder. It also includes all the enhancements done in Trusted Firmware to the xlat_tables library. Change-Id: I99f02c32ed44c659f989849507b091df0397442c
2016-07-14Remove `asm_platform_weak.S` fileSoby Mathew
This patch removes the `asm_platform_weak.S` file from TFTF framework. This is because functions defined by the file are now removed or reimplemented else where. The entrypoint.S file is also reworked to make use of `func` and `endfunc` helper macros. As a result, the framework.mk makefile and the linker scripts have undergone modifications. Change-Id: I18925c30f3a8f2b8ce7e827f8be13c81c6e2939b
2016-06-27Build Firmware Update images by default when supportedSandrine Bailleux
This patch enables the compilation of the Firmware Update non-secure images by default on platforms that support it. The FIRMWARE_UPDATE build flag is no longer expected on the build command line ; instead it is a platform makefile setting. Platforms that support Firmware Update should explicitly set this variable to 1. This is now the case for FVP and Juno. In other words, * On platforms that support Firmware Update, 'make all' will now build the TFTF, NS_BL1U and NS_BL2U binaries. * On platforms that do not support Firmware Update, 'make all' will build just the TFTF binary. Change-Id: Ib12c1cb06fee2b4b9933da0af1bc74350564f29d
2016-06-20Fix NS_BL1U & NS_BL2U makefilesSandrine Bailleux
Since commit 8eccdb813efc ("Compile files of stdlib separately"), the C standard library files are compiled separately. However, the makefiles for the NS_BL1U and NS_BL2U images haven't been updated accordingly and still include the former std.c file, which doesn't exist anymore. As a result, the NS_BL1U and NS_BL2U images fail to build at the moment. This patch defines the list of source files for the C standard library in the framework.mk makefile. This provides an easy way for any image built by the TFTF build system to include these files. The TFTF, NS_BL1U and NS_BL2U makefiles have been updated to make use of it. Change-Id: Id8fc3c9cab7864570d56bb351836f485db742d6e
2015-12-09FWU: Add FWU TOC test case support in TFTF.Yatharth Kochar
The Firmware Update feature implemented in Trusted Firmware code needs to be tested to check if FWU process gets started or not when the TOC header value in fip.bin is invalid. This patch adds this new test case to TFTF test framework. Following steps are carried out by the test case: * Invalidates the TOC header in fip.bin. * Calls PSCI SMC to reboot the system. * After reboot it checks TOC header validity. Change-Id: Ida96d8d7bf94485f63104009c28308cc1083c6a3
2015-12-09FWU: Add FWU SMC related test cases in NS_BL1UYatharth Kochar
The Firmware Update feature implemented in Trusted Firmware code needs to be tested for the SMC interface to make sure it is working as designed/expected. The main reasons why TFTF test framework cannot be used for this particular test scenario is that it executes totally out of NS-DDR memory and has huge memory requirements. Due to which, in its present implementation, it is not possible to execute it out of NS ROM/RAM memories. This patch adds, new function `ns_bl1u_fwu_smc_test()`, in NS_BL1U, which carries out FWU SMC interface test cases implemented in TF code. It also adds new flag `FWU_BL_TEST` in the Makefile to keep this under conditional compilation. Change-Id: Ide45b49a3d3fd3dc18450ed59f770907085874c4
2015-12-09FWU: Add FWU Normal image(NS_BL2U) support to TFTF.Yatharth Kochar
The Firmware Update(FWU) feature provides the capability to upgrade a complete global SoC firmware image from an external interface to SoC NVM memories such as NOR Flash. In order to carry on the above tasks both Normal and Secure world FWU images co-operate with each other and complete the Firmware Update process. This patch adds support for FWU Normal image(NS_BL2U) to the TFTF code base. The task carried out by NS_BL2U is to update original FIP using the backup FIP located at a given address. Change-Id: Icf8243513a15cebfd15f5cb82cead263f3209240
2015-12-09FWU: Add FWU Normal image(NS_BL1U) support to TFTF.Yatharth Kochar
The Firmware Update(FWU) feature provides the capability to upgrade a SoC firmware image from an external interface, such as NOR Flash, to SoC NVM memories. In order to carry on the above tasks both Normal and Secure world FWU images co-operate with each other and complete the Firmware Update process. This patch adds support for FWU Normal image(NS_BL1U) to the TFTF code base. The tasks carried out by NS_BL1U are as following: * Load FWU images from external NVM memory to NS RAM. * Call SMC's to copy and authenticate images. * Jump to NS_BL2U which carries out next FWU steps. Change-Id: I59bc85e285cac523acd82706acf96a8f5f4360d6