| 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 ...
|
| 082f27ae | 03-May-2019 |
Etienne Carriere <etienne.carriere@st.com> |
stm32_uart: pin control with stm32_gpio
stm32_uart instance get related pins configuration from device tree content.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Acked-by: Jerome Foris
stm32_uart: pin control with stm32_gpio
stm32_uart instance get related pins configuration from device tree content.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 9d8a03df | 03-May-2019 |
Etienne Carriere <etienne.carriere@st.com> |
stm32_uart: register secure/non-secure device
stm32_uart instance registers as secure/non-secure resources according to device tree content.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com
stm32_uart: register secure/non-secure device
stm32_uart instance registers as secure/non-secure resources according to device tree content.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com> Acked-by: Jerome Forissier <jerome.forissier@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 ...
|
| 61e7d84c | 29-Apr-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
stm32_i2c: expose standard speed in driver API
Move definition of I2C standard speeds configuration means from driver source file to its header file. This change allows bus owners to use appropriate
stm32_i2c: expose standard speed in driver API
Move definition of I2C standard speeds configuration means from driver source file to its header file. This change allows bus owners to use appropriate value for bus configuration.
Exposes struct i2c_speed_e and enum i2c_speed_e
This change fixes the driver API as enum i2c_speed_e is expected by the API.
Fixes: b844655c9519 ("stm32_i2c: driver for STM32 I2C bus")
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 563f6249 | 29-Apr-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
stm32_gpio: fix pinctrl sanity test against platform
When parsing device tree nodes, skip non matching GPIO banks rather than panicking straight. Function ckeck_gpio_bank() already panics if not fin
stm32_gpio: fix pinctrl sanity test against platform
When parsing device tree nodes, skip non matching GPIO banks rather than panicking straight. Function ckeck_gpio_bank() already panics if not finding a matching GPIO bank node.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| ae49405b | 02-May-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
stm32_i2c: correct timeout detection on transfer stop event
Fix timeout detection in i2c_wait_stop().
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.
stm32_i2c: correct timeout detection on transfer stop event
Fix timeout detection in i2c_wait_stop().
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| fee710d0 | 03-May-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
stm32_i2c: fix bug in device tree support
Correct missing local variable in stm32_i2c_get_setup_from_fdt().
Fixes: c75303f777b7 ("stm32_i2c: handle pinctrl")
Signed-off-by: Etienne Carriere <etien
stm32_i2c: fix bug in device tree support
Correct missing local variable in stm32_i2c_get_setup_from_fdt().
Fixes: c75303f777b7 ("stm32_i2c: handle pinctrl")
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|