History log of /optee_os/core/ (Results 6026 – 6050 of 6456)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
876d549a09-Dec-2015 Victor Chong <victor.chong@linaro.org>

plat-mediatek: generate new TA dev kit for ARM64

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Tested-by: Victor Chong <victor.chong@linaro.org> (mediatek build only)
Reviewed-by: Pascal Bra

plat-mediatek: generate new TA dev kit for ARM64

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Tested-by: Victor Chong <victor.chong@linaro.org> (mediatek build only)
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>

show more ...

9fcc9dff11-Dec-2015 Victor Chong <victor.chong@linaro.org>

Generate new TA dev kit for ARM32 platforms

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.foriss

Generate new TA dev kit for ARM32 platforms

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>

show more ...

5dd05ba716-Nov-2015 Jens Wiklander <jens.wiklander@linaro.org>

core/arm64: core local flags

Updates core local flags (irq, fiq, abort, tmp-stack) in all relevant
exception handlers.

Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (FVP)
Signed-off-by: Jen

core/arm64: core local flags

Updates core local flags (irq, fiq, abort, tmp-stack) in all relevant
exception handlers.

Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (FVP)
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

bc1ac4ab16-Nov-2015 Jens Wiklander <jens.wiklander@linaro.org>

core/arm64: shrink struct thread_core_local

d5fbeadc16-Nov-2015 Jens Wiklander <jens.wiklander@linaro.org>

core/arm64: clean assembly IRQ/FIQ handlers

Clean the assembly part of the IRQ and FIQ handlers.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

27ecfc4d11-Dec-2015 Jens Wiklander <jens.wiklander@linaro.org>

arm: bugfix compile error in tee_mmu_map()

Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wikland

arm: bugfix compile error in tee_mmu_map()

Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

7b3f7edc10-Dec-2015 Victor Chong <victor.chong@linaro.org>

Fix compile error with newer gcc

$ make \
CFG_ARM64_core=y \
CROSS_COMPILE_ta_arm64=aarch64-linux-gnu- \
CROSS_COMPILE=arm-linux-gnueabihf- \
CROSS_COMPILE_core=aarch64-linux-gnu- \
CROSS_COMPI

Fix compile error with newer gcc

$ make \
CFG_ARM64_core=y \
CROSS_COMPILE_ta_arm64=aarch64-linux-gnu- \
CROSS_COMPILE=arm-linux-gnueabihf- \
CROSS_COMPILE_core=aarch64-linux-gnu- \
CROSS_COMPILE_ta_arm32=arm-linux-gnueabihf- \
DEBUG=0 \
PLATFORM=hikey \
CFG_TEE_CORE_LOG_LEVEL=2 \
CFG_TEE_TA_LOG_LEVEL=3

core/arch/arm/mm/tee_mmu.c: In function 'tee_mmu_map':
core/arch/arm/mm/tee_mmu.c:266:10: error: 'pa' may be used uninitialized in this function [-Werror=maybe-uninitialized]
paddr_t pa;
^

gcc version 4.9.2 20140811 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.08 - Linaro GCC 4.9-2014.08) is ok but
gcc version 4.9.3 20150413 (prerelease) (Linaro GCC 4.9-2015.05) generates this error.

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>

show more ...

bb6e1b3e03-Dec-2015 Jerome Forissier <jerome.forissier@linaro.org>

plat-hikey: generate new TA dev kit for ARM64

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Reviewed-by: Jens Wiklander <jens.wikl

plat-hikey: generate new TA dev kit for ARM64

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

156fe68503-Dec-2015 Pascal Brand <pascal.brand@st.com>

build: fix definition of MDBG_ENABLE

Note that because of this bug, MDBG_ENABLE was always defined.
Now, MDBG_ENABLE is not defined by default.

Reviewed-by: Jerome Forissier <jerome.forissier@linar

build: fix definition of MDBG_ENABLE

Note that because of this bug, MDBG_ENABLE was always defined.
Now, MDBG_ENABLE is not defined by default.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU)
Signed-off-by: Pascal Brand <pascal.brand@st.com>

show more ...

945694b902-Dec-2015 Pascal Brand <pascal.brand@st.com>

alloc: fix mutex usage

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Pascal Brand <pascal.brand@st.com>

ff88e8ad04-Dec-2015 Pascal Brand <pascal.brand@st.com>

Fix tee_ta_rpc_load in case of out of memory

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Pascal Brand <pascal.brand

Fix tee_ta_rpc_load in case of out of memory

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU)
Signed-off-by: Pascal Brand <pascal.brand@st.com>

show more ...

8fdf297304-Dec-2015 Pascal Brand <pascal.brand@st.com>

Add mutex on time

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU)
Signed-

Add mutex on time

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU)
Signed-off-by: Pascal Brand <pascal.brand@st.com>

show more ...

bee0235912-Nov-2015 Jens Wiklander <jens.wiklander@linaro.org>

core: support running 64bit TA

Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP Aarch32/64 TA)
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey Aarch32/64 TA)
Reviewe

core: support running 64bit TA

Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP Aarch32/64 TA)
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey Aarch32/64 TA)
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

d9e14f2912-Nov-2015 Jens Wiklander <jens.wiklander@linaro.org>

core: support loading ELF64 TA

Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

a702f5e712-Nov-2015 Jens Wiklander <jens.wiklander@linaro.org>

core: split thread_enter_user_mode

* elf_load_head() returns if it's a 32-bit or 64-bit TA (only 32-bit
for now)
* The bool is_32bit is propagated to the C function thread_enter_user_mode()
whic

core: split thread_enter_user_mode

* elf_load_head() returns if it's a 32-bit or 64-bit TA (only 32-bit
for now)
* The bool is_32bit is propagated to the C function thread_enter_user_mode()
which initializes a value for SPSR used to enter TA

Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

f07647d425-Nov-2015 Jens Wiklander <jens.wiklander@linaro.org>

core/arm64: fix get_thread_ctx macro

Fixes the macro get_thread_ctx to read current thread as a 32-bit
integer as it should.

Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Signed-off-by: Jens

core/arm64: fix get_thread_ctx macro

Fixes the macro get_thread_ctx to read current thread as a 32-bit
integer as it should.

Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

fe3ccf2430-Nov-2015 Jerome Forissier <jerome.forissier@linaro.org>

libutils: add %pUl format for UUIDs

The debug traces in tee_ta_manager.c do not show the last 8 bytes of
the TA UUIDs, which makes the output confusing sometimes.
This commit adds support for a new

libutils: add %pUl format for UUIDs

The debug traces in tee_ta_manager.c do not show the last 8 bytes of
the TA UUIDs, which makes the output confusing sometimes.
This commit adds support for a new printf format for little-endian
encoded UUIDs: %pUl, and uses it in tee_ta_manager.c. For example:

TEE_UUID uuid;
DMSG("UUID: %pUl", (void *)&uuid);

...will print something like:

[...] UUID: cb3e5ba0-adf1-11e0-998b0002a5d5c51b

The new format is available when using the trace macros or the new
functions: snprintk(), vsnprintk() declared in <printk.h>.
But, snprintf() and vsnprintf() are not modified in order not to break
standard compliance.

This format is taken from the Linux kernel [1].

[1] https://www.kernel.org/doc/Documentation/printk-formats.txt

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>

show more ...

aeb7886311-Nov-2015 Jens Wiklander <jens.wiklander@linaro.org>

plat-vexpress: generate new TA dev kit for ARM64

Renames the user-ta dev kit to ta_arm32 and adds a new TA dev kit as
ta_arm64. ta_arm64 is only built when TEE Core is compiled as ARM64.

Reviewed-b

plat-vexpress: generate new TA dev kit for ARM64

Renames the user-ta dev kit to ta_arm32 and adds a new TA dev kit as
ta_arm64. ta_arm64 is only built when TEE Core is compiled as ARM64.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU)
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

4175ef9a02-Dec-2015 Victor Chong <victor.chong@linaro.org>

hikey: make console configurable

96boards HiKey defaults to UART3 for console.
We keep the default at UART0 to keep secure world logs separate,
but gives users an option to use UART3 if preferred.
B

hikey: make console configurable

96boards HiKey defaults to UART3 for console.
We keep the default at UART0 to keep secure world logs separate,
but gives users an option to use UART3 if preferred.
Build with:

make ... CFG_HIKEY_UART3=y

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>

show more ...

2dcb3d3602-Dec-2015 Jerome Forissier <jerome.forissier@linaro.org>

core: syscall_open_ta_session: do not copy session if TA is not found

Fixes the following xtest failure on HiKey:

root@HiKey:/ xtest 8031
[...]
* XTEST_TEE_8031 a7-a3-6b
ERR [761] TEES:load_ta:

core: syscall_open_ta_session: do not copy session if TA is not found

Fixes the following xtest failure on HiKey:

root@HiKey:/ xtest 8031
[...]
* XTEST_TEE_8031 a7-a3-6b
ERR [761] TEES:load_ta:317: TA not found
ERR TEE-CORE:_assert_log:38: Assertion
'((vaddr_t)kaddr - tee_svc_uref_base) < UINT32_MAX' failed at
core/include/tee/tee_svc.h:83

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

2ab7da0f27-Oct-2015 SY Chiu <sy.chiu@linaro.org>

Secure Storage: Added a flag to turn Block Cache off

Introduce a new flag CFG_FS_BLOCK_CACHE (default off) to
turn block cache on and off.

Signed-off-by: SY Chiu <sy.chiu@linaro.org>
Tested-by: SY

Secure Storage: Added a flag to turn Block Cache off

Introduce a new flag CFG_FS_BLOCK_CACHE (default off) to
turn block cache on and off.

Signed-off-by: SY Chiu <sy.chiu@linaro.org>
Tested-by: SY Chiu <sy.chiu@linaro.org> (QEMU,MT8173_EVB)
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>

show more ...

2b1cb5eb14-Sep-2015 SY Chiu <sy.chiu@linaro.org>

Secure Storage: implement block cache

This patch increasing the access speed if you are frequently
accessing some portion of data in a TEE file.

Tested on MediaTek MT8173 EVB, result as follows:
(d

Secure Storage: implement block cache

This patch increasing the access speed if you are frequently
accessing some portion of data in a TEE file.

Tested on MediaTek MT8173 EVB, result as follows:
(default chunk size is 1KB):

(w/ block cache)

WRITE:
-----------------+---------------+----------------
Data Size (B) | Time (s) | Speed (kB/s)
-----------------+---------------+----------------
256 | 0.005 | 50.000
512 | 0.007 | 71.429
1024 | 0.011 | 90.909
2048 | 0.027 | 74.074
4096 | 0.078 | 51.282
16384 | 0.348 | 45.977
524288 | 11.552 | 44.321
1048576 | 23.123 | 44.285
-----------------+---------------+----------------

READ:
-----------------+---------------+----------------
Data Size (B) | Time (s) | Speed (kB/s)
-----------------+---------------+----------------
256 | 0.002 | 125.000
512 | 0.003 | 166.667
1024 | 0.004 | 250.000
2048 | 0.008 | 250.000
4096 | 0.015 | 266.667
16384 | 0.056 | 285.714
524288 | 1.745 | 293.410
1048576 | 3.489 | 293.494
-----------------+---------------+----------------

REWRITE: (Read-Modify-Write)
-----------------+---------------+----------------
Data Size (B) | Time (s) | Speed (kB/s)
-----------------+---------------+----------------
256 | 0.010 | 25.000
512 | 0.012 | 41.667
1024 | 0.014 | 71.429
2048 | 0.035 | 57.143
4096 | 0.118 | 33.898
16384 | 0.517 | 30.948
524288 | 17.297 | 29.601
1048576 | 34.635 | 29.565
-----------------+---------------+----------------

(w/o block cache)

WRITE:
-----------------+---------------+----------------
Data Size (B) | Time (s) | Speed (kB/s)
-----------------+---------------+----------------
256 | 0.006 | 41.667
512 | 0.008 | 62.500
1024 | 0.011 | 90.909
2048 | 0.034 | 58.824
4096 | 0.144 | 27.778
16384 | 0.577 | 27.730
524288 | 18.519 | 27.647
1048576 | 37.030 | 27.653
-----------------+---------------+----------------

READ:
-----------------+---------------+----------------
Data Size (B) | Time (s) | Speed (kB/s)
-----------------+---------------+----------------
256 | 0.014 | 17.857
512 | 0.013 | 38.462
1024 | 0.014 | 71.429
2048 | 0.027 | 74.074
4096 | 0.068 | 58.824
16384 | 0.271 | 59.041
524288 | 8.683 | 58.966
1048576 | 17.372 | 58.945
-----------------+---------------+----------------

REWRITE: (Read-Modify-Write)
-----------------+---------------+----------------
Data Size (B) | Time (s) | Speed (kB/s)
-----------------+---------------+----------------
256 | 0.047 | 5.319
512 | 0.047 | 10.638
1024 | 0.047 | 21.277
2048 | 0.094 | 21.277
4096 | 0.230 | 17.391
16384 | 0.921 | 17.372
524288 | 29.469 | 17.374
1048576 | 58.925 | 17.378
-----------------+---------------+----------------

Signed-off-by: SY Chiu <sy.chiu@linaro.org>
Tested-by: SY Chiu <sy.chiu@linaro.org> (QEMU,MT8173_EVB)
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>

show more ...

0fcbddd411-Nov-2015 SY Chiu <sy.chiu@linaro.org>

debug: enable bget memory leak detection

This patch enables memory leak detection in bget_malloc.c.
This is very helpful to find memory leakage issue in teecore
or user TA. To enable it in teecore,

debug: enable bget memory leak detection

This patch enables memory leak detection in bget_malloc.c.
This is very helpful to find memory leakage issue in teecore
or user TA. To enable it in teecore, build optee_os with
`CFG_TEE_CORE_MALLOC_DEBUG=y`. For user TA, build optee_os
with `CFG_TEE_TA_MALLOC_DEBUG=y`.

Then, add the following statement at some point of your
code that might frequently been triggered:

mdbg_check(1);

It will dump allocated memory blocks and the holders of
them. If you find a memory block appears multiple times
after the system runs a period of time, it is very likely
the source of memory leakage.

Here is an example output:

ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 0 bytes core/tee/tee_svc_storage.c:260
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 104 bytes core/tee/tee_svc_storage.c:444
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 18 bytes core/tee/tee_pobj.c:119
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 56 bytes core/tee/tee_pobj.c:110
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 192 bytes core/arch/arm/mm/tee_mmu.c:93
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 32 bytes core/arch/arm/mm/tee_mmu.c:241
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 24 bytes core/arch/arm/mm/tee_mm.c:75
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 24 bytes core/arch/arm/mm/tee_mm.c:75
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 224 bytes core/arch/arm/kernel/tee_ta_manager.c:573
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 72 bytes core/arch/arm/kernel/tee_ta_manager.c:1202
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 7 bytes lib/libutils/isoc/strdup.c:34
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 7 bytes lib/libutils/isoc/strdup.c:34
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 7 bytes lib/libutils/isoc/strdup.c:34
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 7 bytes lib/libutils/isoc/strdup.c:34
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 32 bytes core/kernel/handle.c:70
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 24 bytes core/arch/arm/mm/tee_mm.c:48
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 24 bytes core/arch/arm/mm/tee_mm.c:48
ERR TEE-CORE:mdbg_check:720: Orphaned buffer: 24 bytes core/arch/arm/mm/tee_mm.c:48
ERR TEE-CORE:mdbg_check:720: Ignore buffer: 16 bytes lib/libutils/isoc/bget_malloc.c:794

You can see the buffer hold by strdup.c:34 appears 4 times,
so it's very likely to be the source of memory leakage.

Signed-off-by: SY Chiu <sy.chiu@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey)
Tested-by: SY Chiu <sy.chiu@linaro.org> (MT8173 EVB)

show more ...

2e130e4711-Nov-2015 SY Chiu <sy.chiu@linaro.org>

Secure Storage: resolve memory leakage issue

This is caused by forgetting to store the backup_version of
meta file in open_meta_file(). The backup_version field is
random and this may generate two v

Secure Storage: resolve memory leakage issue

This is caused by forgetting to store the backup_version of
meta file in open_meta_file(). The backup_version field is
random and this may generate two versions of meta file in TEE
file folder at commit time.

Unfortunately, we didn't handle this case well in tee_fs_common_rename().
If we have two meta files in TEE file folder, one buffer created
by strdup() will leak. It's hard to handle this case elegantly
in current implementation, so we just put a warning here.

We will propose a new design to address this issue later.

Signed-off-by: SY Chiu <sy.chiu@linaro.org>
Tested-by: SY Chiu <sy.chiu@linaro.org> (QEMU, MT8173 EVB)
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>

show more ...

6ef196af01-Dec-2015 Pascal Brand <pascal.brand@st.com>

Fix PL310 mutex allocation

Allocation of PL310 mutex in shared memory cannot use
malloc() as it is performed in fastcall, meaning without
any active thread.

This patch statically allocates, in the

Fix PL310 mutex allocation

Allocation of PL310 mutex in shared memory cannot use
malloc() as it is performed in fastcall, meaning without
any active thread.

This patch statically allocates, in the boot sequence, a mutex
that can be used as the l2cc_mutex, in shared memory.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM)
Signed-off-by: Pascal Brand <pascal.brand@st.com>

show more ...

1...<<241242243244245246247248249250>>...259