Hi Ken,
Thank you by taking care about it.
Guess, the issue may be caused by the way we are using TFM. We have to compile TFM Secure in one project (instead of separate libraries). Guess, it may cause that some parts of data/code may be placed to unwanted memory sections.
I will try to analyze the generated map file.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
All Stories
Jan 24 2020
Jan 23 2020
Jan 22 2020
In preparation, the Mbed Crypto config file is updated to the latest version which contains the proper flags needed to enable persistent keys: https://review.trustedfirmware.org/c/trusted-firmware-m/+/3176/
Hi Ken,
yes, we are using UART in core to print some info like protection status and boot progress.
For the hw initialization, SystemInit called from startup code is not sufficient enough as it cannot pass status and data to the rest of the platform code written in C. This was the main reason for adding post init function.
Jan 21 2020
Jan 19 2020
Hi Andrei,
Jan 17 2020
Changes for this issue had been merged.
Jan 16 2020
Jan 15 2020
Hi @RobertRostohar ,
All issues are closed. The crypto header issue should follow up in mbedcrypto changes, not in TF-M as we have aligned.
So I'm going to close this root issue.
Please let me know if you have any question.
Had the workshop and aligned the solution for this issue.
The changes are made and verified locally for CMSIS Pack.
Next step is to upstream the solution to mbedCrypto.
As it's not TF-M issue anymore, so close this issue.
Jan 14 2020
Nerver mind :) Glad if it works now. Cheers, Olivier.
Closing the issue as the RSA Key size support has now been merged.
The TF-A now has support for RSA-3K in Cryptocell variant.
https://review.trustedfirmware.org/#/c/TF-A/trusted-firmware-a/+/2263/
I am sorry guys.
I need to apologize to all who have helped me with this issue.
Cryptocell key sizes are different. You have different key sizes and i have different, Here we need to move on because all these are different and if you just not share it with a perfect essayhave project then move and start to find something else.
Jan 13 2020
The log seems to show additional options versus the regular TF-A build:
-march=armv8-a -O2 -pipe -fstack-protector-strong -fno-plt
already covered by Kevin
Remove log.sh/log.bat from code base:
Change for this issue had been merged
Jan 10 2020
Okay, here's the log.
Patch is uploaded to https://review.trustedfirmware.org/c/trusted-firmware-m/+/3107.
The root cause is:
- When building SPRTL, arch type is fetched from GNUARM cmake file since SPRTL CMake file is included with add_subdirectory() instead of include().
- The CM0+ arch type should be "armv6s-m". However, it is set to "armv6-m" in GNUARM cmake file, which stands for CM0. CM0 doesn't support SVC. Thus the build failed.
- Previously, the psa_client.c and` psa_service.c` were not in SPRTL folder. When building the both files, cpu type is fetched which is correct.
Patch had been merged.
All patches had been merged to the master branch.
Initialize UART after programming the PPC/SAU: https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/3040/
Fix the access to service signal: https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/3097/
Jan 9 2020
I installed manjaro-arm on an rpi3 and cloned TF-A commit 0348ee49135c
Jan 8 2020
Unfortunately the option won't show on asm files, but only on C files.
There are some patches for conditional build for secure context management APIs:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/3059
https://review.trustedfirmware.org/c/trusted-firmware-m/+/3060
Jan 7 2020
Change for this issue had been merged as a hotfix
Change for this issue: https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/3051/
Does not seem like it does.
PS: We patched it to work with clang as a test as well.
clang -c -x assembler-with-cpp -target aarch64-elf -march=armv8-a -mgeneral-regs-only -mstrict-align -DDEBUG=0 -DENABLE_BACKTRACE=0 -DCOREBOOT=0 -DPLAT_EXTRA_LD_SCRIPT -DPLAT_SKIP_OPTEE_S_EL1_INT_REGISTER -DSKIP_A57_L1_FLUSH_PWR_DWN=0 -DA53_DISABLE_NON_TEMPORAL_HINT=1 -DA57_DISABLE_NON_TEMPORAL_HINT=1 -DWORKAROUND_CVE_2017_5715=0 -DWORKAROUND_CVE_2018_3639=1 -DDYNAMIC_WORKAROUND_CVE_2018_3639=0 -DERRATA_A9_794073=0 -DERRATA_A15_816470=0 -DERRATA_A15_827671=0 -DERRATA_A17_852421=0 -DERRATA_A17_852423=0 -DERRATA_A35_855472=0 -DERRATA_A53_819472=0 -DERRATA_A53_824069=0 -DERRATA_A53_826319=0 -DERRATA_A53_827319=0 -DERRATA_A53_835769=0 -DERRATA_A53_836870=0 -DERRATA_A53_843419=0 -DERRATA_A53_855873=0 -DERRATA_A55_768277=0 -DERRATA_A55_778703=0 -DERRATA_A55_798797=0 -DERRATA_A55_846532=0 -DERRATA_A55_903758=0 -DERRATA_A55_1221012=0 -DERRATA_A57_806969=0 -DERRATA_A57_813419=0 -DERRATA_A57_813420=0 -DERRATA_A57_814670=0 -DERRATA_A57_817169=0 -DERRATA_A57_826974=0 -DERRATA_A57_826977=0 -DERRATA_A57_828024=0 -DERRATA_A57_829520=0 -DERRATA_A57_833471=0 -DERRATA_A57_859972=0 -DERRATA_A72_859971=0 -DERRATA_A73_852427=0 -DERRATA_A73_855423=0 -DERRATA_A75_764081=0 -DERRATA_A75_790748=0 -DERRATA_A76_1073348=0 -DERRATA_A76_1130799=0 -DERRATA_A76_1220197=0 -DERRATA_A76_1257314=0 -DERRATA_A76_1262606=0 -DERRATA_A76_1262888=0 -DERRATA_A76_1275112=0 -DERRATA_A76_1286807=0 -DERRATA_HERCULES_1688305=0 -DERRATA_N1_1043202=1 -DERRATA_N1_1073348=0 -DERRATA_N1_1130799=0 -DERRATA_N1_1165347=0 -DERRATA_N1_1207823=0 -DERRATA_N1_1220197=0 -DERRATA_N1_1257314=0 -DERRATA_N1_1262606=0 -DERRATA_N1_1262888=0 -DERRATA_N1_1275112=0 -DERRATA_N1_1315703=1 -DERRATA_N1_1542419=0 -DERRATA_DSU_798953=0 -DERRATA_DSU_936184=0 -DSTACK_PROTECTOR_ENABLED=0 -DCRASH_REPORTING=0 -DEL3_EXCEPTION_HANDLING=0 -DSDEI_SUPPORT=0 -DARM_ARCH_MAJOR=8 -DARM_ARCH_MINOR=0 -DCOLD_BOOT_SINGLE_CPU=0 -DCTX_INCLUDE_AARCH32_REGS=1 -DCTX_INCLUDE_FPREGS=0 -DCTX_INCLUDE_PAUTH_REGS=0 -DEL3_EXCEPTION_HANDLING=0 -DCTX_INCLUDE_MTE_REGS=0 -DENABLE_AMU=0 -DENABLE_ASSERTIONS=0 -DENABLE_BTI=0 -DENABLE_MPAM_FOR_LOWER_ELS=0 -DENABLE_PAUTH=0 -DENABLE_PIE=0 -DENABLE_PMF=0 -DENABLE_PSCI_STAT=0 -DENABLE_RUNTIME_INSTRUMENTATION=0 -DENABLE_SPE_FOR_LOWER_ELS=1 -DENABLE_SVE_FOR_NS=0 -DERROR_DEPRECATED=0 -DFAULT_INJECTION_SUPPORT=0 -DGICV2_G0_FOR_EL3=0 -DHANDLE_EA_EL3_FIRST=0 -DHW_ASSISTED_COHERENCY=0 -DLOG_LEVEL=20 -DNS_TIMER_SWITCH=0 -DPL011_GENERIC_UART=0 -DPLAT_rk3328 -DPROGRAMMABLE_RESET_ADDRESS=0 -DPSCI_EXTENDED_STATE_ID=0 -DRAS_EXTENSION=0 -DRESET_TO_BL31=0 -DSEPARATE_CODE_AND_RODATA=0 -DRECLAIM_INIT_CODE=0 -DSPD_none -DSPIN_ON_BL1_EXIT=0 -DSPM_MM=0 -DTRUSTED_BOARD_BOOT=0 -DUSE_COHERENT_MEM=1 -DUSE_DEBUGFS=0 -DUSE_ROMLIB=0 -DUSE_TBBR_DEFS=1 -DWARMBOOT_ENABLE_DCACHE_EARLY=0 -DBL2_AT_EL3=0 -DBL2_IN_XIP_MEM=0 -DBL2_INV_DCACHE=1 -DUSE_SPINLOCK_CAS=0 -DAARCH64 -Iinclude -Iinclude/arch/aarch64 -Iinclude/lib/cpus/aarch64 -Iinclude/lib/el3_runtime/aarch64 -Idrivers/arm/gic/common/ -Idrivers/arm/gic/v2/ -Iplat/rockchip/common/ -Iplat/rockchip/common/include/ -Iplat/rockchip/common/aarch64/ -Iplat/rockchip/common/drivers/pmu/ -Iplat/rockchip/common/drivers/parameter/ -Iplat/rockchip/rk3328/ -Iplat/rockchip/rk3328/drivers/pmu/ -Iplat/rockchip/rk3328/drivers/soc/ -Iplat/rockchip/rk3328/include/ -Iinclude/lib/libfdt -Iinclude/lib/libc -Iinclude/lib/libc/aarch64 -nostdinc -Wall -Wmissing-include-dirs -Wunused -Wdisabled-optimization -Wvla -Wshadow -Wno-unused-parameter -Wshift-overflow -Wshift-sign-overflow -Wlogical-op-parentheses -Wno-error=deprecated-declarations -march=armv8-a -ffreestanding -Wa,--fatal-warnings -D__ASSEMBLY__ -Wp,-MD,./build/rk3328/release/libc/setjmp.d -MT build/rk3328/release/libc/setjmp.o -MP -c lib/libc/aarch64/setjmp.S -o build/rk3328/release/libc/setjmp.o ar cr build/rk3328/release/lib/libfdt.a build/rk3328/release/libfdt/fdt.o build/rk3328/release/libfdt/fdt_addresses.o build/rk3328/release/libfdt/fdt_empty_tree.o build/rk3328/release/libfdt/fdt_ro.o build/rk3328/release/libfdt/fdt_rw.o build/rk3328/release/libfdt/fdt_strerror.o build/rk3328/release/libfdt/fdt_sw.o build/rk3328/release/libfdt/fdt_wip.o ar cr build/rk3328/release/lib/libc.a build/rk3328/release/libc/abort.o build/rk3328/release/libc/assert.o build/rk3328/release/libc/exit.o build/rk3328/release/libc/memchr.o build/rk3328/release/libc/memcmp.o build/rk3328/release/libc/memcpy.o build/rk3328/release/libc/memmove.o build/rk3328/release/libc/memrchr.o build/rk3328/release/libc/memset.o build/rk3328/release/libc/printf.o build/rk3328/release/libc/putchar.o build/rk3328/release/libc/puts.o build/rk3328/release/libc/snprintf.o build/rk3328/release/libc/strchr.o build/rk3328/release/libc/strcmp.o build/rk3328/release/libc/strlcpy.o build/rk3328/release/libc/strlen.o build/rk3328/release/libc/strncmp.o build/rk3328/release/libc/strnlen.o build/rk3328/release/libc/strrchr.o build/rk3328/release/libc/setjmp.o ld.bfd -o build/rk3328/release/bl31/bl31.elf --fatal-warnings -O1 --gc-sections -Map=./build/rk3328/release/bl31/bl31.map --script ./build/rk3328/release/bl31/bl31.ld ./build/rk3328/release/bl31/build_message.o ./build/rk3328/release/bl31/gic_common.o ./build/rk3328/release/bl31/gicv2_main.o ./build/rk3328/release/bl31/gicv2_helpers.o ./build/rk3328/release/bl31/plat_gicv2.o ./build/rk3328/release/bl31/rockchip_gicv2.o ./build/rk3328/release/bl31/cci.o ./build/rk3328/release/bl31/delay_timer.o ./build/rk3328/release/bl31/generic_delay_timer.o ./build/rk3328/release/bl31/params_setup.o ./build/rk3328/release/bl31/bl31_plat_setup.o ./build/rk3328/release/bl31/plat_pm.o ./build/rk3328/release/bl31/plat_topology.o ./build/rk3328/release/bl31/platform_common.o ./build/rk3328/release/bl31/pmu.o ./build/rk3328/release/bl31/soc.o ./build/rk3328/release/bl31/bl31_main.o ./build/rk3328/release/bl31/interrupt_mgmt.o ./build/rk3328/release/bl31/bl31_context_mgmt.o ./build/rk3328/release/bl31/runtime_svc.o ./build/rk3328/release/bl31/arm_arch_svc_setup.o ./build/rk3328/release/bl31/std_svc_setup.o ./build/rk3328/release/bl31/cpu_data_array.o ./build/rk3328/release/bl31/context_mgmt.o ./build/rk3328/release/bl31/errata_report.o ./build/rk3328/release/bl31/psci_off.o ./build/rk3328/release/bl31/psci_on.o ./build/rk3328/release/bl31/psci_suspend.o ./build/rk3328/release/bl31/psci_common.o ./build/rk3328/release/bl31/psci_main.o ./build/rk3328/release/bl31/psci_setup.o ./build/rk3328/release/bl31/psci_system_off.o ./build/rk3328/release/bl31/psci_mem_protect.o ./build/rk3328/release/bl31/bakery_lock_coherent.o ./build/rk3328/release/bl31/spe.o ./build/rk3328/release/bl31/bl_common.o ./build/rk3328/release/bl31/tf_log.o ./build/rk3328/release/bl31/multi_console.o ./build/rk3328/release/bl31/plat_bl_common.o ./build/rk3328/release/bl31/plat_log_common.o ./build/rk3328/release/bl31/plat_common.o ./build/rk3328/release/bl31/desc_image_load.o ./build/rk3328/release/bl31/bl_aux_params.o ./build/rk3328/release/bl31/xlat_tables.o ./build/rk3328/release/bl31/xlat_tables_common.o ./build/rk3328/release/bl31/plat_psci_common.o ./build/rk3328/release/bl31/16550_console.o ./build/rk3328/release/bl31/aem_generic.o ./build/rk3328/release/bl31/cortex_a53.o ./build/rk3328/release/bl31/plat_helpers.o ./build/rk3328/release/bl31/pmu_sram_cpus_on.o ./build/rk3328/release/bl31/bl31_entrypoint.o ./build/rk3328/release/bl31/crash_reporting.o ./build/rk3328/release/bl31/ea_delegate.o ./build/rk3328/release/bl31/runtime_exceptions.o ./build/rk3328/release/bl31/dsu_helpers.o ./build/rk3328/release/bl31/platform_mp_stack.o ./build/rk3328/release/bl31/cpu_data.o ./build/rk3328/release/bl31/cpu_helpers.o ./build/rk3328/release/bl31/spinlock.o ./build/rk3328/release/bl31/psci_helpers.o ./build/rk3328/release/bl31/context.o ./build/rk3328/release/bl31/debug.o ./build/rk3328/release/bl31/cache_helpers.o ./build/rk3328/release/bl31/misc_helpers.o ./build/rk3328/release/bl31/platform_helpers.o ./build/rk3328/release/bl31/crash_console_helpers.o -L./build/rk3328/release/lib -lfdt -lc /usr/sbin/ld.bfd: ./build/rk3328/release/bl31/params_setup.o: in function `params_early_setup': params_setup.c:(.text.params_early_setup+0x4): undefined reference to `__stack_chk_guard' /usr/sbin/ld.bfd: params_setup.c:(.text.params_early_setup+0x8): undefined reference to `__stack_chk_guard' /usr/sbin/ld.bfd: params_setup.c:(.text.params_early_setup+0x100): undefined reference to `__stack_chk_guard' /usr/sbin/ld.bfd: params_setup.c:(.text.params_early_setup+0x108): undefined reference to `__stack_chk_guard' /usr/sbin/ld.bfd: params_setup.c:(.text.params_early_setup+0x138): undefined reference to `__stack_chk_guard' /usr/sbin/ld.bfd: ./build/rk3328/release/bl31/params_setup.o:params_setup.c:(.text.params_early_setup+0x140): more undefined references to `__stack_chk_guard' follow /usr/sbin/ld.bfd: ./build/rk3328/release/bl31/params_setup.o: in function `params_early_setup': params_setup.c:(.text.params_early_setup+0x15c): undefined reference to `__stack_chk_fail' /usr/sbin/ld.bfd: ./build/rk3328/release/bl31/psci_off.o: in function `psci_do_cpu_off': psci_off.c:(.text.psci_do_cpu_off+0x4): undefined reference to `__stack_chk_guard' /usr/sbin/ld.bfd: psci_off.c:(.text.psci_do_cpu_off+0x8): undefined reference to `__stack_chk_guard' /usr/sbin/ld.bfd: psci_off.c:(.text.psci_do_cpu_off+0x80): undefined reference to `__stack_chk_guard' /usr/sbin/ld.bfd: psci_off.c:(.text.psci_do_cpu_off+0x88): undefined reference to `__stack_chk_guard' /usr/sbin/ld.bfd: psci_off.c:(.text.psci_do_cpu_off+0xa8): undefined reference to `__stack_chk_fail' /usr/sbin/ld.bfd: ./build/rk3328/release/bl31/psci_suspend.o: in function `psci_cpu_suspend_start': psci_suspend.c:(.text.psci_cpu_suspend_start+0x4): undefined reference to `__stack_chk_guard'
HI Rickdic,
Could you please send this query to the TF-A mailing list ?
Yes, looks like we can keep TZ context management as option to disable for RTOSes integrating TFM. There are RTOS vendors who have exprressed supporting multiple secure contexts in TF-M as a requirement.
patches link:
https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/3047/
https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/3048/
https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/3049/
https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/3050/
https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/3113/
https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/3153/
I tried on an arm64 machine (using gcc8.3) but did not reproduce the issue.
Jan 6 2020
Thanks guys.
I suspect this problem arises because of building natively (although I agree this should normally work).
Hi,
I was able to compile TF-A for rk3328 platform using the same command and specifying the CROSS_COMPILE as aarch64-linux-gnu-
I use the publicly available toolchain https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads .In this case, I specifically used the 8.3 x86_64 Linux hosted cross compiler in my Ubuntu 18.04 (Virtual Box image ).
If I am not wrong, you dont have to use a cross compiler. However, I dont have access to a native Arm machine to test your build command. What compiler did you use?
Patch link:
I know this task is closed, but I just ran into this issue with the 0348ee49135c07441d249bce556eba0c8ddd6be2 commit.
Jan 4 2020
The problem is solved.