| 9551f4e5 | 08-Oct-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: juno: workaround cortex-a57 errata 808870
Workaround errata 808870: Unconditional VLDM instructions might cause an alignment fault even though the address is aligned
Products Affected: Cortex
core: juno: workaround cortex-a57 errata 808870
Workaround errata 808870: Unconditional VLDM instructions might cause an alignment fault even though the address is aligned
Products Affected: Cortex-A57 MPCore. Present in: r0p0
The workaround is to avoid generating the problematic instructions in AArch32 TA.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 405c67d3 | 05-Oct-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
abort.c: arm32: assume VFP instr if undef
If an undefined instruction exception is raised from user mode assume it is a VFP instruction unless VFP already is enabled.
This avoids reading user mode
abort.c: arm32: assume VFP instr if undef
If an undefined instruction exception is raised from user mode assume it is a VFP instruction unless VFP already is enabled.
This avoids reading user mode memory while handling an abort which until now has kept an undiscovered race where a page could become inaccessible before the abort handler had the chance to read the instruction from the page.
There is room for false positives. Those will be discovered the next time the instruction is executed and still causes an undefined instruction exception. Only this time VFP is already enabled so we know it's not a VFP instruction. Enabling VFP in vain like this is harmless.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b2322fd3 | 04-Oct-2018 |
Etienne Carriere <etienne.carriere@st.com> |
core: prevent allocation when exception index tables are empty
This change prevent the core from allocating memory, mapping and other resources to map exception index tables that are all empty.
Sig
core: prevent allocation when exception index tables are empty
This change prevent the core from allocating memory, mapping and other resources to map exception index tables that are all empty.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 13306346 | 25-Sep-2018 |
Etienne Carriere <etienne.carriere@st.com> |
core: correct time conversion in delay support
The previous code may overflow in 32bit architectures. This change fixes the issue by forcing 64bit computation during frequency to counter conversion.
core: correct time conversion in delay support
The previous code may overflow in 32bit architectures. This change fixes the issue by forcing 64bit computation during frequency to counter conversion.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 706c2c70 | 28-Sep-2018 |
Sumit Garg <sumit.garg@linaro.org> |
thread: fix stack space to not be part of tee.bin
Commit 935364080364 ("thread: move stacks to separate sections") makes stack space to be part of tee.bin which leads to approx. 130K increase in siz
thread: fix stack space to not be part of tee.bin
Commit 935364080364 ("thread: move stacks to separate sections") makes stack space to be part of tee.bin which leads to approx. 130K increase in size of tee.bin for platform with 2 threads. So this patch fixes the stack space to be in NOLOAD section only.
Fixes: 935364080364 ("thread: move stacks to separate sections") Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8e01b4b9 | 03-Oct-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: arm32: fix saving vfp state
Prior to this patch TF-A in AArch32 didn't save the normal world VFP data registers and thus always restored then as zeroes and causing problems in normal world.
W
core: arm32: fix saving vfp state
Prior to this patch TF-A in AArch32 didn't save the normal world VFP data registers and thus always restored then as zeroes and causing problems in normal world.
With this patch if running with TF-A in AArch32 save the VFP state using the same logic as in AArch64. Since TF-A saves and restores CPACR_EL1 we cannot tell if normal world currently is using VFP or not so we have to assume that it is and always save the VFP data registers if they are about to be changed.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (Hikey AArch32) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d7ef6334 | 01-Oct-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: user_ta: set freed EXIDX pointer to NULL
Clear reference of user TA exception index table once it is freed, otherwise it is freed a second time. This issue occurs when set_exidx() fails for so
core: user_ta: set freed EXIDX pointer to NULL
Clear reference of user TA exception index table once it is freed, otherwise it is freed a second time. This issue occurs when set_exidx() fails for some reasons as an out of memory issue. This change prevents core from panicking when it occurs.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 1cccb13f | 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: default guard reg_shm mobjs
Add a special guard for registered shared memory MOBJs to make sure that it's not possible to release MOBJs which aren't created by an explicit registration from no
core: default guard reg_shm mobjs
Add a special guard for registered shared memory MOBJs to make sure that it's not possible to release MOBJs which aren't created by an explicit registration from normal world.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c0e7f04e | 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: mobj_reg_shm_free() using mobj_reg_shm_put()
Let reg_shm MOBJs be completely reference counted meaning that mobj_free() on a reg_shm MOBJ only decrease the reference counter and only free it i
core: mobj_reg_shm_free() using mobj_reg_shm_put()
Let reg_shm MOBJs be completely reference counted meaning that mobj_free() on a reg_shm MOBJ only decrease the reference counter and only free it if it reaches 0.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f3a01e3a | 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove mobj_reg_shm_{,un}map()
Removes mobj_reg_shm_map() and mobj_reg_shm_unmap(), they are replaced by mobj_reg_shm_inc_map() and mobj_reg_shm_dec_map().
Reviewed-by: Etienne Carriere <etie
core: remove mobj_reg_shm_{,un}map()
Removes mobj_reg_shm_map() and mobj_reg_shm_unmap(), they are replaced by mobj_reg_shm_inc_map() and mobj_reg_shm_dec_map().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2dd4367c | 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pta: use mobj_reg_shm_{inc,dec}_map()
Use mobj_reg_shm_inc_map() and mobj_reg_shm_dec_map() instead of mobj_reg_shm_map() and mobj_reg_shm_unmap().
Acked-by: Etienne Carriere <etienne.carrier
core: pta: use mobj_reg_shm_{inc,dec}_map()
Use mobj_reg_shm_inc_map() and mobj_reg_shm_dec_map() instead of mobj_reg_shm_map() and mobj_reg_shm_unmap().
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 162f4454 | 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add mobj_reg_shm_{inc,dec}_map()
mobj_reg_shm_inc_map() used when a reg_shm mobj needs to be mapped and mobj_reg_shm_dec_map() is called when the mapping isn't needed any longer.
Reviewed-by:
core: add mobj_reg_shm_{inc,dec}_map()
mobj_reg_shm_inc_map() used when a reg_shm mobj needs to be mapped and mobj_reg_shm_dec_map() is called when the mapping isn't needed any longer.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0b020f94 | 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove reg_shm_{put,free}_by_cookie()
Removes the two functions mobj_reg_shm_put_by_cookie() and mobj_reg_shm_free_by_cookie(). mobj_reg_shm_put() and mobj_free() should be used instead.
Revi
core: remove reg_shm_{put,free}_by_cookie()
Removes the two functions mobj_reg_shm_put_by_cookie() and mobj_reg_shm_free_by_cookie(). mobj_reg_shm_put() and mobj_free() should be used instead.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 46b32337 | 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: entry_std: free/put by mobj in call cleanup
Use the mobj pointer instead of a shm_ref when cleaning up parameters in cleanup_shm_refs() at the end of a call.
Reviewed-by: Etienne Carriere <e
core: entry_std: free/put by mobj in call cleanup
Use the mobj pointer instead of a shm_ref when cleaning up parameters in cleanup_shm_refs() at the end of a call.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8b0c1367 | 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add mobj_reg_shm_put()
Adds mobj_reg_shm_put() for reference counting without cookie.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander
core: add mobj_reg_shm_put()
Adds mobj_reg_shm_put() for reference counting without cookie.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 09614f8e | 01-Oct-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: correct memory layout trace
Buffers that end at end of the available address range which may happen on 32bit machine fail have an end address that of computed as 0. This change uses a 64bit ad
core: correct memory layout trace
Buffers that end at end of the available address range which may happen on 32bit machine fail have an end address that of computed as 0. This change uses a 64bit address computation to prevent the displayed end address being 0.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 385000b0 | 01-Oct-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: correct overflows in range overlap functions
Buffers that end at end of the available address range which may happen on 32bit machine fail have an end address that of computed as 0. This chang
core: correct overflows in range overlap functions
Buffers that end at end of the available address range which may happen on 32bit machine fail have an end address that of computed as 0. This change uses the computation already used in _core_is_buffer_inside() to ensure functions _core_is_buffer_outside() and _core_is_buffer_intersect() return a reliable result.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 40004d9a | 27-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
abort.c: always save VFP state with thread context
Saving VFP state requires a thread context, if none is available print abort info and panic().
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@e
abort.c: always save VFP state with thread context
Saving VFP state requires a thread context, if none is available print abort info and panic().
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Fixes: cfa34ec63699 ("abort.c: manipulate with VFP state only if thread is active") Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (Hikey AArch64 pager) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 973e8908 | 01-Oct-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: trace out size of the pager physical page pool
Add a nice info trace about the size of the pager physical page pool.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by:
core: trace out size of the pager physical page pool
Add a nice info trace about the size of the pager physical page pool.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0f93de74 | 01-Oct-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: correct unpaged constraint on GIC driver
Release of secondary boot cores on 32bit machine use SMC that issue a SGI on secondary core. Since the interrupt is raised from the monitor mode, the r
core: correct unpaged constraint on GIC driver
Release of secondary boot cores on 32bit machine use SMC that issue a SGI on secondary core. Since the interrupt is raised from the monitor mode, the related GIC driver resources must be tagged as unpaged.
This change costs around 300 bytes of unpaged resident memory.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| db783ff8 | 01-Oct-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: correct dt_find_compatible_driver() if no driver found
By convention the compatible array for driver probing ends with a NULL compatible string ID reference.
This change ensures such NULL ref
core: correct dt_find_compatible_driver() if no driver found
By convention the compatible array for driver probing ends with a NULL compatible string ID reference.
This change ensures such NULL reference is properly handled as the end of the compatible array references.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 439203cb | 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
Allow mixed declaration and code
Removes the -Wdeclaration-after-statement compiler flag to allow mixed declaration and code
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by:
Allow mixed declaration and code
Removes the -Wdeclaration-after-statement compiler flag to allow mixed declaration and code
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2197c7c2 | 26-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
optee_msg.h: remove OPTEE_MSG_ATTR_FRAGMENT
OPTEE_MSG_ATTR_FRAGMENT isn't defined. Remove it from comments and replace with OPTEE_MSG_ATTR_NONCONTIG where applicable.
Acked-by: Jerome Forissier <je
optee_msg.h: remove OPTEE_MSG_ATTR_FRAGMENT
OPTEE_MSG_ATTR_FRAGMENT isn't defined. Remove it from comments and replace with OPTEE_MSG_ATTR_NONCONTIG where applicable.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 85771856 | 12-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: reference count registered shared memory
* Adds a reference counter to registered shared memory to make sure that it's not unregistered while in use. * Updates entry_std to use the reference
core: reference count registered shared memory
* Adds a reference counter to registered shared memory to make sure that it's not unregistered while in use. * Updates entry_std to use the reference counting functions
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 19cae8dc | 12-Sep-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
entry_std: use READ_ONCE() to read from shared memory
Use the READ_ONCE() macro everywhere shared memory is read to make sure that unexpected values can not be used.
Reviewed-by: Volodymyr Babchuk
entry_std: use READ_ONCE() to read from shared memory
Use the READ_ONCE() macro everywhere shared memory is read to make sure that unexpected values can not be used.
Reviewed-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|