| b0ba0031 | 04-Oct-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
plat-stm32mp1: conf: fix tzdram default size when w/o rsv-shm
Fix the default TZDRAM size that is 32MByte when CFG_CORE_RESERVED_SHM is disable, not 30MByte.
Acked-by: Jerome Forissier <jerome.fori
plat-stm32mp1: conf: fix tzdram default size when w/o rsv-shm
Fix the default TZDRAM size that is 32MByte when CFG_CORE_RESERVED_SHM is disable, not 30MByte.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| e48bcda2 | 06-Oct-2022 |
Jayesh Choudhary <j-choudhary@ti.com> |
plat-k3: Add support for j784s4 platform
Add SA2UL and TRNG support for TI SoC J784S4 through OP-TEE.
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> Acked-by: Andrew Davis <afd@ti.com> Acked-
plat-k3: Add support for j784s4 platform
Add SA2UL and TRNG support for TI SoC J784S4 through OP-TEE.
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> Acked-by: Andrew Davis <afd@ti.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> [jf: wrap line >80 characters] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 61cfe9a2 | 01-Jul-2022 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: riscv: include: introduce riscv.h header
Creates header file risc.v to define most of the RISC-V operations.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Etienne Car
core: riscv: include: introduce riscv.h header
Creates header file risc.v to define most of the RISC-V operations.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| f30ea7ca | 01-Jul-2022 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: riscv: define RISC-V instruction set architecture in encoding.h
Define standard RISC-V instruction opcodes, control and status registers. This file is auto-generated from riscv-opcodes and it
core: riscv: define RISC-V instruction set architecture in encoding.h
Define standard RISC-V instruction opcodes, control and status registers. This file is auto-generated from riscv-opcodes and it is subject of regular updates.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 30c17aaa | 01-Jul-2022 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: riscv: plat-spike: default configuration for Spike platform
This commit sets the build configuration for a minimalist core to run on Spike platform.
Signed-off-by: Marouene Boubakri <marouene
core: riscv: plat-spike: default configuration for Spike platform
This commit sets the build configuration for a minimalist core to run on Spike platform.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 8ebfb009 | 19-Sep-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: fix compile error with CFG_CORE_WORKAROUND_SPECTRE_BP_SEC=n
Prior to this patch there's a compile error when building with CFG_CORE_WORKAROUND_SPECTRE_BP_SEC=n: core/arch/arm/kernel/thread.c:
core: fix compile error with CFG_CORE_WORKAROUND_SPECTRE_BP_SEC=n
Prior to this patch there's a compile error when building with CFG_CORE_WORKAROUND_SPECTRE_BP_SEC=n: core/arch/arm/kernel/thread.c: In function 'select_vector_wa_spectre_bhb': core/arch/arm/kernel/thread.c:644:48: error: 'thread_user_kdata_page' undeclared (first use in this function); did you mean 'thread_user_kcode_size'? 644 | struct thread_core_local *cl = (void *)thread_user_kdata_page; | ^~~~~~~~~~~~~~~~~~~~~~ | thread_user_kcode_size core/arch/arm/kernel/thread.c:644:48: note: each undeclared identifier is reported only once for each function it appears in core/arch/arm/kernel/thread.c:646:27: error: 'struct thread_core_local' has no member named 'bhb_loop_count' 646 | cl[get_core_pos()].bhb_loop_count = loop_count; | ^ core/arch/arm/kernel/thread.c:648:32: error: 'struct thread_core_local' has no member named 'bhb_loop_count' 648 | thread_get_core_local()->bhb_loop_count = loop_count; | ^~
Fix this by disabling the unused code.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 83ad3cdb | 27-Jun-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: simplify pgt interface provided by pgt_cache.h
Many of the function in the pgt interface takes more than one pointer to struct pgt_cache, struct vm_info or struct ts_ctx. All these pointers ar
core: simplify pgt interface provided by pgt_cache.h
Many of the function in the pgt interface takes more than one pointer to struct pgt_cache, struct vm_info or struct ts_ctx. All these pointers are available in struct user_mode_ctx so pass a pointer to that struct instead. This saves a few function arguments and also makes it a bit more clear how a function can be used.
pgt_clear_ctx_range(), pgt_flush_ctx_range() and pgt_flush_ctx() are renamed to drop the "_ctx" part in their names since it's not relevant any longer.
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 ...
|
| bfdeae23 | 23-Jun-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pgt: support preallocated translation tables for S-EL0
With CFG_CORE_PREALLOC_EL0_TBLS=y translation tables are allocated for a user space context at the time when the mapping is added a struc
core: pgt: support preallocated translation tables for S-EL0
With CFG_CORE_PREALLOC_EL0_TBLS=y translation tables are allocated for a user space context at the time when the mapping is added a struct vm_region. The translation tables will be kept available for the S-EL0 context as long at the mappings are unchanged.
Secure Partitions (SPs) can depend on translation tables always being available and avoid having to wait for translation tables.
Memory for the translation tables is allocated from the same memory as used for TAs and SPs. The number of available translation tables are limited by the amount of TA/SP memory available.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d6e33310 | 22-Jun-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pgt: rename to pgt_put_all() and pgt_get_all()
The two functions pgt_free() and pgt_alloc() has names which doesn't match well what they do so rename them.
pgt_free() to pgt_put_all(): This m
core: pgt: rename to pgt_put_all() and pgt_get_all()
The two functions pgt_free() and pgt_alloc() has names which doesn't match well what they do so rename them.
pgt_free() to pgt_put_all(): This matches better how page tables are managed since pgt_put_all() doesn't free the tables, they are just put in a cache list from which they later can be free or re-allocated.
pgt_alloc() to pgt_get_all(): pgt_get_all() may actually not allocate a new table, not if it can be found in the cache list.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7aa2bec8 | 08-Jun-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: pgt: use pgt_cache_list without pager too
Prior to this patch was only unused pgts cached when paging was enabled. Take this one step further and cache unused pgts when paging is disabled too.
core: pgt: use pgt_cache_list without pager too
Prior to this patch was only unused pgts cached when paging was enabled. Take this one step further and cache unused pgts when paging is disabled too. The purpose of this is to allow core_mmu_populate_user_map() to skip already initialized translation tables.
Add two helper functions pgt_pop_from_cache_list() and pgt_push_to_cache_list() to be used when updating the translation tables currently in the cache list.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f5154eb3 | 08-Jun-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: call tee_pager_rem_um_regions() from vm_info_final()
Moves the call to tee_pager_rem_um_regions() into vm_info_final() from free_utc() and stmm_ctx_destroy().
Reviewed-by: Etienne Carriere <e
core: call tee_pager_rem_um_regions() from vm_info_final()
Moves the call to tee_pager_rem_um_regions() into vm_info_final() from free_utc() and stmm_ctx_destroy().
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 ...
|
| e17e7a56 | 07-Jun-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: move pgt_cache to struct user_mode_ctx
Moves pgt_cache from struct thread_specific_data to struct user_mode_ctx.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome F
core: move pgt_cache to struct user_mode_ctx
Moves pgt_cache from struct thread_specific_data to struct user_mode_ctx.
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 ...
|
| 60d3fc69 | 08-Jun-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: initialize struct user_mode_ctx with vm_info_init()
Broadens the scope of vm_info_init() to initialize the entire struct user_mode_ctx.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.
core: initialize struct user_mode_ctx with vm_info_init()
Broadens the scope of vm_info_init() to initialize the entire struct user_mode_ctx.
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 ...
|
| 237029d3 | 06-Jun-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove save_ctx parameter from pgt_free()
Prior to this patch was pgt_free() taking a save_ctx parameter which was only used if paging of TAs was enabled. If on the other hand paging of TAs wa
core: remove save_ctx parameter from pgt_free()
Prior to this patch was pgt_free() taking a save_ctx parameter which was only used if paging of TAs was enabled. If on the other hand paging of TAs was enabled this parameter was always true. So simplify the logic by removing this parameter and where used internally always do as if save_ctx was true. This means that pgts used for paging will always first be pushed to the cache list to later be reclaimed by other means.
This patch does not change the de facto behaviour.
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 ...
|
| 93dc6b29 | 23-Sep-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add pointer authentication support
Previously pointer authentication was only supported for TAs. With this patch add a configuration option CFG_CORE_PAUTH to enable support for core. Each priv
core: add pointer authentication support
Previously pointer authentication was only supported for TAs. With this patch add a configuration option CFG_CORE_PAUTH to enable support for core. Each privileged thread has its own APIA key. There are also a separate APIA key for each physical core used when handling an abort or when using the tmp stack.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 4b46e0e8 | 04-Jul-2022 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
drivers: versal: mailbox communication
Mailbox driver to communicate with the PLM firmware executing on the Microblaze processor.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: J
drivers: versal: mailbox communication
Mailbox driver to communicate with the PLM firmware executing on the Microblaze processor.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 1e48849e | 04-Jul-2022 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
plat-versal: define the length of the cache line
Explicitly define the length of the cache line for the Versal ACAP platform.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerom
plat-versal: define the length of the cache line
Explicitly define the length of the cache line for the Versal ACAP platform.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 8d2d14e5 | 01-Sep-2022 |
Balint Dobszay <balint.dobszay@arm.com> |
core: sp: add support for SPs in the FIP
This commit introduces support for using SPs from the FIP. TF-A offers a mechanism to encapsulate an SP image and its manifest into an SP package and add tha
core: sp: add support for SPs in the FIP
This commit introduces support for using SPs from the FIP. TF-A offers a mechanism to encapsulate an SP image and its manifest into an SP package and add that to the FIP. During boot BL2 will load these packages into memory and the SPMC manifest is used to pass the load addresses to the SPMC. The SP package contains a header, the SP manifest and the SP image itself [1].
For loading the SP packages the existing embedded SP handling code is mostly reused. The only difference is that instead of a scattered array that's created at build time the SP packages are discovered at runtime and collected into a linked list.
Link: [1] https://trustedfirmware-a.readthedocs.io/en/v2.6/components/secure-partition-manager.html#secure-partition-packages Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
show more ...
|
| c9dad419 | 29-Aug-2022 |
Balint Dobszay <balint.dobszay@arm.com> |
core: sp: fix sp_dt_get_u64() alignment issue
In the SP DT files 64-bit values are represented by two 32-bit cells. When loaded into memory, the address of such value might not be 64-bit aligned. Cu
core: sp: fix sp_dt_get_u64() alignment issue
In the SP DT files 64-bit values are represented by two 32-bit cells. When loaded into memory, the address of such value might not be 64-bit aligned. Currently sp_dt_get_u64() simply dereferences a pointer to such value. This compiles to a 64-bit load instruction, which causes an alignment fault if the address was not 64-bit aligned.
Replace the direct dereferencing with the fdt64_ld() helper function which only uses byte loads.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
show more ...
|
| 7eda852f | 23-Aug-2022 |
Balint Dobszay <balint.dobszay@arm.com> |
core: sp: add DT UUID helper function
Adds helper function to read a UUID from the SP manifest DT and parse it into a TEE_UUID struct.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-
core: sp: add DT UUID helper function
Adds helper function to read a UUID from the SP manifest DT and parse it into a TEE_UUID struct.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
show more ...
|
| d0418bb0 | 09-Sep-2022 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: rpc: log error when allocation fails in non-secure world
The error messages printed when the non-secure world fails to allocate shared memory may be misleading misleading:
E/LD: init_elf:45
core: rpc: log error when allocation fails in non-secure world
The error messages printed when the non-secure world fails to allocate shared memory may be misleading misleading:
E/LD: init_elf:453 sys_open_ta_bin(cb3e5ba0-adf1-11e0-998b-0002a5d5c51b) E/TC:? 0 ldelf_init_with_ldelf:131 ldelf failed with res: 0xffff000c
This looks like an out-of-memory condition (0xffff000c = TEE_ERROR_OUT_OF_MEMORY) in the TEE core ("E/TC"), in other words insufficient core heap space. Add the following message to help pinpoint the issue:
E/TC:? 0 get_rpc_alloc_res:645 RPC allocation failed. Non-secure world result: ret=0xffff000c ret_origin=0x2
This situation can be reproduced by killing tee-supplicant and invoking a TA. When the CA is interrupted (Ctrl-C), the above log is printed.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b8cb4501 | 19-Sep-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add missing pauth key saving in foreign interrupt handler
When a foreign interrupt (non-secure) is trapped in OP-TEE the state of the current thread is saved similarly to when an RPC is perfor
core: add missing pauth key saving in foreign interrupt handler
When a foreign interrupt (non-secure) is trapped in OP-TEE the state of the current thread is saved similarly to when an RPC is performed.
With pointer authentication enabled two more registers which are part of the current context, APIAKEYHI-EL1 and APIAKEYLO-EL1, are added. These registers contains a key needed for pointer authentication. This key is unique per context so it must always be saved and restored when switching context.
Prior to this patch the step where this key is saved in the foreign interrupt handler was missing, so fix this by adding the missing step.
Fixes: 2b06f9dede33 ("Add basic pointer authentication support for TA's") Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ce27e87f | 29-Aug-2022 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
plat-versal: mmap regions
Increase the number of regions in preparation for the merge of additional drivers.
The value has been chosen using the other more stable platforms as a reference.
Signed-
plat-versal: mmap regions
Increase the number of regions in preparation for the merge of additional drivers.
The value has been chosen using the other more stable platforms as a reference.
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 2873ae13 | 10-Apr-2022 |
Jorge Ramirez-Ortiz <jorge@foundries.io> |
plat-versal: build tee-raw.bin image
This commit generates the tee-raw.bin image so the user can pass the boot address on the bif file.
The bif file could look like this
the_ROM_image: { image {
plat-versal: build tee-raw.bin image
This commit generates the tee-raw.bin image so the user can pass the boot address on the bif file.
The bif file could look like this
the_ROM_image: { image { { type=bootimage, file=vpl.pdi } { type=bootloader, file=plm.elf } { core=psm, file=psmfw.elf } }
image { id = 0x1c000000, name=apu_subsystem { type=raw, load=0x00001000, file=versal.dtb } { core=a72-0, exception_level=el-3, trustzone, file=bl31.elf } { core=a72-0, exception_level=el-2, file=u-boot.elf } { core=a72-0, exception_level=el-1, trustzone, load=0x60000000, startup=0x60000000, file=tee-raw.bin } } }
For additional information on how to build this platform, please refer to https://github.com/OP-TEE/build/versal.mk
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 4f12f558 | 22-Aug-2022 |
Etienne Carriere <etienne.carriere@linaro.org> |
plat-stm32mp1: reset platform with reset controller device
Change platform stm32mp1 PSCI_SYSTEM_RESET implementation to rely on reset controller framework to proceed a full platform reset insead of
plat-stm32mp1: reset platform with reset controller device
Change platform stm32mp1 PSCI_SYSTEM_RESET implementation to rely on reset controller framework to proceed a full platform reset insead of a platform specific sequence. This change makes MP13 variants to now support PSCI system reset feature.
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|