| 112d6833 | 09-Mar-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove tee_mmu_map_init()
Removes tee_mmu_map_init() and adds the map_kinit() call to vm_info_init().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <j
core: remove tee_mmu_map_init()
Removes tee_mmu_map_init() and adds the map_kinit() call to vm_info_init().
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e1b6205b | 09-Mar-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: load_elf(): use vm_set_prot()
Rewrite load_elf() to use vm_set_prot() to finalize the TA mapping instead of remapping the TA again.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
core: load_elf(): use vm_set_prot()
Rewrite load_elf() to use vm_set_prot() to finalize the TA mapping instead of remapping the TA again.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 49e68601 | 09-Mar-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add vm_set_prot()
Adds vm_set_prot() to update the protection bits of an already registered region.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <
core: add vm_set_prot()
Adds vm_set_prot() to update the protection bits of an already registered region.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 211417d3 | 09-Mar-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: more flexible ta mapping
Replaces the current fixed array of TA map entries where some indexes have a special meaning. The new structures and functions dealing with this has a vm_ prefix inste
core: more flexible ta mapping
Replaces the current fixed array of TA map entries where some indexes have a special meaning. The new structures and functions dealing with this has a vm_ prefix instead of the old tee_mmu_ prefix.
struct tee_ta_region is replaced by struct vm_region, which is now stored in a linked list using the new TEE_MATTR-bits to identify special regions.
struct tee_mmu_info is replaced by vm_info, which now keeps the head of the linked list of regions.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a8d84b58 | 09-Mar-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add new TEE_MATTR defines
Adds TEE_MATTR_EPHEMERAL to tag TA mappings which are only used during a single call (open session or invoke parameters).
Adds TEE_MATTR_PERMANENT to tag TA mappings
core: add new TEE_MATTR defines
Adds TEE_MATTR_EPHEMERAL to tag TA mappings which are only used during a single call (open session or invoke parameters).
Adds TEE_MATTR_PERMANENT to tag TA mappings that must not be removed (kernel mappings while in user mode).
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 261109aa | 09-Mar-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tee_mmu_types.h: define TEE_MATTR_* with BIT
Uses the BIT() macro to define the TEE_MATTR_* macros.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <
core: tee_mmu_types.h: define TEE_MATTR_* with BIT
Uses the BIT() macro to define the TEE_MATTR_* macros.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 45d5cec0 | 09-Mar-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: mobj_seccpy_shm: remove unused pgdir_offset
Removes assignment of the otherwise unused pgdir_offset field in struct mobj_seccpy_shm and the field itself.
Reviewed-by: Etienne Carriere <etienn
core: mobj_seccpy_shm: remove unused pgdir_offset
Removes assignment of the otherwise unused pgdir_offset field in struct mobj_seccpy_shm and the field itself.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 69129ee9 | 09-Mar-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tee_mmu_add_rwmem(): remove pgdir_offset
Removes the pgdir_offset parameter from the tee_mmu_add_rwmem(). The function is only called from one place and then with pgdir_offset as -1.
Reviewed
core: tee_mmu_add_rwmem(): remove pgdir_offset
Removes the pgdir_offset parameter from the tee_mmu_add_rwmem(). The function is only called from one place and then with pgdir_offset as -1.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 0e3f6d6b | 09-Mar-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: REE FS: temporary block allocation
Large memory allocations with malloc() can fail due to a fragmented heap. This is especially a problem when configured with pager as the heap is kept as smal
core: REE FS: temporary block allocation
Large memory allocations with malloc() can fail due to a fragmented heap. This is especially a problem when configured with pager as the heap is kept as small as possible in that configuration for obvious reasons.
This patch allocates the temporary block needed for reading and writing in REE FS tee_pager_alloc() instead when the pager is enabled.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 820042a5 | 09-Mar-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tee_tadb_ta_read(): reduce tmp buffer
Large memory allocations with malloc() can fail due to a fragmented heap. The easiest way to avoid such failures is obviously to allocate smaller buffers.
core: tee_tadb_ta_read(): reduce tmp buffer
Large memory allocations with malloc() can fail due to a fragmented heap. The easiest way to avoid such failures is obviously to allocate smaller buffers.
Reduces the size of the temporary buffer used in tee_tadb_ta_read() when skipping over bytes in the payload. Instead of max 4k use 256 bytes. Impact on performance should be minimal as not much data are skipped in the payload.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ad22421a | 21-Mar-2018 |
Peng Fan <peng.fan@nxp.com> |
core: arm: imx7d: add low power cpuidle support
Add Low power cpuidle support.
The hard point is two cores could runs into low power idle at any time. So need to do protection. Here we could not us
core: arm: imx7d: add low power cpuidle support
Add Low power cpuidle support.
The hard point is two cores could runs into low power idle at any time. So need to do protection. Here we could not use cpu_spin_lock, because we need lock in c code and unlock in asm code, and in asm code, SMP is turned off.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 062c5456 | 13-Mar-2018 |
Peng Fan <peng.fan@nxp.com> |
core: imx: use a dedicated sub.mk for pm
Use a dedicated sub.mk for the directory holding power related source code.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jerome Forissier <jerome
core: imx: use a dedicated sub.mk for pm
Use a dedicated sub.mk for the directory holding power related source code.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 21c4f9f7 | 10-Mar-2018 |
Peng Fan <peng.fan@nxp.com> |
core: imx: implement psci_system_off
Implement psci_system_off.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wi
core: imx: implement psci_system_off
Implement psci_system_off.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 80bf9131 | 26-Mar-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: syscall_authenc_enc_final() initialize tlen
Fixes problem with possibly leaking uninitialized stack content via tlen.
Fixes: https://github.com/OP-TEE/optee_os/issues/2214 Reviewed-by: Jerome
core: syscall_authenc_enc_final() initialize tlen
Fixes problem with possibly leaking uninitialized stack content via tlen.
Fixes: https://github.com/OP-TEE/optee_os/issues/2214 Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 628a9a10 | 07-Mar-2018 |
Tetsuya Yoshizaki <yoshizaki.tetsuya@socionext.com> |
ltc: ctr: improve performance
When accel_ctr_encrypt() is not used, accel_ecb_encrypt() is used via ecb_encrypt() instead. The accel_ecb_encrypt() is frequently called at every single block process.
ltc: ctr: improve performance
When accel_ctr_encrypt() is not used, accel_ecb_encrypt() is used via ecb_encrypt() instead. The accel_ecb_encrypt() is frequently called at every single block process. VFP assembly code called from the accel_ecb_encrypt() is protected by tomcrypt_arm_neon_enable()/disable(). FIQ enable/disable and VFP register save/restore (64bitx32 registers!) to/from memory are done in the tomcrypt_arm_neon_enable()/disable(). These overhead exist in each single block process cause the degradation of system performance eventually. Cases where h/w accelerated AES-CTR did not show any effects or showed less performance than pure software processing have been observed.
This patch resolves the issue by increasing utilization rate of accel_ctr_encrypt().
Signed-off-by: Tetsuya Yoshizaki <yoshizaki.tetsuya@socionext.com> Signed-off-by: Victor Chong <victor.chong@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 3f524498 | 01-Mar-2018 |
Peng Fan <peng.fan@nxp.com> |
core: imx: a7_plat_init: implement get_core_pos_mpidr
Implement get_core_pos_mpidr for A7. According the DIT0017f_Cortex-A7_Integration_Manual_r0p5, If the system contains only a single multiprocess
core: imx: a7_plat_init: implement get_core_pos_mpidr
Implement get_core_pos_mpidr for A7. According the DIT0017f_Cortex-A7_Integration_Manual_r0p5, If the system contains only a single multiprocessor device, tie all the CLUSTERID[3:0] to HIGH. To i.MX family which use A7 core, there is no one contains more that 4 cores. on i.MX7ULP, there is only one core. So implement get_core_pos_mpidr to avoid get wrong cpu id.
Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e24b3d39 | 12-Mar-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
plat-imx: pm: generate struct imx7_pm_info offsets automatically
Remove hardcoded defines PM_INFO_MX7_* and generate them at build time instead.
Signed-off-by: Jerome Forissier <jerome.forissier@li
plat-imx: pm: generate struct imx7_pm_info offsets automatically
Remove hardcoded defines PM_INFO_MX7_* and generate them at build time instead.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-and-Tested-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 070168e2 | 12-Mar-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
build: introduce asm-defines-y
The Makefile rules that are used to generate a C header file containing constants for struct offsets etc. are currently in mk/compile.mk. They are used by core.mk whic
build: introduce asm-defines-y
The Makefile rules that are used to generate a C header file containing constants for struct offsets etc. are currently in mk/compile.mk. They are used by core.mk which sets a variable (asm-defines-file) before it includes compile.mk. This works well for this purpose, but does not scale to several files.
There is a use case for platform code to be able to use the asm-defines mechanism, too. Therefore, introduce a variable that can be used in any sub.mk: asm-defines-y.
In addition, to avoid duplication, the DEFINE and DEFINES macros are moved to their own header (core/include/gen-asm-defines.h), with the added benefit that it can be explicitly excluded from the checkpatch list and thus not generate any warning on the 'DEFINE' macro needing parentheses.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 89fe7c3c | 12-Mar-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
build: include <generated/asm-defines.h> instead of <asm-defines.h>
Make it clear that asm-defines.h is not to be found in the sources since it is generated.
Signed-off-by: Jerome Forissier <jerome
build: include <generated/asm-defines.h> instead of <asm-defines.h>
Make it clear that asm-defines.h is not to be found in the sources since it is generated.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 42dd7a20 | 13-Feb-2018 |
fangsuowu <fangsuowu@asrmicro.com> |
core: mmu: set reserved vaspace size configurable
Signed-off-by: Fangsuo Wu <fangsuowu@asrmicro.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.ca
core: mmu: set reserved vaspace size configurable
Signed-off-by: Fangsuo Wu <fangsuowu@asrmicro.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| e81475af | 12-Feb-2018 |
fangsuowu <fangsuowu@asrmicro.com> |
core: mmu: check virtual memory size in memory mapping
Current RES_VASPACE_SIZE is defined as (CORE_MMU_PGDIR_SIZE * 10). When requests virtual memory size larger than RES_VASPACE_SIZE, there's no s
core: mmu: check virtual memory size in memory mapping
Current RES_VASPACE_SIZE is defined as (CORE_MMU_PGDIR_SIZE * 10). When requests virtual memory size larger than RES_VASPACE_SIZE, there's no size check in core_mmu_add_mapping and the physic memory out of RES_VASPACE_SIZE is mapped incorrectly.
For example, suppose CORE_MMU_PGDIR_SIZE = 1 << 21, i.e. RES_VASPACE_ SIZE = 20M bytes. When mmap table initilized, dump_mmap_table shows:
E/TC:00 dump_mmap_table:704 type RES_VASPACE va 0x112600000..0x1139fffff pa 0x00000000..0x013fffff size 0x01400000 (pgdir) E/TC:00 dump_mmap_table:704 type TA_RAM va 0x113a00000..0x1153fffff pa 0x100600000..0x101ffffff size 0x01a00000 (pgdir) ... E/TC:00 dump_mmap_table:704 type IO_SEC va 0x117400000..0x117dfffff pa 0xc0000000..0xc09fffff size 0x00a00000 (pgdir)
after core_mmu_add_mapping(MEM_AREA_NSEC_SHM, paddr, 0x1a00000) executed:
E/TC:00 dump_mmap_table:704 type RES_VASPACE va 0x114000000..0x1139fffff pa 0x00000000..0xffffffffff9fffff size 0xffffffffffa00000 (pgdir) E/TC:00 dump_mmap_table:704 type TA_RAM va 0x113a00000..0x1153fffff pa 0x100600000..0x101ffffff size 0x01a00000 (pgdir) ... E/TC:00 dump_mmap_table:704 type IO_SEC va 0x117400000..0x117dfffff pa 0xc0000000..0xc09fffff size 0x00a00000 (pgdir) E/TC:00 dump_mmap_table:704 type NSEC_SHM va 0x112600000..0x113ffffff pa 0x102000000..0x1039fffff size 0x01a00000 (pgdir)
There are 2 mistakes in the lattest dumped mmu table: 1. For type RES_VASPACE, the base address 0x114000000 is even smaller than its end address 0x1139fffff; 2. For type TA_RAM and NSEC_SHM, the virtual memory range 0x113a00000 ..0x113ffffff both exists, but the physics memory are different and virt_to_phys(0x113a00000) always returns 0x100600000.
With this patch, if requested virtual memory size overflows, core_mmu _add_mapping returns false directly.
Signed-off-by: Fangsuo Wu <fangsuowu@asrmicro.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 1887f582 | 14-Aug-2017 |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> |
arm: imx: add iMX7S WaARP7 board definition
This patch adds a simple option to select a WaARP7 board build. Existing code upstream does most of the work here.
Make this board port with:
make PLATF
arm: imx: add iMX7S WaARP7 board definition
This patch adds a simple option to select a WaARP7 board build. Existing code upstream does most of the work here.
Make this board port with:
make PLATFORM=imx PLATFORM_FLAVOR=mx7swarp7 ARCH=arm CFG_PAGEABLE_ADDR=0 CFG_DT_ADDR=0x83000000 DEBUG=y CFG_TEE_CORE_LOG_LEVEL=1 -j 8
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Peng Fan <peng.fan@nxp.com>
show more ...
|
| 2acaafd4 | 01-Mar-2018 |
Peng Fan <peng.fan@nxp.com> |
core: arm: sm: cleanup license
Cleanup license header to only have "SPDX-License-Identifier: BSD-2-Clause"
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@li
core: arm: sm: cleanup license
Cleanup license header to only have "SPDX-License-Identifier: BSD-2-Clause"
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 43852166 | 10-Mar-2018 |
Peng Fan <peng.fan@nxp.com> |
core: arm: imx: cleanup license
Cleanup license header to only have "SPDX-License-Identifier: BSD-2-Clause"
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@s
core: arm: imx: cleanup license
Cleanup license header to only have "SPDX-License-Identifier: BSD-2-Clause"
Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@st.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 9a6def2f | 05-Mar-2018 |
Jordan Rhee <jordanrh@microsoft.com> |
core: insert memory barrier after write to ns entry context
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Jordan Rhee <jordanrh@microsoft.com> Tested-by: Jordan Rhee <jordan
core: insert memory barrier after write to ns entry context
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Jordan Rhee <jordanrh@microsoft.com> Tested-by: Jordan Rhee <jordanrh@microsoft.com>
show more ...
|