| 2ed7b71e | 23-Jun-2017 |
Etienne Carriere <etienne.carriere@st.com> |
context_mgmt: declare extern cm_set_next_context() for AArch32
This change avoids warning when setting -Wmissing-prototypes to compile bl1_context_mgmt.c.
Reported-by: Yann Gautier <yann.gautier@st
context_mgmt: declare extern cm_set_next_context() for AArch32
This change avoids warning when setting -Wmissing-prototypes to compile bl1_context_mgmt.c.
Reported-by: Yann Gautier <yann.gautier@st.com> Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
show more ...
|
| 9d6fc3c3 | 12-May-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
FWU: Introduce FWU_SMC_IMAGE_RESET
This SMC is as a means for the image loading state machine to go from COPYING, COPIED or AUTHENTICATED states to RESET state. Previously, this was only done when t
FWU: Introduce FWU_SMC_IMAGE_RESET
This SMC is as a means for the image loading state machine to go from COPYING, COPIED or AUTHENTICATED states to RESET state. Previously, this was only done when the authentication of an image failed or when the execution of the image finished.
Documentation updated.
Change-Id: Ida6d4c65017f83ae5e27465ec36f54499c6534d9 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| b6285d64 | 30-Mar-2017 |
Soby Mathew <soby.mathew@arm.com> |
AArch32: Rework SMC context save and restore mechanism
The current SMC context data structure `smc_ctx_t` and related helpers are optimized for case when SMC call does not result in world switch. Th
AArch32: Rework SMC context save and restore mechanism
The current SMC context data structure `smc_ctx_t` and related helpers are optimized for case when SMC call does not result in world switch. This was the case for SP_MIN and BL1 cold boot flow. But the firmware update usecase requires world switch as a result of SMC and the current SMC context helpers were not helping very much in this regard. Therefore this patch does the following changes to improve this:
1. Add monitor stack pointer, `spmon` to `smc_ctx_t`
The C Runtime stack pointer in monitor mode, `sp_mon` is added to the SMC context, and the `smc_ctx_t` pointer is cached in `sp_mon` prior to exit from Monitor mode. This makes is easier to retrieve the context when the next SMC call happens. As a result of this change, the SMC context helpers no longer depend on the stack to save and restore the register.
This aligns it with the context save and restore mechanism in AArch64.
2. Add SCR in `smc_ctx_t`
Adding the SCR register to `smc_ctx_t` makes it easier to manage this register state when switching between non secure and secure world as a result of an SMC call.
Change-Id: I5e12a7056107c1701b457b8f7363fdbf892230bf Signed-off-by: Soby Mathew <soby.mathew@arm.com> Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
show more ...
|
| 949a52d2 | 11-Nov-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Fix integer overflows in BL1 FWU code
Before adding a base address and a size to compute the end address of an image to copy or authenticate, check this won't result in an integer overflow. If it do
Fix integer overflows in BL1 FWU code
Before adding a base address and a size to compute the end address of an image to copy or authenticate, check this won't result in an integer overflow. If it does then consider the input arguments are invalid.
As a result, bl1_plat_mem_check() can now safely assume the end address (computed as the sum of the base address and size of the memory region) doesn't overflow, as the validation is done upfront in bl1_fwu_image_copy/auth(). A debug assertion has been added nonetheless in the ARM implementation in order to help catching such problems, should bl1_plat_mem_check() be called in a different context in the future.
Fixes TFV-1: Malformed Firmware Update SMC can result in copy of unexpectedly large data into secure memory
Change-Id: I8b8f8dd4c8777705722c7bd0e8b57addcba07e25 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Signed-off-by: Dan Handley <dan.handley@arm.com>
show more ...
|
| 1bfb7068 | 14-Nov-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
Add some debug assertions in BL1 FWU copy code
These debug assertions sanity check the state of the internal FWU state machine data when resuming an incomplete image copy operation.
Change-Id: I38a
Add some debug assertions in BL1 FWU copy code
These debug assertions sanity check the state of the internal FWU state machine data when resuming an incomplete image copy operation.
Change-Id: I38a125b0073658c3e2b4b1bdc623ec221741f43e Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
show more ...
|
| b38a9e5c | 14-Nov-2016 |
Sandrine Bailleux <sandrine.bailleux@arm.com> |
bl1_fwu_image_copy() refactoring
This patch refactors the code of the function handling a FWU_AUTH_COPY SMC in BL1. All input validation has been moved upfront so it is now shared between the RESET
bl1_fwu_image_copy() refactoring
This patch refactors the code of the function handling a FWU_AUTH_COPY SMC in BL1. All input validation has been moved upfront so it is now shared between the RESET and COPYING states.
Change-Id: I6a86576b9ce3243c401c2474fe06f06687a70e2f Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Signed-off-by: Dan Handley <dan.handley@arm.com>
show more ...
|