| b3c4f4f5 | 05-Sep-2017 |
Peng Fan <peng.fan@nxp.com> |
core: arm: sm: add psci power state macros
Add PSCI_POWER_STATE_X macros
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carr
core: arm: sm: add psci power state macros
Add PSCI_POWER_STATE_X macros
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| f51f270a | 05-Sep-2017 |
Peng Fan <peng.fan@nxp.com> |
core: arm: imx: get mmdc type
Add get mmdc type support, this will be used when configuring ddr into self refresh for low power feature.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jens Wi
core: arm: imx: get mmdc type
Add get mmdc type support, this will be used when configuring ddr into self refresh for low power feature.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| e621e4e5 | 26-Aug-2017 |
Peng Fan <peng.fan@nxp.com> |
core: imx: simplify code
Wrap memory registration using macros to make it easy to add new soc/arch support.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linar
core: imx: simplify code
Wrap memory registration using macros to make it easy to add new soc/arch support.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| ed74b273 | 12-Sep-2017 |
Peng Fan <peng.fan@nxp.com> |
core: imx7: fix comments
Fix comments.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> |
| 49a3c15a | 26-Aug-2017 |
Peng Fan <peng.fan@nxp.com> |
core: arm: imx: move psci code to pm
Move psci code to pm.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.car
core: arm: imx: move psci code to pm
Move psci code to pm.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 86e50a60 | 18-Sep-2017 |
Peng Fan <peng.fan@nxp.com> |
core: arm: psci: add suspend resume common functions
Add cpu suspend/resume common functions.
Platform psci suspend functions need to call sm_pm_cpu_suspend(arg, platform_suspend) to runs into susp
core: arm: psci: add suspend resume common functions
Add cpu suspend/resume common functions.
Platform psci suspend functions need to call sm_pm_cpu_suspend(arg, platform_suspend) to runs into suspend.
The i.MX flow is: psci_cpu_suspend->imx7_cpu_suspend->sm_pm_cpu_suspend(arg, func) The "func" runs in on-chip ram that not losing power when system runs into suspend or low power state. Argument "arg" is passed to function "func" as argument through register "r0".
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| df34b183 | 16-Sep-2017 |
Peng Fan <peng.fan@nxp.com> |
core: arm: kernel: make thread_core_local public
Move the struture of thread_core_local from thread_private.h to thread.h to make it public.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by:
core: arm: kernel: make thread_core_local public
Move the struture of thread_core_local from thread_private.h to thread.h to make it public.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 1b181fb2 | 12-Sep-2017 |
Peng Fan <peng.fan@nxp.com> |
core: arm: psci: pass nsec ctx to psci
Pass non-secure context to psci functions. When cpu/system suspends, cpu may loose power, so when back to linux from tee, tee needs to return to a linux resume
core: arm: psci: pass nsec ctx to psci
Pass non-secure context to psci functions. When cpu/system suspends, cpu may loose power, so when back to linux from tee, tee needs to return to a linux resume point, not the usual return address after "smc" instruction. So we need to modify the mon_lr value in non-secure context.
Psci runs in monitor mode, sm_get_nsec_ctx can not be used, so pass the non-secure context pointer to the psci suspend function.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b95ac3da | 31-Aug-2017 |
Peng Fan <peng.fan@nxp.com> |
core: mmu: export map_memarea_sections
Export map_memarea_sections. We need a mmu table dedicated for low power feature, so export map_memarea_sections to create that section mapping.
Signed-off-by
core: mmu: export map_memarea_sections
Export map_memarea_sections. We need a mmu table dedicated for low power feature, so export map_memarea_sections to create that section mapping.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 30372800 | 15-Sep-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: introduce get_core_pos_mpidr()
Adds size_t get_core_pos_mpidr(uint32_t mpidr); which translates from mpdir to core position, like get_core_pos() does for the calling core.
get_core_pos_mpidr(
core: introduce get_core_pos_mpidr()
Adds size_t get_core_pos_mpidr(uint32_t mpidr); which translates from mpdir to core position, like get_core_pos() does for the calling core.
get_core_pos_mpidr() a weak function to allow platforms to override the implementation.
get_core_pos() now uses get_core_pos_mpidr() internally to calculate the core position without using any stack.
With get_core_pos_mpidr() all the platform specific implementations of get_core_pos() has been replaced with get_core_pos_mpidr() and get_core_pos() is not weak any longer to avoid unexpected runtime errors in out of tree rebased platforms.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU v8) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f2f36ec1 | 14-Sep-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: imx: fix build errors
Fix build errors in plat-imc/imx6.c and plat-imx/psci.c
Fixes: 6a815afa16230 ("core: introduce TEE_RAM_VA_START and TEE_TEXT_VA_START") Signed-off-by: Jerome Forissier <
core: imx: fix build errors
Fix build errors in plat-imc/imx6.c and plat-imx/psci.c
Fixes: 6a815afa16230 ("core: introduce TEE_RAM_VA_START and TEE_TEXT_VA_START") Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 69b9f69f | 08-Sep-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: asan: tag access for .ARM.extab and .ARM.exidx
The two sections .ARM.extab and .ARM.exidx are accessed when printing a stack trace. Tag access for these two sections to avoid recursive panics
core: asan: tag access for .ARM.extab and .ARM.exidx
The two sections .ARM.extab and .ARM.exidx are accessed when printing a stack trace. Tag access for these two sections to avoid recursive panics due to failing checks against shadow area.
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 726ce13e | 08-Sep-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: asan: fix check_access()
Prior to this patch the for loop in check_access() that checks the access in the shadow area is skipping accesses smaller than a ASAN block (8 bytes). This patch fixes
core: asan: fix check_access()
Prior to this patch the for loop in check_access() that checks the access in the shadow area is skipping accesses smaller than a ASAN block (8 bytes). This patch fixes that problem and checks also smaller accesses.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| abccd909 | 11-Sep-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: asan: provide asan_memset_unchecked()
Provides asan_memset_unchecked() which does a memset that isn't checked against the tagging in the ASAN shadow area. If ASAN isn't enabled it's replaced b
core: asan: provide asan_memset_unchecked()
Provides asan_memset_unchecked() which does a memset that isn't checked against the tagging in the ASAN shadow area. If ASAN isn't enabled it's replaced by a direct call to memset().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 979b19fc | 14-Sep-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pager: fix compile error
Fixes compile error by replacing TEE_TEXT_VA_ADDR with TEE_TEXT_VA_START
Fixes: 6a815afa1623 ("core: introduce TEE_RAM_VA_START and TEE_TEXT_VA_START") Reviewed-by: E
core: pager: fix compile error
Fixes compile error by replacing TEE_TEXT_VA_ADDR with TEE_TEXT_VA_START
Fixes: 6a815afa1623 ("core: introduce TEE_RAM_VA_START and TEE_TEXT_VA_START") Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU virt pager) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d97d0b71 | 14-Sep-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: arm32: fix assembly macro mov_imm
The assembly macro mov_imm incorrectly uses the "mov" instruction to load 16 bits of immediate data. This patch fixes the macro to use the "movw" instruction
core: arm32: fix assembly macro mov_imm
The assembly macro mov_imm incorrectly uses the "mov" instruction to load 16 bits of immediate data. This patch fixes the macro to use the "movw" instruction instead.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6a815afa | 06-Jul-2017 |
Zeng Tao <prime.zeng@hisilicon.com> |
core: introduce TEE_RAM_VA_START and TEE_TEXT_VA_START
The currently OP-TEE implementation depends on the identity mapping, and the CFG_TEE_RAM_START and CFG_TEE_LOAD_ADDR are used as both physic an
core: introduce TEE_RAM_VA_START and TEE_TEXT_VA_START
The currently OP-TEE implementation depends on the identity mapping, and the CFG_TEE_RAM_START and CFG_TEE_LOAD_ADDR are used as both physic and virtual address which is not extensible. This patch introduce the virtual address of these two marcos and as a base of non-identity mapping.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
show more ...
|
| b6568717 | 08-Sep-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: REE FS: bugfix error path
Fixes problem in put_dirh_primitive() when another concurrent has detected an error and thus closed ree_fs_dirh as a part of error recovery.
Acked-by: Jerome Forissi
core: REE FS: bugfix error path
Fixes problem in put_dirh_primitive() when another concurrent has detected an error and thus closed ree_fs_dirh as a part of error recovery.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jianhui Li <airbak.li@hisilicon.com> (hi3798cv200) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU v8) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0c07a905 | 10-Sep-2017 |
Igor Opaniuk <igor.opaniuk@linaro.org> |
arm timers: add read/write functions for counter PL1 control register
Can be used for enabling user access to both Physical/Virtual counter registers. Example of usage:
uint32_t cntkctl; cntkctl =
arm timers: add read/write functions for counter PL1 control register
Can be used for enabling user access to both Physical/Virtual counter registers. Example of usage:
uint32_t cntkctl; cntkctl = read_cntkctl(); cntkctl |= CNTKCTL_PL0VCTEN; write_cntkctl(cntkctl);
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
show more ...
|
| 7dbdef48 | 09-Sep-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: arm32: remove extra 'x' in core stack dump
Commit 6693786dda1a ("core: make panic call stack consistent with abort call stack") has mistakenly introduced an extra 'x' in the TEE core stack dum
core: arm32: remove extra 'x' in core stack dump
Commit 6693786dda1a ("core: make panic call stack consistent with abort call stack") has mistakenly introduced an extra 'x' in the TEE core stack dumps. Remove it.
Fixes: 6693786dda1a ("core: make panic call stack consistent with abort call stack") Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 6693786d | 04-Sep-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: make panic call stack consistent with abort call stack
The call stack is formatted differently when the TEE code panics vs. when it receives an abort exception. The unfortunate consequence is,
core: make panic call stack consistent with abort call stack
The call stack is formatted differently when the TEE code panics vs. when it receives an abort exception. The unfortunate consequence is, the symbolize.py helper script cannot be used to troubleshoot panics.
Fix the issue by introducing common functions to format the call stack: print_call_stack_arm32() and print_call_stack_arm64(), and by using them in the panic and abort paths.
Suggested-by: Zeng Tao <prime.zeng@hisilicon.com> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| eff52d1f | 04-Sep-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: arm64: fix print_kernel_stack()
print_kernel_stack() can only print the upmost address in the call stack, because the unwind_stack_arm64() function is passed 0 for stack and stack_size.
Use t
core: arm64: fix print_kernel_stack()
print_kernel_stack() can only print the upmost address in the call stack, because the unwind_stack_arm64() function is passed 0 for stack and stack_size.
Use the correct values, so that we can get complete stack dumps (when panic() is called for instance).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 2b9f2392 | 04-Sep-2017 |
Sumit Garg <sumit.garg@nxp.com> |
plat-ls: Add support for armv8 platform flavours
Added support for armv8 platform flavours as follows: - PLATFORM = ls-ls1043ardb - PLATFORM = ls-ls1046ardb
Signed-off-by: Sumit Garg <sumit.garg@nx
plat-ls: Add support for armv8 platform flavours
Added support for armv8 platform flavours as follows: - PLATFORM = ls-ls1043ardb - PLATFORM = ls-ls1046ardb
Signed-off-by: Sumit Garg <sumit.garg@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 417567c7 | 01-Sep-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: bugfix core_mmu_user_mapping_is_active()
Fixes race in both v7 and lpae versions of core_mmu_user_mapping_is_active() by temporarily disabling interrupts.
Reviewed-by: Etienne Carriere <etien
core: bugfix core_mmu_user_mapping_is_active()
Fixes race in both v7 and lpae versions of core_mmu_user_mapping_is_active() by temporarily disabling interrupts.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU v8) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 59ac3927 | 31-Aug-2017 |
Zeng Tao <prime.zeng@hisilicon.com> |
mk: report an error when the CFG_ARM64{32}_core both missing
When the CFG_ARM64_core and CFG_ARM32_core are both missing defined by the platform, it will raise unexpected compile errors. In this pat
mk: report an error when the CFG_ARM64{32}_core both missing
When the CFG_ARM64_core and CFG_ARM32_core are both missing defined by the platform, it will raise unexpected compile errors. In this patch, report an compile error when neither the CFG_ARM64_core nor CFG_ARM32_core is defined.
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
show more ...
|