History log of /optee_os/core/ (Results 3401 – 3425 of 6456)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
1defc23814-Dec-2020 Jens Wiklander <jens.wiklander@linaro.org>

core: copy ctx_finalize in syscall_cryp_state_copy()

Copies the ctx_finalize() when a state is copied using
syscall_cryp_state_copy() in order to support proper cleanup of the
state once it's remove

core: copy ctx_finalize in syscall_cryp_state_copy()

Copies the ctx_finalize() when a state is copied using
syscall_cryp_state_copy() in order to support proper cleanup of the
state once it's removed.

Acked-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Suggested-by: Tony He <tony.he@armchina.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

4cfcf34514-Dec-2020 Jens Wiklander <jens.wiklander@linaro.org>

core: copy mode in cts_copy_state()

Fixes cts_copy_state() by copying the "mode" element also for the state
to be complete.

Fixes: 96098f011f7c ("core: crypto: introduce struct crypto_cipher_ops")

core: copy mode in cts_copy_state()

Fixes cts_copy_state() by copying the "mode" element also for the state
to be complete.

Fixes: 96098f011f7c ("core: crypto: introduce struct crypto_cipher_ops")
Acked-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reported-by: Tony He <tony.he@armchina.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

8bdc52f714-Dec-2020 Heiko Stuebner <heiko.stuebner@theobroma-systems.com>

plat-rockchip: mark parameters as __maybe_unused in platform_secure_ddr_region

The weak variant of platform_secure_ddr_region() only emits a message
that the target region won't get protected due to

plat-rockchip: mark parameters as __maybe_unused in platform_secure_ddr_region

The weak variant of platform_secure_ddr_region() only emits a message
that the target region won't get protected due to missing platform-code.

Depending on the log-level this can result in the function parameters not
getting used at all, so mark them as __maybe_unused.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>

show more ...

5ae1f02a10-Dec-2020 Rouven Czerwinski <r.czerwinski@pengutronix.de>

core: tzc380: restart search at full size

Restart the search at the biggest region size after finding a region.
This way we can use subregions for the first offset and use full regions
afterwards.

core: tzc380: restart search at full size

Restart the search at the biggest region size after finding a region.
This way we can use subregions for the first offset and use full regions
afterwards.

Fixes https://github.com/OP-TEE/optee_os/issues/4252

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Tested-by: Robin van der Gracht <robin@protonic.nl>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

afd861ca14-Dec-2020 Jorge Ramirez-Ortiz <jorge@foundries.io>

drivers: crypto: se050: die_id generation

Guarantee the uniqueness of the die_id even when the requested length
is smaller than the se050 unique identifier.

Currently, tee_otp_get_die_id requests 1

drivers: crypto: se050: die_id generation

Guarantee the uniqueness of the die_id even when the requested length
is smaller than the se050 unique identifier.

Currently, tee_otp_get_die_id requests 12 bytes while the se050 unique
identifier is 18 bytes which is an issue as the uniqueness of the
device can be lost due to the truncation of the identifier.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...

0d016aff12-Dec-2020 Etienne Carriere <etienne.carriere@linaro.org>

core: fix user mode context reference in pager

Fix tee_pager_gpt_save_and_release_entries() to use to_user_mode_ctx()
to get current context user memory areas instead of to_user_ta_ctx()
since the f

core: fix user mode context reference in pager

Fix tee_pager_gpt_save_and_release_entries() to use to_user_mode_ctx()
to get current context user memory areas instead of to_user_ta_ctx()
since the former supports both SP and TA contexts.

Prior this change was pager asserting with an error trace like below:
E/TC:0 0 assertion 'is_user_ta_ctx(ctx)' failed at core/arch/arm/include/kernel/user_ta.h:56 <to_user_ta_ctx>
E/TC:0 0 Panic at core/kernel/assert.c:28 <_assert_break>

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

3f66770613-Dec-2020 Jorge Ramirez-Ortiz <jorge@foundries.io>

drivers: crypto: se050: strip spaces from crypto.mk

Some versions of the force function used in the makefile might produce
incorrect results when spaces are included in the parameter field.

In gene

drivers: crypto: se050: strip spaces from crypto.mk

Some versions of the force function used in the makefile might produce
incorrect results when spaces are included in the parameter field.

In general is a better practice to strip spaces when invoking this
sort of functions.

To prevent issues (ie: in case of backport) make sure that the SE050
driver is not affected by that variability.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...

f8cb9ade11-Dec-2020 Jorge Ramirez-Ortiz <jorge@foundries.io>

drivers: imx_i2c: remove non-portable use of define

Fix the build error triggered when enabling
-Werror=expansion-to-defined

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Eti

drivers: imx_i2c: remove non-portable use of define

Fix the build error triggered when enabling
-Werror=expansion-to-defined

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

4055cfc402-Dec-2020 Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Initial support for Renesas RZ/G2{H,M,N,E} SoC's

This patch adds support for Renesas RZ/G2{H,M,N,E} SoC's.

* Compiled with:
| make PLATFORM=rzg # Defaults to RZ/G2M SoC

Based on the work done

Initial support for Renesas RZ/G2{H,M,N,E} SoC's

This patch adds support for Renesas RZ/G2{H,M,N,E} SoC's.

* Compiled with:
| make PLATFORM=rzg # Defaults to RZ/G2M SoC

Based on the work done from Huynh Thanh Hung for RZ/G2 internally and
similar work done for Renesas RCar-Gen3 SoC's in mainline OP-TEE OS.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...

5ae0290f10-Dec-2020 Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

core: kernel: link.mk: Move rules to generate tee-raw.bin and tee.srec from rcar platform

Move the rules to generate tee-raw.bin and tee.srec from rcar platform to
core/arch/arm/kernel/link.mk so th

core: kernel: link.mk: Move rules to generate tee-raw.bin and tee.srec from rcar platform

Move the rules to generate tee-raw.bin and tee.srec from rcar platform to
core/arch/arm/kernel/link.mk so that similar platforms can re-use it.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>

show more ...

784d32ef09-Dec-2020 Jerome Forissier <jerome@forissier.org>

core: remove unused TEE_TIME_BOOT_TICKS_HZ

The TEE_TIME_BOOT_TICKS_HZ macro is not used, remove it.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Etienne Carriere <etienne.car

core: remove unused TEE_TIME_BOOT_TICKS_HZ

The TEE_TIME_BOOT_TICKS_HZ macro is not used, remove it.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

71716c2a03-Dec-2020 Vahid Dukandar <vahidd@microsoft.com>

spi: pl022: expose internal fifo flush API

We identified that the caller of the pl022 driver needs to flush the
pl022's internal fifo to make sure next transaction starts clean.

This PR expose exis

spi: pl022: expose internal fifo flush API

We identified that the caller of the pl022 driver needs to flush the
pl022's internal fifo to make sure next transaction starts clean.

This PR expose existing pl022_flush_fifo API to caller via spi_ops.

The validation is performed on bcm platform.

Signed-off-by: Vahid Dukandar <vahidd@microsoft.com>
Reviewed-by: Victor Chong <victor.chong@linaro.org>

show more ...

5cc9ca5804-Dec-2020 Marouene Boubakri <marouene.boubakri@nxp.com>

core: kernel: link.mk: make path to kernel linker script generic

The path to kernel script is hard-coded. Despite it is in a arch specific
folder, it should use defined variables.
This is helpful in

core: kernel: link.mk: make path to kernel linker script generic

The path to kernel script is hard-coded. Despite it is in a arch specific
folder, it should use defined variables.
This is helpful in case of porting OP-TEE OS to a new architecture such we
make maximum reuse of existing sources.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Acked-by: Jerome Forissier <jerome@forissier.org>

show more ...

d53c018305-Jul-2019 Fabien Parent <fparent@baylibre.com>

plat-mediatek: add support for MT8183 SoC

Add OP-TEE support for MT8183 SoC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

1dd81b5013-Feb-2020 Fabien Parent <fparent@baylibre.com>

plat-mediatek: Add support for GIC

Add the support for the GIC for the MediaTek platforms.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.or

plat-mediatek: Add support for GIC

Add the support for the GIC for the MediaTek platforms.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

814fc2e801-Dec-2020 Jerome Forissier <jerome@forissier.org>

core: keep.h: set SHF_ALLOC flag in all __keep_meta_vars_pager sections

The DECLARE_KEEP_PAGER() and DECLARE_KEEP_INIT() macros create symbols
in a special section called __keep_meta_vars_pager. The

core: keep.h: set SHF_ALLOC flag in all __keep_meta_vars_pager sections

The DECLARE_KEEP_PAGER() and DECLARE_KEEP_INIT() macros create symbols
in a special section called __keep_meta_vars_pager. The behavior
differs slightly in C and assembler:

- In C, the section is of type SHT_PROGBITS and has (SHF_ALLOC |
SHF_WRITE) flags,
- In assembler, the section is also SHT_PROGBITS but has no flags.

Enter the Clang linker, ld.lld. When used with --gc-sections, all
sections without the SHF_ALLOC flag (and a few other conditions) are
marked "live" in a first pass before dependencies on other sections
are considered. A side effect is that the reference to the symbol given
in DECLARE_KEEP_*() is ignored and the macro does not pull the desired
section in the link. That section is garbage collected instead.

Whether or not it is a bug in the linker is slightly above my level of
expertise. However, the DECLARE_KEEP_*() macros declare global symbols
that reference other symbols, so it really is allocatable stuff and
having the SHF_ALLOC flag does make sense. It is also consistent with
the C version. Note that adding the flag does not take more space in the
final executable since core/arch/arm/kernel/kern.ld.S discards the
__keep_meta_vars_pager output section anyways.

Therefore, add "a" to the .section command in DECLARE_KEEP_*().

Fixes a core crash which may be reproduced on QEMUv8 with xtest 1013
when OP-TEE is compiled with Clang 11 and CFG_WITH_PAGER=y.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...

f3368ec827-Nov-2020 Jerome Forissier <jerome@forissier.org>

core: arm: kern.ld.S: fix ROUNDUP() and ROUNDDOWN() for Clang

Fixes exceptions on boot when CFG_WITH_ASLR=y CFG_WITH_PAGER=y and the
Clang toolchain is used (tested with QEMUv8 and Clang 11.0.0).

T

core: arm: kern.ld.S: fix ROUNDUP() and ROUNDDOWN() for Clang

Fixes exceptions on boot when CFG_WITH_ASLR=y CFG_WITH_PAGER=y and the
Clang toolchain is used (tested with QEMUv8 and Clang 11.0.0).

The Clang linker happens to generate non-relocatable references to
symbols defined by expressions in the linker script which involve
some arithmetic operations on another symbol. More specifically, when
rounding up or down addresses to page boundaries using the expressions
defined in <util.h>. This commit introduces different ways of doing
ROUNDUP() and ROUNDDOWN() which work with both Clang and GCC:
- ROUNDUP() is replaced with the linker ALIGN() built-in function,
- ROUNDDOWN() is rewritten as 'symbol - something'.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

eb5f87aa26-Nov-2020 Jerome Forissier <jerome@forissier.org>

core: arm: kern.ld.S: remove redundant line

__rodata_init_end is defined twice. Remove one instance.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wikland

core: arm: kern.ld.S: remove redundant line

__rodata_init_end is defined twice. Remove one instance.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

3ecd96bb22-Nov-2020 Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>

core: Add support to import external TA signing public key

Build process requires that private key is present when signing TAs.

In order to support external HSM based re-signing of the TAs, add sup

core: Add support to import external TA signing public key

Build process requires that private key is present when signing TAs.

In order to support external HSM based re-signing of the TAs, add support
to import different TA signing public key into TEE OS binary by
introducing TA_PUBLIC_KEY.

By default TA_PUBLIC_KEY gets the value of TA_SIGN_KEY.

Re-signing of the TA's works by first signing TA during the build with
private key readily available during the build process (TA_SIGN_KEY).
Private key can in example be bundled key in keys/default_ta.pem.

Build will generate TA binary with signature embedded matching provided
private key.

This TA binary will be sent for HSM re-signing process where digest will
be calculated from the binary to get digest which will be signed with
private key protected by HSM. New signature will replaced the old
signature in the TA binary.

This re-signed TA will need to be deployed into the device for execution.

In order for OP-TEE OS to load the TA it needs to have the matching public
key from the HSM. Public key needs to be available during the build
process (TA_PUBLIC_KEY).

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>

show more ...

c232eb8d12-Nov-2020 Etienne Carriere <etienne.carriere@linaro.org>

core: stmm: remove useless return values to local svc handlers

Remove the boolean return value from local functions
stmm_handle_mem_mgr_service(), stmm_handle_storage_service(),
spm_eret_error() and

core: stmm: remove useless return values to local svc handlers

Remove the boolean return value from local functions
stmm_handle_mem_mgr_service(), stmm_handle_storage_service(),
spm_eret_error() and spm_handle_direct_req() that all end
returning to secure partition (StMM) execution. Rename
return_helper() to return_from_sp_helper() and remove its
return value as it only prepare returning to SP caller.
No functional change.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

4348e83417-Nov-2020 Etienne Carriere <etienne.carriere@linaro.org>

core: stmm: set panic flag when secure partition panics

Set the panic flag, that is in struct ta_ctx of the ts_ctx
(trusted service context) instance, when the secure partition
panics. This allows g

core: stmm: set panic flag when secure partition panics

Set the panic flag, that is in struct ta_ctx of the ts_ctx
(trusted service context) instance, when the secure partition
panics. This allows generic sequence to possibly release resources
related to the secure partition instance.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

d933933311-Nov-2020 Etienne Carriere <etienne.carriere@linaro.org>

core: stmm: support 32bit execution

Add support for 32bit EL0 secure partition StMM when Core is 32bit.

Defines 32bit FFA identifiers FFA_SVC_*_32 and FFA_MSG_*_32.
Defines SVC_REGS_Ax() macros to

core: stmm: support 32bit execution

Add support for 32bit EL0 secure partition StMM when Core is 32bit.

Defines 32bit FFA identifiers FFA_SVC_*_32 and FFA_MSG_*_32.
Defines SVC_REGS_Ax() macros to wrap 32b/64b thread_svc_regs structure
fields in StMM secure partition driver.
Defines __FFA_* local macros to wrap 32b/64b service IDs.

Save usr_sp banked register in return_helper() has it shall be preserved
when we will enter again the secure partition.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

c899c02711-Nov-2020 Etienne Carriere <etienne.carriere@linaro.org>

core: stmm: fix storage syscalls return value

Fix the return value for the RPMB storage service where syscalls
returned a TEE_Result value instead of a STMM_RET_* value.

Fixes: 42471ecf25b7 ("core:

core: stmm: fix storage syscalls return value

Fix the return value for the RPMB storage service where syscalls
returned a TEE_Result value instead of a STMM_RET_* value.

Fixes: 42471ecf25b7 ("core: load stmm via secure partition")
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

2dfd8eef12-Nov-2020 Etienne Carriere <etienne.carriere@linaro.org>

core: arm: helper function to read 32bit usr_sp banked register

Helper function thread_get_usr_sp() allows Core threaded execution
to read usr_sp CPU register. This is needed as part of the secure
p

core: arm: helper function to read 32bit usr_sp banked register

Helper function thread_get_usr_sp() allows Core threaded execution
to read usr_sp CPU register. This is needed as part of the secure
partition execution context when a secure partition execution is
about to return to normal world.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

03889d5424-Sep-2020 Jorge Ramirez-Ortiz <jorge@foundries.io>

drivers: se050: glue layer

The glue layer implements functionality required by the Plug And Trust
library from OP-TEE.

1) user crypto operations: these operations must run outside the SE050
in orde

drivers: se050: glue layer

The glue layer implements functionality required by the Plug And Trust
library from OP-TEE.

1) user crypto operations: these operations must run outside the SE050
in order to implement SCP03.

2) i2c operations: these operations provide access to the I2C bus to
communicate with the SE050.

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

show more ...

1...<<131132133134135136137138139140>>...259