| 07befeff | 28-Feb-2024 |
Wen Bin <a1231512a@163.com> |
plat-hikey: make DRAM0_SIZE and DRAM0_SIZE_NSEC configurable
DRAM0_SIZE is now defined as CFG_TZDRAM_START, allowing for dynamic configuration.
DRAM0_SIZE_NSEC is modified to calculate the size rel
plat-hikey: make DRAM0_SIZE and DRAM0_SIZE_NSEC configurable
DRAM0_SIZE is now defined as CFG_TZDRAM_START, allowing for dynamic configuration.
DRAM0_SIZE_NSEC is modified to calculate the size relative to DRAM0_BASE.
Signed-off-by: Wen Bin <a1231512a@163.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9ed8348b | 25-May-2024 |
Charles Herz <herzc@umich.edu> |
core: plat-mediatek: fix enforcement of SWRNG configuration on MT7988
Small fix: $(call force,CFG_WITH_SOFTWARE_PRNG,Y) should be lowercase 'y' so that the conditional check in core/crypto/sub.mk in
core: plat-mediatek: fix enforcement of SWRNG configuration on MT7988
Small fix: $(call force,CFG_WITH_SOFTWARE_PRNG,Y) should be lowercase 'y' so that the conditional check in core/crypto/sub.mk includes the correct source file rng_fortuna.c instead of rng_hw.c, which is unimplemented for this platform and causes build failure.
Fixes: 58dbe3dff530 ("plat-mediatek: add support for MT7988 SoC") Signed-off-by: Charles Herz <herzc@umich.edu> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| ae9b4197 | 22-May-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
core: pager: fix arguments passed to calloc in alloc_merged_pgt_array()
An error was reported when compiling with GCC14 on this calloc:
core/arch/arm/mm/tee_pager.c: In function 'alloc_merged_pgt_a
core: pager: fix arguments passed to calloc in alloc_merged_pgt_array()
An error was reported when compiling with GCC14 on this calloc:
core/arch/arm/mm/tee_pager.c: In function 'alloc_merged_pgt_array': core/arch/arm/mm/tee_pager.c:934:35: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 934 | pgt_array = calloc(sizeof(struct pgt *), pgt_count); | ^~~~~~
Looking at the code, it seems that pgt_count and sizeof(struct pgt *) are inverted.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Fixes: 60e367146042 ("core: pager fix alloc_merged_pgt_array()") Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d4a87690 | 17-May-2024 |
Sungbae Yoo <sungbaey@nvidia.com> |
drivers: Add FFA_CONSOLE based console driver for log
This console driver uses FFA_CONSOLE ABI to write the trace logs.
If CFG_FFA_CONSOLE is enabled, OP-TEE will try to initialize the console driv
drivers: Add FFA_CONSOLE based console driver for log
This console driver uses FFA_CONSOLE ABI to write the trace logs.
If CFG_FFA_CONSOLE is enabled, OP-TEE will try to initialize the console driver that uses FFA interface to print trace logs.
Signed-off-by: Sungbae Yoo <sungbaey@nvidia.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 9b1d1cf0 | 07-May-2024 |
Balint Dobszay <balint.dobszay@arm.com> |
core: spmc: fix direct request handler
The FF-A direct request handling has an error: if the destination ID is the SPMC ID, the handler is trying to forward the message to an SP with this ID, which
core: spmc: fix direct request handler
The FF-A direct request handling has an error: if the destination ID is the SPMC ID, the handler is trying to forward the message to an SP with this ID, which is obviously non-existent so this gives an error.
Fixes: 19ad526cb139 ("core: spmc, sp: cleanup FF-A ID handling") Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
show more ...
|
| a359f7da | 07-May-2024 |
Abhishek Revadekar <abhishek.rvdkr@yahoo.com> |
core: arm: use fdt64_ld() to read possibly unaligned kaslr-seed
Read possibly unaligned kaslr-seed using `fdt64_ld()` to avoid ubsan panic while booting with `CFG_CORE_ASLR=y`
Acked-by: Jens Wiklan
core: arm: use fdt64_ld() to read possibly unaligned kaslr-seed
Read possibly unaligned kaslr-seed using `fdt64_ld()` to avoid ubsan panic while booting with `CFG_CORE_ASLR=y`
Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Abhishek Revadekar <abhishek.rvdkr@yahoo.com>
show more ...
|
| 2f41cd6f | 24-Apr-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: arm64: fix ce_aes_xts_{de,en}crypt()
In ce_aes_xts_encrypt() and ce_aes_xts_decrypt(), if the main interleave loop (.LxtsencNx or .LxtsdecNx) ends with all blocks completed the v7 register doe
core: arm64: fix ce_aes_xts_{de,en}crypt()
In ce_aes_xts_encrypt() and ce_aes_xts_decrypt(), if the main interleave loop (.LxtsencNx or .LxtsdecNx) ends with all blocks completed the v7 register doesn't hold the needed .Lxts_mul_x needed to compute the next tweak correctly. So fix this by loading .Lxts_mul_x in v7 before ending the loop.
Fixes: 06d2e4167a6b ("core: add accelerated AES routines") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 16fbd46d | 26-Oct-2022 |
Clément Léger <clement.leger@bootlin.com> |
plat-sam: remove CFG_PL310_LOCKED
When locking the PL310 cache, it behaves as disable which lead to poor performances in Linux.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Signed-off-b
plat-sam: remove CFG_PL310_LOCKED
When locking the PL310 cache, it behaves as disable which lead to poor performances in Linux.
Signed-off-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 016fa4f4 | 27-Mar-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
dts: stm32: add IPCC1/2 nodes in stm32mp251.dtsi
Add Inter-Processor Communication Controller 1/2(IPCC) nodes and default disable them.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.c
dts: stm32: add IPCC1/2 nodes in stm32mp251.dtsi
Add Inter-Processor Communication Controller 1/2(IPCC) nodes and default disable them.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 6bab4718 | 27-Mar-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
plat-stm32mp2: conf: support IPCC driver
Default enable IPCC driver for platform stm32mp2.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carri
plat-stm32mp2: conf: support IPCC driver
Default enable IPCC driver for platform stm32mp2.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| a8ee9c16 | 27-Mar-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
dts: stm32: add HSEM node in stm32mp251.dtsi
Add the Hardware SEMaphore(HSEM) node and default disable it.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carrier
dts: stm32: add HSEM node in stm32mp251.dtsi
Add the Hardware SEMaphore(HSEM) node and default disable it.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 97cbe3e2 | 27-Mar-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
plat-stm32mp2: conf: support HSEM driver
Default enable HSEM driver for platform stm32mp2.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carri
plat-stm32mp2: conf: support HSEM driver
Default enable HSEM driver for platform stm32mp2.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 5d39f3dc | 27-Mar-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
dts: stm32: add HPDMA1/2/3 nodes in stm32mp251.dtsi
Add HPDMA1/2/3 nodes and default disable them.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etien
dts: stm32: add HPDMA1/2/3 nodes in stm32mp251.dtsi
Add HPDMA1/2/3 nodes and default disable them.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| a877ebca | 27-Mar-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
plat-stm32mp2: conf: support HPDMA driver
Default enable HPDMA driver for platform stm32mp2.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.car
plat-stm32mp2: conf: support HPDMA driver
Default enable HPDMA driver for platform stm32mp2.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| ac779c01 | 27-Mar-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
dts: stm32: add FMC node in stm32mp251.dtsi
Add the Flexible Memory Controller(FMC) node and default disable it.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne C
dts: stm32: add FMC node in stm32mp251.dtsi
Add the Flexible Memory Controller(FMC) node and default disable it.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| db0e1c91 | 27-Mar-2024 |
Gatien Chevallier <gatien.chevallier@foss.st.com> |
plat-stm32mp2: conf: support FMC driver
Default enable FMC driver for platform stm32mp2.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carrier
plat-stm32mp2: conf: support FMC driver
Default enable FMC driver for platform stm32mp2.
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 835688ac | 11-Apr-2024 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: make sure tee_entry_get_os_revision() uses a proper TEE_IMPL_GIT_SHA1
tee_entry_get_os_revision() stores TEE_IMPL_GIT_SHA1 into a 32 or 64-bit register, depending on the platform. Unfortunatel
core: make sure tee_entry_get_os_revision() uses a proper TEE_IMPL_GIT_SHA1
tee_entry_get_os_revision() stores TEE_IMPL_GIT_SHA1 into a 32 or 64-bit register, depending on the platform. Unfortunately the command that creates TEE_IMPL_GIT_SHA1 does not provide any guarantee that the value will fit. For instance it can happen that 8 characters are not enough to disambiguate two commits in the repository, in which case git rev-parse --short=8 will happily return 9 or more characters. In this case a 32-bit build would display a warning and TEE_IMPL_GIT_SHA1 would be truncated in a way we don't want (discarding the most significant bits).
Therefore, make sure TEE_IMPL_GIT_SHA1 is exactly 8 or 16 hexadecimal characters (plus the leading 0x).
The OPTEE_FFA_GET_OS_VERSION operation in handle_blocking_call() has to be modified since the output is a 32-bit register, and SPMC being a 64-bit TEE core, TEE_IMPL_GIT_SHA1 is a 64-bit value too.
CI needs updating to avoid the following error:
fatal: detected dubious ownership in repository at '/__w/optee_os/optee_os'
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reported-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Closes: https://github.com/OP-TEE/optee_os/issues/6783 Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Gatien Chevallier <gatien.chevallier@foss.st.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| fc57019c | 12-Sep-2023 |
Tony Han <tony.han@microchip.com> |
plat-sam: add support for Microchip sama7g54-ek board
Add the main functions for sama7g54 initialize, including: - console_init() - Matrix, TZC, TZPM, interrupt related Update conf.mk and Makefile
plat-sam: add support for Microchip sama7g54-ek board
Add the main functions for sama7g54 initialize, including: - console_init() - Matrix, TZC, TZPM, interrupt related Update conf.mk and Makefile for sama7g5 OP-TEE support.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| d10f2b25 | 20-Mar-2024 |
Tony Han <tony.han@microchip.com> |
plat-sam: rename filename for sama5d2 functions to 'platform_sama5d2.c'
Rename 'main.c' to 'platform_sama5d2.c' in 'core/arch/arm/plat-sam'. Update the makefile accordingly.
Signed-off-by: Tony Han
plat-sam: rename filename for sama5d2 functions to 'platform_sama5d2.c'
Rename 'main.c' to 'platform_sama5d2.c' in 'core/arch/arm/plat-sam'. Update the makefile accordingly.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| a557f877 | 20-Mar-2024 |
Tony Han <tony.han@microchip.com> |
plat-sam: optimize the macro and makefile for building sama5d2 clocks
Rename 'CFG_DRIVERS_SAMA5D2_CLK' to 'CFG_SAMA5D2'. Adjust the sequence of source files in 'core/drivers/clk/sam/sub.mk'.
Signed
plat-sam: optimize the macro and makefile for building sama5d2 clocks
Rename 'CFG_DRIVERS_SAMA5D2_CLK' to 'CFG_SAMA5D2'. Adjust the sequence of source files in 'core/drivers/clk/sam/sub.mk'.
Signed-off-by: Tony Han <tony.han@microchip.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| 46fdfeea | 26-Mar-2024 |
Jerome Forissier <jerome.forissier@linaro.org> |
vexpress-qemu_armv8a: increase CFG_CORE_HEAP_SIZE to 131072
Set the default core heap size for QEMUv8 to 128K because 64K is not enough to complete the "make check" test with CFG_RPMB_FS=y CFG_RPMB_
vexpress-qemu_armv8a: increase CFG_CORE_HEAP_SIZE to 131072
Set the default core heap size for QEMUv8 to 128K because 64K is not enough to complete the "make check" test with CFG_RPMB_FS=y CFG_RPMB_WRITE_KEY=y.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 19ad526c | 13-Mar-2024 |
Balint Dobszay <balint.dobszay@arm.com> |
core: spmc, sp: cleanup FF-A ID handling
When OP-TEE implements the S-EL1 SPMC, from an FF-A point-of-view the core OP-TEE functionality is running in a logical SP that resides at the same exception
core: spmc, sp: cleanup FF-A ID handling
When OP-TEE implements the S-EL1 SPMC, from an FF-A point-of-view the core OP-TEE functionality is running in a logical SP that resides at the same exception level as the SPMC. This means that the SPMC and the SP should have separate FF-A IDs, i.e. the SPMC ID and a normal endpoint ID for the SP. The SPMC ID is described in the SPMC manifest which gets parsed by the SPMD, so this ID should be queried from the SPMD. OP-TEE's endpoint ID is assigned by the SPMC.
Currently OP-TEE's FF-A endpoint ID and the SPMC ID are mixed together and hardcoded, this patch implements the correct ID handling mechanism as described above.
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
show more ...
|
| 23f867d3 | 19-Mar-2024 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: arm64: increase STACK_ABT_SIZE from 1024 to 3072 when log level is 0
When adding "make check CFG_WITH_PAGER=y CFG_TEE_CORE_LOG_LEVEL=0" to the QEMUv8 CI job, I noticed that OP-TEE fails to boo
core: arm64: increase STACK_ABT_SIZE from 1024 to 3072 when log level is 0
When adding "make check CFG_WITH_PAGER=y CFG_TEE_CORE_LOG_LEVEL=0" to the QEMUv8 CI job, I noticed that OP-TEE fails to boot and hangs with no message printed on the console. The root cause is memory corruption of the translation tables triggered by a stack overflow. Indeed, the pager uses the abort stack to handle unmapped pages, and therefore it requires quite a bit of stack space. The log level is not very relevant. Therefore, fix the issue by removing the particular case for log level 0.
More debugging info:
build$ make -j$(nproc) CFG_WITH_PAGER=y CFG_TEE_CORE_LOG_LEVEL=0 \ CFG_CORE_ASLR=n build$ aarch64-linux-gnu-nm -n ../optee_os/out/arm/core/tee.elf ... 000000000e115000 B __nozi_start 000000000e115000 b thread_user_kdata_page 000000000e116000 b xlat_tables_ul1 000000000e118000 b xlat_tables 000000000e11d000 b base_xlation_table 000000000e11d100 B __nozi_end 000000000e11d100 B __nozi_stack_start 000000000e11d100 b stack_abt 000000000e11e200 B stack_tmp ... build$ make run-only optee_qemuv8$ gdb-multiarch (gdb) symbol-file optee_os/out/arm/core/tee.elf (gdb) target remote localhost:1234 (gdb) p sizeof(base_xlation_table) $1 = 256 (gdb) watch *(char [256]*)base_xlation_table (gdb) c # 5 times Thread 1 hit Hardware watchpoint 1: *(char [256]*)base_xlation_table (gdb) bt
At this point the call stack is:
hash_sha256_check() fobj_load_page() pager_deploy_page() pager_get_page() tee_pager_handle_fault() abort_handler() el1_sync_abort()
This code is indeed not supposed to touch base_xlation_table, it does so due to the overflow of stack_abt.
Suggested-by: Jens Wikander <jens.wiklander@linaro.org> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 1cf7e98d | 14-Mar-2024 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: replace REGISTER_TIME_SOURCE()
Remove REGISTER_TIME_SOURCE() and implement tee_time_get_sys_time() and tee_time_get_sys_time_protection_level() directly in the file where REGISTER_TIME_SOURCE(
core: replace REGISTER_TIME_SOURCE()
Remove REGISTER_TIME_SOURCE() and implement tee_time_get_sys_time() and tee_time_get_sys_time_protection_level() directly in the file where REGISTER_TIME_SOURCE() was used previously.
By avoiding indirect calls the linker can optimize the dependency tree properly and we can remove the DECLARE_KEEP_PAGER() directive needed for arm_cntpct_time_source.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| b2f99d20 | 01-Feb-2024 |
Olivier Deprez <olivier.deprez@arm.com> |
core: boot: fix memtag init sequence
Based on following observations on FVP: With boot_init_memtag called before MMU enable, DC GZA hits an alignment fault. This is because all accesses are of devic
core: boot: fix memtag init sequence
Based on following observations on FVP: With boot_init_memtag called before MMU enable, DC GZA hits an alignment fault. This is because all accesses are of device type when MMU is off. Arm ARM states for DC GZA: "If the memory region being modified is any type of Device memory, this instruction can give an alignment fault." Moving boot_init_memtag after MMU enable, DC GZA hits a permission fault, this is because the range returned by core_mmu_get_secure_memory consists of pages mapped RO (text sections) and then RW (data sections) consecutively. DC GZA is a write instruction executed towards an RO page leading to a fault.
To fix this, split boot_init_memtag into two halves: - Setup memtag operations before MMU is enabled such that MAIR_EL1 is properly configured for normal tagged memory. - Clear core TEE RW sections after MMU is enabled.
Closes: https://github.com/OP-TEE/optee_os/issues/6649 Signed-off-by: Olivier Deprez <olivier.deprez@arm.com> [jw rewrote boot_clear_memtag()] Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|