| aa06d687 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: fix tee_pager_unhide_page()
Prior to this patch was tee_pager_unhide_page() searching for a physical page which was used at a certain page index in an area. What wasn't checked was that
core: pager: fix tee_pager_unhide_page()
Prior to this patch was tee_pager_unhide_page() searching for a physical page which was used at a certain page index in an area. What wasn't checked was that the area in addition to the page index matched. This leads sometimes unhiding the wrong page which will result in rapid aborts in succession until the correct page has been handled. With this patch the area is also checked fixing the problem.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 53a68c38 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: add pmem flags
Adds a flags field to struct tee_pager_pmem which is used to keep track of the hidden and dirty state of a physical page instead of relying on TEE_MATTR_* bits.
Reviewed
core: pager: add pmem flags
Adds a flags field to struct tee_pager_pmem which is used to keep track of the hidden and dirty state of a physical page instead of relying on TEE_MATTR_* bits.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 04752f69 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: allocate TA memory with fobj_ta_mem_alloc()
Uses fobj_ta_mem_alloc() to allocate TA memory when creating a new context.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-
core: allocate TA memory with fobj_ta_mem_alloc()
Uses fobj_ta_mem_alloc() to allocate TA memory when creating a new context.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fbcaa411 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add fobj_sec_mem_alloc()
Adds fobj_sec_mem_alloc() which allocates physical memory from tee_mm_sec_ddr, to be used as TA memory.
Support is added in the MOBJ of with_fobj type to handle this
core: add fobj_sec_mem_alloc()
Adds fobj_sec_mem_alloc() which allocates physical memory from tee_mm_sec_ddr, to be used as TA memory.
Support is added in the MOBJ of with_fobj type to handle this new kind of fobj.
A fobj_ta_mem_alloc() macro is added to use either fobj_rw_paged_alloc() if paging of user TAs is enabled or else to use fobj_sec_mem_alloc() instead.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5d06920a | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: remove useless debug print
Removes a useless debug print from tee_pager_unhide_page().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.w
core: pager: remove useless debug print
Removes a useless debug print from tee_pager_unhide_page().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ca0bd72f | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove mobj_paged_alloc()
Removes the now useless mobj_paged_alloc().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| ae02ae98 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: change tee_pager_add_uta_area() arguments
Simplifies tee_pager_add_uta_area() by taking a pointer to a struct fobj instead instead of a size. The return value is changed to a TEE_Result to har
core: change tee_pager_add_uta_area() arguments
Simplifies tee_pager_add_uta_area() by taking a pointer to a struct fobj instead instead of a size. The return value is changed to a TEE_Result to harmonize better with other functions.
vm_map() is changed to expect a mobj with an assigned fobj when paging is enabled. This requires that the pager allocations done with mobj_paged_alloc() are replaced with fobj_rw_paged_alloc().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 71e2b567 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: change tee_pager_add_core_area() arguments
Simplifies the tee_pager_add_core_area() arguments by taking an enum tee_pager_area_type and a pointer to a struct fobj instead of the old size, flag
core: change tee_pager_add_core_area() arguments
Simplifies the tee_pager_add_core_area() arguments by taking an enum tee_pager_area_type and a pointer to a struct fobj instead of the old size, flags, store and hashes.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2bb1139b | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: share fobj between areas
pager_add_uta_area() and tee_pager_add_core_area() allocates one fobj which is shared between all areas allocated during this function call.
Acked-by: Etienne
core: pager: share fobj between areas
pager_add_uta_area() and tee_pager_add_core_area() allocates one fobj which is shared between all areas allocated during this function call.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7513149e | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove flags argument from tee_pager_alloc()
Removes the flags argument from tee_pager_alloc() since it's only used with TEE_MATTR_LOCKED. The exception is the bignum pool, but since it still
core: remove flags argument from tee_pager_alloc()
Removes the flags argument from tee_pager_alloc() since it's only used with TEE_MATTR_LOCKED. The exception is the bignum pool, but since it still releases all locked pages each time the pool becomes unused it's efficient usage of memory.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0010a43f | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
mobj: add mobj_with_fobj type
Adds mobj_with_fobj MOBJ type to refer to fobj when passed to vm_map() etc.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <
mobj: add mobj_with_fobj type
Adds mobj_with_fobj MOBJ type to refer to fobj when passed to vm_map() etc.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2cf99c46 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: user_ta: refactor struct load_seg
Removes unneeded offs and oend fields from struct load_seg and add a mobj field. With the mobj stored in struct load_seg mobj_code in struct user_ta_elf isn't
core: user_ta: refactor struct load_seg
Removes unneeded offs and oend fields from struct load_seg and add a mobj field. With the mobj stored in struct load_seg mobj_code in struct user_ta_elf isn't needed any longer and is removed.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a73b5878 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Replace ta_head.entry with elf entry
Prior to this patch the entry function of the TA was stored in ta_head which is located in a read-only section of the TA. This results in the linker emitting a r
Replace ta_head.entry with elf entry
Prior to this patch the entry function of the TA was stored in ta_head which is located in a read-only section of the TA. This results in the linker emitting a relocation modifying a read-only section. This is a problem if the read-only section is mapped read-only while relocations are performed. To avoid this problematic relocation the ta_head.entry is removed and the ELF entry point is used instead.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ee546289 | 07-Feb-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add a file object interface
Adds a file object interface which is an abstraction of the storage part in a struct tee_pager_area. This adds no new features, just moves some code from tee_pager.
core: add a file object interface
Adds a file object interface which is an abstraction of the storage part in a struct tee_pager_area. This adds no new features, just moves some code from tee_pager.c into fobj.c.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fd10f62b | 28-Jan-2019 |
Ovidiu Mihalachi <ovidiu_mihalachi@mentor.com> |
core: keep alive TA context can be created after TA has panicked
When a keep alive TA instance panics, it continues to exist and blocks all further use of the TA until the next reboot of the system.
core: keep alive TA context can be created after TA has panicked
When a keep alive TA instance panics, it continues to exist and blocks all further use of the TA until the next reboot of the system. Moreover, when a new session is trying to be created for the panicked TA (while another session to that TA is still opened), the system hangs.
This change releases panicked TA context and clears all references to the released context when the TA panics regardless the TA properties. This allows keep alive TA instances to be created back after they have panicked without needing to reboot OP-TEE core.
Sessions on panicked TAs have to be closed by the client by calling the proper API when session client is scheduled back.
Signed-off-by: Ovidiu Mihalachi <ovidiu_mihalachi@mentor.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6e59bb1e | 07-May-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: handle user TA context released from session
Change is_user_ta_ctx() to support NULL context reference. For such references the function now returns boolean value false. This allows caller to
core: handle user TA context released from session
Change is_user_ta_ctx() to support NULL context reference. For such references the function now returns boolean value false. This allows caller to nicely abort their sequence when the context reference is already released from the session instance. Note that caller shall not assume a context refer to a PTA when is_user_ta_ctx() return false, it shall call is_pseudo_ta_ctx().
A side effect is that few test on reference and function return value can be simplified.
This change also ensures TA dump_state() function does not crash when called provides a null context reference.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| d62792a0 | 26-Apr-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
stm32mp1: clean shared resource to use vaddr_t
Replace type uintptr_t with type vaddr_t when applicable for consistency with other resources.
Signed-off-by: Etienne Carriere <etienne.carriere@linar
stm32mp1: clean shared resource to use vaddr_t
Replace type uintptr_t with type vaddr_t when applicable for consistency with other resources.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 45a858eb | 03-May-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
stm32mp1: default embed I2C driver
Default enable CFG_STM32_I2C. CFG_STM32_I2C=y mandates embedded device tree support.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jo
stm32mp1: default embed I2C driver
Default enable CFG_STM32_I2C. CFG_STM32_I2C=y mandates embedded device tree support.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 13749064 | 03-May-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
stm32mp1: fix missing I2C2/I2C6 non-secure mapping
I2C4 and I2C6 may be assigned to either secure or non-secure worlds during core initialization. Even when assigned to the non-secure world core may
stm32mp1: fix missing I2C2/I2C6 non-secure mapping
I2C4 and I2C6 may be assigned to either secure or non-secure worlds during core initialization. Even when assigned to the non-secure world core may access the bus during sequences where non-secure world cannot execute as during atomic low power transition sequences.
This change corrects the missing mapping of I2C4 and I2C6 IO memory with non-secure access attributes.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 5c151b7e | 18-Apr-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove CFG_DYN_SHM_CAP
Removes the now obsolete CFG_DYN_SHM_CAP. CFG_CORE_DYN_SHM should be used instead to enable/disable support for dynamic shared memory.
Reviewed-by: Etienne Carriere <et
core: remove CFG_DYN_SHM_CAP
Removes the now obsolete CFG_DYN_SHM_CAP. CFG_CORE_DYN_SHM should be used instead to enable/disable support for dynamic shared memory.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8aeb6c94 | 18-Apr-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: introduce CFG_CORE_RESERVED_SHM
Introduces CFG_CORE_RESERVED_SHM which if set to y enables reserved shared memory, else disables support for reserved shared memory.
Reviewed-by: Etienne Carri
core: introduce CFG_CORE_RESERVED_SHM
Introduces CFG_CORE_RESERVED_SHM which if set to y enables reserved shared memory, else disables support for reserved shared memory.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 37a6b717 | 18-Apr-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: introduce CFG_CORE_DYN_SHM
Introduces CFG_CORE_DYN_SHM which if set to y enables dynamic shared memory, else disables support for dynamic shared memory. In contrast with CFG_DYN_SHM_CAP it act
core: introduce CFG_CORE_DYN_SHM
Introduces CFG_CORE_DYN_SHM which if set to y enables dynamic shared memory, else disables support for dynamic shared memory. In contrast with CFG_DYN_SHM_CAP it actually removes the support instead of just omit reporting it.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fda78375 | 25-Apr-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: default tee_otp_get_die_id() based on HUK
Changes the default weak tee_otp_get_die_id() implementation to use huk_subkey_derive() to derive a unique die ID based on the hardware unique key.
N
core: default tee_otp_get_die_id() based on HUK
Changes the default weak tee_otp_get_die_id() implementation to use huk_subkey_derive() to derive a unique die ID based on the hardware unique key.
Note that the SSK derivation retains backwards compatibility if CFG_CORE_HUK_SUBKEY_COMPAT is set to 'y' and tee_otp_get_die_id() wasn't replaced with a platform specific implementation.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 90afc25f | 16-Jan-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: arm: mutex: remove owner_id
mutex::owner_id was used for debugging purposes only. Since commit 8aff6c039ee5 ("core: remove thread_{add,rem}_mutex()"), it is never set to a valid thread ID anym
core: arm: mutex: remove owner_id
mutex::owner_id was used for debugging purposes only. Since commit 8aff6c039ee5 ("core: remove thread_{add,rem}_mutex()"), it is never set to a valid thread ID anymore. Let's just remove the field.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1f9643fe | 23-Apr-2019 |
Michalis Pappas <mpappas@fastmail.fm> |
hikey: Add support for UART2
UART2 is console interface provided on the 40-pin Low Speed Connector in addition to the default UART3.
Reviewed-by: Victor Chong <victor.chong@linaro.org> Signed-off-b
hikey: Add support for UART2
UART2 is console interface provided on the 40-pin Low Speed Connector in addition to the default UART3.
Reviewed-by: Victor Chong <victor.chong@linaro.org> Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
show more ...
|