| 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 ...
|
| 4c4387dc | 26-Feb-2024 |
Alvin Chang <alvinga@andestech.com> |
core: riscv: Prepare SATP for each hart
To support multiple harts environment, we have allocated root page table for each hart. Further more, we need to prepare value of CSR SATP, which holds the ph
core: riscv: Prepare SATP for each hart
To support multiple harts environment, we have allocated root page table for each hart. Further more, we need to prepare value of CSR SATP, which holds the physical page number (PPN) of the root page table, for each hart.
This commit enlarges the "struct core_mmu_config" for RISC-V architecture to hold the value of CSR SATP for all the harts. In early boot stage, each hart should initialize its CSR SATP from "struct core_mmu_config".
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| fe9a2682 | 26-Feb-2024 |
Alvin Chang <alvinga@andestech.com> |
core: riscv: Allocate root page table for each hart
To support multiple hart environment, each hart must have its dedicated root page table. This commit enlarges the root page table. Also, when the
core: riscv: Allocate root page table for each hart
To support multiple hart environment, each hart must have its dedicated root page table. This commit enlarges the root page table. Also, when the primary hart initializes the page table, we also copy the contents of its root page table to the secondary harts' root page tables. Therefore, all the harts have initial page tables at the boot time.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Yu Chien Peter Lin <peterlin@andestech.com> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Etienne Carriere <etienne.carriere@foss.st.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 ...
|
| 63bfec5e | 02-Mar-2024 |
Alvin Chang <alvinga@andestech.com> |
core: riscv: Apply SM-based boot flow for secondary harts
When the system adopts M-mode secure monitor based solution, the secondary harts need to hand over the control back to the secure monitor af
core: riscv: Apply SM-based boot flow for secondary harts
When the system adopts M-mode secure monitor based solution, the secondary harts need to hand over the control back to the secure monitor after the initial boot sequence. Add related code for this purpose.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
show more ...
|
| 058cf712 | 10-Nov-2023 |
Alvin Chang <alvinga@andestech.com> |
core: riscv: Do not restrict primary hart to hart ID 0 only
The ID of primary hart should not be restricted to zero. Thus, determining primary hart and secondart harts by zero hart ID is not feasibl
core: riscv: Do not restrict primary hart to hart ID 0 only
The ID of primary hart should not be restricted to zero. Thus, determining primary hart and secondart harts by zero hart ID is not feasible.
We refer to RISC-V linux kernel [1] to fix this issue, by adding a "hart_lottery" variable. The first hart who enters OP-TEE will win the lottery, atomically increment this variable, and be the primary hart. Other harts enter OP-TEE later won't win the lottery, so they execute the secondary boot sequence.
[1]: https://github.com/torvalds/linux/blob/v6.7/arch/riscv/kernel/head.S#L244
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
show more ...
|
| 1706a284 | 23-Jan-2024 |
Alvin Chang <alvinga@andestech.com> |
core: riscv: Change the condition of communication with untrusted domain
Use CFG_RISCV_WITH_M_MODE_SM to determine if OP-TEE uses M-mode secure monitor based solution to communicate with the untruse
core: riscv: Change the condition of communication with untrusted domain
Use CFG_RISCV_WITH_M_MODE_SM to determine if OP-TEE uses M-mode secure monitor based solution to communicate with the untrusetd domain.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
show more ...
|
| 83abc784 | 23-Jan-2024 |
Alvin Chang <alvinga@andestech.com> |
riscv: plat-virt: Set CFG_RISCV_WITH_M_MODE_SM as 'y'
In RISC-V QEMU virtual platform, OP-TEE OS uses M-mode secure monitor based solution to communicate with the untrusted domain. Therefore, set CF
riscv: plat-virt: Set CFG_RISCV_WITH_M_MODE_SM as 'y'
In RISC-V QEMU virtual platform, OP-TEE OS uses M-mode secure monitor based solution to communicate with the untrusted domain. Therefore, set CFG_RISCV_WITH_M_MODE_SM to 'y' in its configuration file.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
show more ...
|
| a30b4486 | 23-Jan-2024 |
Alvin Chang <alvinga@andestech.com> |
core: riscv: Add CFG_RISCV_WITH_M_MODE_SM and dependency checking
OP-TEE may communicate with the untrusted domain by different solutions, such as M-mode secure monitor based solution, or direct mes
core: riscv: Add CFG_RISCV_WITH_M_MODE_SM and dependency checking
OP-TEE may communicate with the untrusted domain by different solutions, such as M-mode secure monitor based solution, or direct messaging based solution. This commit adds CFG_RISCV_WITH_M_MODE_SM to indicate that OP-TEE uses M-mode secure monitor based solution for the communication.
The CFG_RISCV_WITH_M_MODE_SM should depend on CFG_RISCV_S_MODE and CFG_RISCV_SBI, since we are using "ecall" to trap into M-mode secure monitor.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
show more ...
|
| ea11f512 | 23-Oct-2023 |
Alvin Chang <alvinga@andestech.com> |
core: riscv: Apply mask/unmask exceptions when operating page table
Add missing thread_{mask/unmask}_exceptions() when we operate the page table. This is referenced from ARM architecture.
Signed-of
core: riscv: Apply mask/unmask exceptions when operating page table
Add missing thread_{mask/unmask}_exceptions() when we operate the page table. This is referenced from ARM architecture.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Tested-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
show more ...
|
| d1d1ca23 | 23-Oct-2023 |
Alvin Chang <alvinga@andestech.com> |
core: riscv: Apply STATUS helper for RPC resume
Since RPC resume is a kind of exception return, we invoke xstatus_for_xret() to prepare the CSR STATUS for exception return. But the actual value of S
core: riscv: Apply STATUS helper for RPC resume
Since RPC resume is a kind of exception return, we invoke xstatus_for_xret() to prepare the CSR STATUS for exception return. But the actual value of STATUS when calling thread_rpc() is still saved in stack. This is to unify the behavior between RPC suspend and resume.
Signed-off-by: Alvin Chang <alvinga@andestech.com> Tested-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
show more ...
|