ARM-software / tf-issues

Issue tracking for the ARM Trusted Firmware project
37 stars 16 forks source link

TF-A 2.6 fails to build with GCC12: `error: array subscript 0 is outside array bounds of 'uintptr_t[0]' {aka 'long unsigned int[]'} [-Werror=array-bounds]` #712

Closed ggardet closed 2 years ago

ggardet commented 2 years ago

TF-A 2.6 fails to build with GCC12 on some boards with error: array subscript 0 is outside array bounds of 'uintptr_t[0]' {aka 'long unsigned int[]'} [-Werror=array-bounds] and error: array subscript 0 is outside array bounds of 'volatile uint64_t[0]' {aka 'volatile long unsigned int[]'} [-Werror=array-bounds]

Log for RPi4 target:

[   17s] gcc  -g -DDEBUG=1 -DENABLE_BACKTRACE=1 -DXLAT_TABLES_LIB_V2=1 -DGIC_EXT_INTID=0 -DPLAT_EXTRA_LD_SCRIPT -DRPI3_BL33_IN_AARCH32=0 -DRPI3_DIRECT_LINUX_BOOT=1 -DRPI3_RUNTIME_UART=0 -DRPI3_USE_UEFI_MAP=0 -DSMC_PCI_SUPPORT=0 -DA57_ENABLE_NONCACHEABLE_LOAD_FWD=0 -DSKIP_A57_L1_FLUSH_PWR_DWN=0 -DA53_DISABLE_NON_TEMPORAL_HINT=1 -DA57_DISABLE_NON_TEMPORAL_HINT=1 -DWORKAROUND_CVE_2017_5715=1 -DWORKAROUND_CVE_2018_3639=1 -DDYNAMIC_WORKAROUND_CVE_2018_3639=0 -DWORKAROUND_CVE_2022_23960=1 -DNEOVERSE_Nx_EXTERNAL_LLC=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_A53_1530924=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_A55_1530923=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_A57_1319537=0 -DERRATA_A72_859971=1 -DERRATA_A72_1319367=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_A76_1791580=0 -DERRATA_A76_1165522=0 -DERRATA_A76_1868343=0 -DERRATA_A76_1946160=0 -DERRATA_A77_1508412=0 -DERRATA_A77_1925769=0 -DERRATA_A77_1946167=0 -DERRATA_A77_1791578=0 -DERRATA_A78_1688305=0 -DERRATA_A78_1941498=0 -DERRATA_A78_1951500=0 -DERRATA_A78_1821534=0 -DERRATA_A78_1952683=0 -DERRATA_A78_2132060=0 -DERRATA_A78_2242635=0 -DERRATA_A78_AE_1941500=0 -DERRATA_A78_AE_1951502=0 -DERRATA_N1_1043202=0 -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=0 -DERRATA_N1_1542419=0 -DERRATA_N1_1868343=0 -DERRATA_N1_1946160=0 -DERRATA_N2_2002655=0 -DERRATA_V1_1774420=0 -DERRATA_V1_1791573=0 -DERRATA_V1_1852267=0 -DERRATA_V1_1925756=0 -DERRATA_V1_1940577=0 -DERRATA_V1_1966096=0 -DERRATA_V1_2139242=0 -DERRATA_V1_2108267=0 -DERRATA_V1_2216392=0 -DERRATA_A710_1987031=0 -DERRATA_A710_2081180=0 -DERRATA_A710_2083908=0 -DERRATA_A710_2058056=0 -DERRATA_N2_2067956=0 -DERRATA_N2_2025414=0 -DERRATA_N2_2189731=0 -DERRATA_N2_2138956=0 -DERRATA_N2_2138953=0 -DERRATA_N2_2242415=0 -DERRATA_N2_2138958=0 -DERRATA_N2_2242400=0 -DERRATA_N2_2280757=0 -DERRATA_A710_2055002=0 -DERRATA_A710_2017096=0 -DERRATA_DSU_798953=0 -DERRATA_DSU_936184=0 -DSTACK_PROTECTOR_ENABLED=0 -DCRASH_REPORTING=1 -DEL3_EXCEPTION_HANDLING=0 -DSDEI_SUPPORT=0 -DALLOW_RO_XLAT_TABLES=0 -DAMU_RESTRICT_COUNTERS=0 -DARM_ARCH_MAJOR=8 -DARM_ARCH_MINOR=0 -DARM_IO_IN_DTB=0 -DBL2_AT_EL3=0 -DBL2_ENABLE_SP_LOAD=0 -DBL2_INV_DCACHE=1 -DBL2_IN_XIP_MEM=0 -DCOLD_BOOT_SINGLE_CPU=0 -DCOT_DESC_IN_DTB=0 -DCTX_INCLUDE_AARCH32_REGS=1 -DCTX_INCLUDE_EL2_REGS=0 -DCTX_INCLUDE_FPREGS=0 -DCTX_INCLUDE_MTE_REGS=0 -DCTX_INCLUDE_NEVE_REGS=0 -DCTX_INCLUDE_PAUTH_REGS=0 -DDECRYPTION_SUPPORT_none -DDISABLE_MTPMU=0 -DEL3_EXCEPTION_HANDLING=0 -DENABLE_AMU=0 -DENABLE_AMU_AUXILIARY_COUNTERS=0 -DENABLE_AMU_FCONF=0 -DENABLE_ASSERTIONS=1 -DENABLE_BTI=0 -DENABLE_FEAT_HCX=0 -DENABLE_FEAT_RNG=0 -DENABLE_FEAT_SB=0 -DENABLE_MPAM_FOR_LOWER_ELS=0 -DENABLE_MPMM=0 -DENABLE_MPMM_FCONF=0 -DENABLE_PAUTH=0 -DENABLE_PIE=0 -DENABLE_PMF=0 -DENABLE_PSCI_STAT=0 -DENABLE_RME=0 -DENABLE_RUNTIME_INSTRUMENTATION=0 -DENABLE_SME_FOR_NS=0 -DENABLE_SME_FOR_SWD=0 -DENABLE_SPE_FOR_LOWER_ELS=1 -DENABLE_SVE_FOR_NS=1 -DENABLE_SVE_FOR_SWD=0 -DENABLE_SYS_REG_TRACE_FOR_NS=0 -DENABLE_TRBE_FOR_NS=0 -DENABLE_TRF_FOR_NS=0 -DENCRYPT_BL31=0 -DENCRYPT_BL32=0 -DERRATA_SPECULATIVE_AT=0 -DERROR_DEPRECATED=0 -DFAULT_INJECTION_SUPPORT=0 -DGICV2_G0_FOR_EL3=0 -DHANDLE_EA_EL3_FIRST=0 -DHW_ASSISTED_COHERENCY=0 -DLOG_LEVEL=40 -DMEASURED_BOOT=0 -DNR_OF_FW_BANKS=2 -DNR_OF_IMAGES_IN_FW_BANK=1 -DNS_TIMER_SWITCH=0 -DPL011_GENERIC_UART=0 -DPLAT_rpi4 -DPROGRAMMABLE_RESET_ADDRESS=0 -DPSA_FWU_SUPPORT=0 -DPSCI_EXTENDED_STATE_ID=0 -DRAS_EXTENSION=0 -DRAS_TRAP_LOWER_EL_ERR_ACCESS=0 -DRECLAIM_INIT_CODE=0 -DRESET_TO_BL31=1 -DSDEI_IN_FCONF=0 -DSEC_INT_DESC_IN_FCONF=0 -DSEPARATE_CODE_AND_RODATA=1 -DSEPARATE_NOBITS_REGION=0 -DSPD_none -DSPIN_ON_BL1_EXIT=0 -DSPMD_SPM_AT_SEL2=1 -DSPM_MM=0 -DTRNG_SUPPORT=0 -DTRUSTED_BOARD_BOOT=0 -DUSE_COHERENT_MEM=1 -DUSE_DEBUGFS=0 -DUSE_ROMLIB=0 -DUSE_SP804_TIMER=0 -DUSE_SPINLOCK_CAS=0 -DUSE_TBBR_DEFS=1 -DWARMBOOT_ENABLE_DCACHE_EARLY=0 -Iinclude -Iinclude/arch/aarch64 -Iinclude/lib/cpus/aarch64 -Iinclude/lib/el3_runtime/aarch64 -Iplat/rpi/common/include -Iplat/rpi/rpi4/include  -Iinclude/lib/libfdt -Iinclude/lib/libc -Iinclude/lib/libc/aarch64   -nostdinc -Werror -Wall -Wmissing-include-dirs -Wunused -Wdisabled-optimization -Wvla -Wshadow -Wno-unused-parameter -Wredundant-decls -Wunused-but-set-variable -Wmaybe-uninitialized -Wpacked-bitfield-compat -Wshift-overflow=2 -Wlogical-op -Wno-error=deprecated-declarations -Wno-error=cpp -march=armv8-a -mgeneral-regs-only -mstrict-align -mtune=cortex-a72 -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -fno-common -Os -std=gnu99 -fno-omit-frame-pointer -fno-stack-protector  -DIMAGE_AT_EL3 -DIMAGE_BL31  -Wp,-MD,/home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/rpi4/debug/bl31/rpi3_topology.d -MT /home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/rpi4/debug/bl31/rpi3_topology.o -MP -c plat/rpi/common/rpi3_topology.c -o /home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/rpi4/debug/bl31/rpi3_topology.o
[   17s] In file included from plat/rpi/common/rpi3_pm.c:14:
[   17s] In function 'mmio_write_64',
[   17s]     inlined from 'rpi3_pwr_down_wfi' at plat/rpi/common/rpi3_pm.c:191:3:
[   17s] include/lib/mmio.h:51:35: error: array subscript 0 is outside array bounds of 'volatile uint64_t[0]' {aka 'volatile long unsigned int[]'} [-Werror=array-bounds]
[   17s]    51 |         *(volatile uint64_t*)addr = value;
[   17s]       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
[   17s] gcc  -g -DDEBUG=1 -DENABLE_BACKTRACE=1 -DXLAT_TABLES_LIB_V2=1 -DGIC_EXT_INTID=0 -DPLAT_EXTRA_LD_SCRIPT -DRPI3_BL33_IN_AARCH32=0 -DRPI3_DIRECT_LINUX_BOOT=1 -DRPI3_RUNTIME_UART=0 -DRPI3_USE_UEFI_MAP=0 -DSMC_PCI_SUPPORT=0 -DA57_ENABLE_NONCACHEABLE_LOAD_FWD=0 -DSKIP_A57_L1_FLUSH_PWR_DWN=0 -DA53_DISABLE_NON_TEMPORAL_HINT=1 -DA57_DISABLE_NON_TEMPORAL_HINT=1 -DWORKAROUND_CVE_2017_5715=1 -DWORKAROUND_CVE_2018_3639=1 -DDYNAMIC_WORKAROUND_CVE_2018_3639=0 -DWORKAROUND_CVE_2022_23960=1 -DNEOVERSE_Nx_EXTERNAL_LLC=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_A53_1530924=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_A55_1530923=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_A57_1319537=0 -DERRATA_A72_859971=1 -DERRATA_A72_1319367=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_A76_1791580=0 -DERRATA_A76_1165522=0 -DERRATA_A76_1868343=0 -DERRATA_A76_1946160=0 -DERRATA_A77_1508412=0 -DERRATA_A77_1925769=0 -DERRATA_A77_1946167=0 -DERRATA_A77_1791578=0 -DERRATA_A78_1688305=0 -DERRATA_A78_1941498=0 -DERRATA_A78_1951500=0 -DERRATA_A78_1821534=0 -DERRATA_A78_1952683=0 -DERRATA_A78_2132060=0 -DERRATA_A78_2242635=0 -DERRATA_A78_AE_1941500=0 -DERRATA_A78_AE_1951502=0 -DERRATA_N1_1043202=0 -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=0 -DERRATA_N1_1542419=0 -DERRATA_N1_1868343=0 -DERRATA_N1_1946160=0 -DERRATA_N2_2002655=0 -DERRATA_V1_1774420=0 -DERRATA_V1_1791573=0 -DERRATA_V1_1852267=0 -DERRATA_V1_1925756=0 -DERRATA_V1_1940577=0 -DERRATA_V1_1966096=0 -DERRATA_V1_2139242=0 -DERRATA_V1_2108267=0 -DERRATA_V1_2216392=0 -DERRATA_A710_1987031=0 -DERRATA_A710_2081180=0 -DERRATA_A710_2083908=0 -DERRATA_A710_2058056=0 -DERRATA_N2_2067956=0 -DERRATA_N2_2025414=0 -DERRATA_N2_2189731=0 -DERRATA_N2_2138956=0 -DERRATA_N2_2138953=0 -DERRATA_N2_2242415=0 -DERRATA_N2_2138958=0 -DERRATA_N2_2242400=0 -DERRATA_N2_2280757=0 -DERRATA_A710_2055002=0 -DERRATA_A710_2017096=0 -DERRATA_DSU_798953=0 -DERRATA_DSU_936184=0 -DSTACK_PROTECTOR_ENABLED=0 -DCRASH_REPORTING=1 -DEL3_EXCEPTION_HANDLING=0 -DSDEI_SUPPORT=0 -DALLOW_RO_XLAT_TABLES=0 -DAMU_RESTRICT_COUNTERS=0 -DARM_ARCH_MAJOR=8 -DARM_ARCH_MINOR=0 -DARM_IO_IN_DTB=0 -DBL2_AT_EL3=0 -DBL2_ENABLE_SP_LOAD=0 -DBL2_INV_DCACHE=1 -DBL2_IN_XIP_MEM=0 -DCOLD_BOOT_SINGLE_CPU=0 -DCOT_DESC_IN_DTB=0 -DCTX_INCLUDE_AARCH32_REGS=1 -DCTX_INCLUDE_EL2_REGS=0 -DCTX_INCLUDE_FPREGS=0 -DCTX_INCLUDE_MTE_REGS=0 -DCTX_INCLUDE_NEVE_REGS=0 -DCTX_INCLUDE_PAUTH_REGS=0 -DDECRYPTION_SUPPORT_none -DDISABLE_MTPMU=0 -DEL3_EXCEPTION_HANDLING=0 -DENABLE_AMU=0 -DENABLE_AMU_AUXILIARY_COUNTERS=0 -DENABLE_AMU_FCONF=0 -DENABLE_ASSERTIONS=1 -DENABLE_BTI=0 -DENABLE_FEAT_HCX=0 -DENABLE_FEAT_RNG=0 -DENABLE_FEAT_SB=0 -DENABLE_MPAM_FOR_LOWER_ELS=0 -DENABLE_MPMM=0 -DENABLE_MPMM_FCONF=0 -DENABLE_PAUTH=0 -DENABLE_PIE=0 -DENABLE_PMF=0 -DENABLE_PSCI_STAT=0 -DENABLE_RME=0 -DENABLE_RUNTIME_INSTRUMENTATION=0 -DENABLE_SME_FOR_NS=0 -DENABLE_SME_FOR_SWD=0 -DENABLE_SPE_FOR_LOWER_ELS=1 -DENABLE_SVE_FOR_NS=1 -DENABLE_SVE_FOR_SWD=0 -DENABLE_SYS_REG_TRACE_FOR_NS=0 -DENABLE_TRBE_FOR_NS=0 -DENABLE_TRF_FOR_NS=0 -DENCRYPT_BL31=0 -DENCRYPT_BL32=0 -DERRATA_SPECULATIVE_AT=0 -DERROR_DEPRECATED=0 -DFAULT_INJECTION_SUPPORT=0 -DGICV2_G0_FOR_EL3=0 -DHANDLE_EA_EL3_FIRST=0 -DHW_ASSISTED_COHERENCY=0 -DLOG_LEVEL=40 -DMEASURED_BOOT=0 -DNR_OF_FW_BANKS=2 -DNR_OF_IMAGES_IN_FW_BANK=1 -DNS_TIMER_SWITCH=0 -DPL011_GENERIC_UART=0 -DPLAT_rpi4 -DPROGRAMMABLE_RESET_ADDRESS=0 -DPSA_FWU_SUPPORT=0 -DPSCI_EXTENDED_STATE_ID=0 -DRAS_EXTENSION=0 -DRAS_TRAP_LOWER_EL_ERR_ACCESS=0 -DRECLAIM_INIT_CODE=0 -DRESET_TO_BL31=1 -DSDEI_IN_FCONF=0 -DSEC_INT_DESC_IN_FCONF=0 -DSEPARATE_CODE_AND_RODATA=1 -DSEPARATE_NOBITS_REGION=0 -DSPD_none -DSPIN_ON_BL1_EXIT=0 -DSPMD_SPM_AT_SEL2=1 -DSPM_MM=0 -DTRNG_SUPPORT=0 -DTRUSTED_BOARD_BOOT=0 -DUSE_COHERENT_MEM=1 -DUSE_DEBUGFS=0 -DUSE_ROMLIB=0 -DUSE_SP804_TIMER=0 -DUSE_SPINLOCK_CAS=0 -DUSE_TBBR_DEFS=1 -DWARMBOOT_ENABLE_DCACHE_EARLY=0 -Iinclude -Iinclude/arch/aarch64 -Iinclude/lib/cpus/aarch64 -Iinclude/lib/el3_runtime/aarch64 -Iplat/rpi/common/include -Iplat/rpi/rpi4/include  -Iinclude/lib/libfdt -Iinclude/lib/libc -Iinclude/lib/libc/aarch64   -nostdinc -Werror -Wall -Wmissing-include-dirs -Wunused -Wdisabled-optimization -Wvla -Wshadow -Wno-unused-parameter -Wredundant-decls -Wunused-but-set-variable -Wmaybe-uninitialized -Wpacked-bitfield-compat -Wshift-overflow=2 -Wlogical-op -Wno-error=deprecated-declarations -Wno-error=cpp -march=armv8-a -mgeneral-regs-only -mstrict-align -mtune=cortex-a72 -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -fno-common -Os -std=gnu99 -fno-omit-frame-pointer -fno-stack-protector  -DIMAGE_AT_EL3 -DIMAGE_BL31  -Wp,-MD,/home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/rpi4/debug/bl31/rpi4_bl31_setup.d -MT /home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/rpi4/debug/bl31/rpi4_bl31_setup.o -MP -c plat/rpi/rpi4/rpi4_bl31_setup.c -o /home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/rpi4/debug/bl31/rpi4_bl31_setup.o
[   17s] gcc  -g -DDEBUG=1 -DENABLE_BACKTRACE=1 -DXLAT_TABLES_LIB_V2=1 -DGIC_EXT_INTID=0 -DPLAT_EXTRA_LD_SCRIPT -DRPI3_BL33_IN_AARCH32=0 -DRPI3_DIRECT_LINUX_BOOT=1 -DRPI3_RUNTIME_UART=0 -DRPI3_USE_UEFI_MAP=0 -DSMC_PCI_SUPPORT=0 -DA57_ENABLE_NONCACHEABLE_LOAD_FWD=0 -DSKIP_A57_L1_FLUSH_PWR_DWN=0 -DA53_DISABLE_NON_TEMPORAL_HINT=1 -DA57_DISABLE_NON_TEMPORAL_HINT=1 -DWORKAROUND_CVE_2017_5715=1 -DWORKAROUND_CVE_2018_3639=1 -DDYNAMIC_WORKAROUND_CVE_2018_3639=0 -DWORKAROUND_CVE_2022_23960=1 -DNEOVERSE_Nx_EXTERNAL_LLC=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_A53_1530924=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_A55_1530923=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_A57_1319537=0 -DERRATA_A72_859971=1 -DERRATA_A72_1319367=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_A76_1791580=0 -DERRATA_A76_1165522=0 -DERRATA_A76_1868343=0 -DERRATA_A76_1946160=0 -DERRATA_A77_1508412=0 -DERRATA_A77_1925769=0 -DERRATA_A77_1946167=0 -DERRATA_A77_1791578=0 -DERRATA_A78_1688305=0 -DERRATA_A78_1941498=0 -DERRATA_A78_1951500=0 -DERRATA_A78_1821534=0 -DERRATA_A78_1952683=0 -DERRATA_A78_2132060=0 -DERRATA_A78_2242635=0 -DERRATA_A78_AE_1941500=0 -DERRATA_A78_AE_1951502=0 -DERRATA_N1_1043202=0 -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=0 -DERRATA_N1_1542419=0 -DERRATA_N1_1868343=0 -DERRATA_N1_1946160=0 -DERRATA_N2_2002655=0 -DERRATA_V1_1774420=0 -DERRATA_V1_1791573=0 -DERRATA_V1_1852267=0 -DERRATA_V1_1925756=0 -DERRATA_V1_1940577=0 -DERRATA_V1_1966096=0 -DERRATA_V1_2139242=0 -DERRATA_V1_2108267=0 -DERRATA_V1_2216392=0 -DERRATA_A710_1987031=0 -DERRATA_A710_2081180=0 -DERRATA_A710_2083908=0 -DERRATA_A710_2058056=0 -DERRATA_N2_2067956=0 -DERRATA_N2_2025414=0 -DERRATA_N2_2189731=0 -DERRATA_N2_2138956=0 -DERRATA_N2_2138953=0 -DERRATA_N2_2242415=0 -DERRATA_N2_2138958=0 -DERRATA_N2_2242400=0 -DERRATA_N2_2280757=0 -DERRATA_A710_2055002=0 -DERRATA_A710_2017096=0 -DERRATA_DSU_798953=0 -DERRATA_DSU_936184=0 -DSTACK_PROTECTOR_ENABLED=0 -DCRASH_REPORTING=1 -DEL3_EXCEPTION_HANDLING=0 -DSDEI_SUPPORT=0 -DALLOW_RO_XLAT_TABLES=0 -DAMU_RESTRICT_COUNTERS=0 -DARM_ARCH_MAJOR=8 -DARM_ARCH_MINOR=0 -DARM_IO_IN_DTB=0 -DBL2_AT_EL3=0 -DBL2_ENABLE_SP_LOAD=0 -DBL2_INV_DCACHE=1 -DBL2_IN_XIP_MEM=0 -DCOLD_BOOT_SINGLE_CPU=0 -DCOT_DESC_IN_DTB=0 -DCTX_INCLUDE_AARCH32_REGS=1 -DCTX_INCLUDE_EL2_REGS=0 -DCTX_INCLUDE_FPREGS=0 -DCTX_INCLUDE_MTE_REGS=0 -DCTX_INCLUDE_NEVE_REGS=0 -DCTX_INCLUDE_PAUTH_REGS=0 -DDECRYPTION_SUPPORT_none -DDISABLE_MTPMU=0 -DEL3_EXCEPTION_HANDLING=0 -DENABLE_AMU=0 -DENABLE_AMU_AUXILIARY_COUNTERS=0 -DENABLE_AMU_FCONF=0 -DENABLE_ASSERTIONS=1 -DENABLE_BTI=0 -DENABLE_FEAT_HCX=0 -DENABLE_FEAT_RNG=0 -DENABLE_FEAT_SB=0 -DENABLE_MPAM_FOR_LOWER_ELS=0 -DENABLE_MPMM=0 -DENABLE_MPMM_FCONF=0 -DENABLE_PAUTH=0 -DENABLE_PIE=0 -DENABLE_PMF=0 -DENABLE_PSCI_STAT=0 -DENABLE_RME=0 -DENABLE_RUNTIME_INSTRUMENTATION=0 -DENABLE_SME_FOR_NS=0 -DENABLE_SME_FOR_SWD=0 -DENABLE_SPE_FOR_LOWER_ELS=1 -DENABLE_SVE_FOR_NS=1 -DENABLE_SVE_FOR_SWD=0 -DENABLE_SYS_REG_TRACE_FOR_NS=0 -DENABLE_TRBE_FOR_NS=0 -DENABLE_TRF_FOR_NS=0 -DENCRYPT_BL31=0 -DENCRYPT_BL32=0 -DERRATA_SPECULATIVE_AT=0 -DERROR_DEPRECATED=0 -DFAULT_INJECTION_SUPPORT=0 -DGICV2_G0_FOR_EL3=0 -DHANDLE_EA_EL3_FIRST=0 -DHW_ASSISTED_COHERENCY=0 -DLOG_LEVEL=40 -DMEASURED_BOOT=0 -DNR_OF_FW_BANKS=2 -DNR_OF_IMAGES_IN_FW_BANK=1 -DNS_TIMER_SWITCH=0 -DPL011_GENERIC_UART=0 -DPLAT_rpi4 -DPROGRAMMABLE_RESET_ADDRESS=0 -DPSA_FWU_SUPPORT=0 -DPSCI_EXTENDED_STATE_ID=0 -DRAS_EXTENSION=0 -DRAS_TRAP_LOWER_EL_ERR_ACCESS=0 -DRECLAIM_INIT_CODE=0 -DRESET_TO_BL31=1 -DSDEI_IN_FCONF=0 -DSEC_INT_DESC_IN_FCONF=0 -DSEPARATE_CODE_AND_RODATA=1 -DSEPARATE_NOBITS_REGION=0 -DSPD_none -DSPIN_ON_BL1_EXIT=0 -DSPMD_SPM_AT_SEL2=1 -DSPM_MM=0 -DTRNG_SUPPORT=0 -DTRUSTED_BOARD_BOOT=0 -DUSE_COHERENT_MEM=1 -DUSE_DEBUGFS=0 -DUSE_ROMLIB=0 -DUSE_SP804_TIMER=0 -DUSE_SPINLOCK_CAS=0 -DUSE_TBBR_DEFS=1 -DWARMBOOT_ENABLE_DCACHE_EARLY=0 -Iinclude -Iinclude/arch/aarch64 -Iinclude/lib/cpus/aarch64 -Iinclude/lib/el3_runtime/aarch64 -Iplat/rpi/common/include -Iplat/rpi/rpi4/include  -Iinclude/lib/libfdt -Iinclude/lib/libc -Iinclude/lib/libc/aarch64   -nostdinc -Werror -Wall -Wmissing-include-dirs -Wunused -Wdisabled-optimization -Wvla -Wshadow -Wno-unused-parameter -Wredundant-decls -Wunused-but-set-variable -Wmaybe-uninitialized -Wpacked-bitfield-compat -Wshift-overflow=2 -Wlogical-op -Wno-error=deprecated-declarations -Wno-error=cpp -march=armv8-a -mgeneral-regs-only -mstrict-align -mtune=cortex-a72 -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -fno-common -Os -std=gnu99 -fno-omit-frame-pointer -fno-stack-protector  -DIMAGE_AT_EL3 -DIMAGE_BL31  -Wp,-MD,/home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/rpi4/debug/bl31/arm_arch_svc_setup.d -MT /home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/rpi4/debug/bl31/arm_arch_svc_setup.o -MP -c services/arm_arch_svc/arm_arch_svc_setup.c -o /home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/rpi4/debug/bl31/arm_arch_svc_setup.o
[   17s] plat/rpi/common/rpi3_pm.c: In function 'plat_setup_psci_ops':
[   17s] plat/rpi/common/rpi3_pm.c:279:9: error: array subscript 0 is outside array bounds of 'uintptr_t[0]' {aka 'long unsigned int[]'} [-Werror=array-bounds]
[   17s]   279 |         *entrypoint = sec_entrypoint;
[   17s]       |         ^~~~~~~~~~~
[   17s] cc1: all warnings being treated as errors
[   17s] make: *** [Makefile:1251: /home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/rpi4/debug/bl31/rpi3_pm.o] Error 1
[   17s] make: *** Waiting for unfinished jobs....

Log for Hikey:

[   28s] gcc -g -Wa,--gdwarf-2 -DDEBUG=1 -DENABLE_BACKTRACE=1 -DHIKEY_TSP_RAM_LOCATION_ID=HIKEY_DRAM_ID -DCONSOLE_BASE=PL011_UART3_BASE -DCRASH_CONSOLE_BASE=PL011_UART3_BASE -DPLAT_PL061_MAX_GPIOS=160 -DPLAT_PARTITION_MAX_ENTRIES=12 -DA57_ENABLE_NONCACHEABLE_LOAD_FWD=0 -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 -DWORKAROUND_CVE_2022_23960=1 -DNEOVERSE_Nx_EXTERNAL_LLC=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=1 -DERRATA_A53_843419=1 -DERRATA_A53_855873=1 -DERRATA_A53_1530924=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_A55_1530923=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_A57_1319537=0 -DERRATA_A72_859971=0 -DERRATA_A72_1319367=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_A76_1791580=0 -DERRATA_A76_1165522=0 -DERRATA_A76_1868343=0 -DERRATA_A76_1946160=0 -DERRATA_A77_1508412=0 -DERRATA_A77_1925769=0 -DERRATA_A77_1946167=0 -DERRATA_A77_1791578=0 -DERRATA_A78_1688305=0 -DERRATA_A78_1941498=0 -DERRATA_A78_1951500=0 -DERRATA_A78_1821534=0 -DERRATA_A78_1952683=0 -DERRATA_A78_2132060=0 -DERRATA_A78_2242635=0 -DERRATA_A78_AE_1941500=0 -DERRATA_A78_AE_1951502=0 -DERRATA_N1_1043202=0 -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=0 -DERRATA_N1_1542419=0 -DERRATA_N1_1868343=0 -DERRATA_N1_1946160=0 -DERRATA_N2_2002655=0 -DERRATA_V1_1774420=0 -DERRATA_V1_1791573=0 -DERRATA_V1_1852267=0 -DERRATA_V1_1925756=0 -DERRATA_V1_1940577=0 -DERRATA_V1_1966096=0 -DERRATA_V1_2139242=0 -DERRATA_V1_2108267=0 -DERRATA_V1_2216392=0 -DERRATA_A710_1987031=0 -DERRATA_A710_2081180=0 -DERRATA_A710_2083908=0 -DERRATA_A710_2058056=0 -DERRATA_N2_2067956=0 -DERRATA_N2_2025414=0 -DERRATA_N2_2189731=0 -DERRATA_N2_2138956=0 -DERRATA_N2_2138953=0 -DERRATA_N2_2242415=0 -DERRATA_N2_2138958=0 -DERRATA_N2_2242400=0 -DERRATA_N2_2280757=0 -DERRATA_A710_2055002=0 -DERRATA_A710_2017096=0 -DERRATA_DSU_798953=0 -DERRATA_DSU_936184=0 -DSTACK_PROTECTOR_ENABLED=0 -DCRASH_REPORTING=1 -DEL3_EXCEPTION_HANDLING=0 -DSDEI_SUPPORT=0 -DALLOW_RO_XLAT_TABLES=0 -DAMU_RESTRICT_COUNTERS=0 -DARM_ARCH_MAJOR=8 -DARM_ARCH_MINOR=0 -DARM_IO_IN_DTB=0 -DBL2_AT_EL3=1 -DBL2_ENABLE_SP_LOAD=0 -DBL2_INV_DCACHE=1 -DBL2_IN_XIP_MEM=0 -DCOLD_BOOT_SINGLE_CPU=1 -DCOT_DESC_IN_DTB=0 -DCTX_INCLUDE_AARCH32_REGS=1 -DCTX_INCLUDE_EL2_REGS=0 -DCTX_INCLUDE_FPREGS=0 -DCTX_INCLUDE_MTE_REGS=0 -DCTX_INCLUDE_NEVE_REGS=0 -DCTX_INCLUDE_PAUTH_REGS=0 -DDECRYPTION_SUPPORT_none -DDISABLE_MTPMU=0 -DEL3_EXCEPTION_HANDLING=0 -DENABLE_AMU=0 -DENABLE_AMU_AUXILIARY_COUNTERS=0 -DENABLE_AMU_FCONF=0 -DENABLE_ASSERTIONS=1 -DENABLE_BTI=0 -DENABLE_FEAT_HCX=0 -DENABLE_FEAT_RNG=0 -DENABLE_FEAT_SB=0 -DENABLE_MPAM_FOR_LOWER_ELS=0 -DENABLE_MPMM=0 -DENABLE_MPMM_FCONF=0 -DENABLE_PAUTH=0 -DENABLE_PIE=0 -DENABLE_PMF=0 -DENABLE_PSCI_STAT=0 -DENABLE_RME=0 -DENABLE_RUNTIME_INSTRUMENTATION=0 -DENABLE_SME_FOR_NS=0 -DENABLE_SME_FOR_SWD=0 -DENABLE_SPE_FOR_LOWER_ELS=1 -DENABLE_SVE_FOR_NS=0 -DENABLE_SVE_FOR_SWD=0 -DENABLE_SYS_REG_TRACE_FOR_NS=0 -DENABLE_TRBE_FOR_NS=0 -DENABLE_TRF_FOR_NS=0 -DENCRYPT_BL31=0 -DENCRYPT_BL32=0 -DERRATA_SPECULATIVE_AT=0 -DERROR_DEPRECATED=0 -DFAULT_INJECTION_SUPPORT=0 -DGICV2_G0_FOR_EL3=0 -DHANDLE_EA_EL3_FIRST=0 -DHW_ASSISTED_COHERENCY=0 -DLOG_LEVEL=40 -DMEASURED_BOOT=0 -DNR_OF_FW_BANKS=2 -DNR_OF_IMAGES_IN_FW_BANK=1 -DNS_TIMER_SWITCH=0 -DPL011_GENERIC_UART=0 -DPLAT_hikey -DPROGRAMMABLE_RESET_ADDRESS=1 -DPSA_FWU_SUPPORT=0 -DPSCI_EXTENDED_STATE_ID=0 -DRAS_EXTENSION=0 -DRAS_TRAP_LOWER_EL_ERR_ACCESS=0 -DRECLAIM_INIT_CODE=0 -DRESET_TO_BL31=0 -DSDEI_IN_FCONF=0 -DSEC_INT_DESC_IN_FCONF=0 -DSEPARATE_CODE_AND_RODATA=0 -DSEPARATE_NOBITS_REGION=0 -DSPD_none -DSPIN_ON_BL1_EXIT=0 -DSPMD_SPM_AT_SEL2=1 -DSPM_MM=0 -DTRNG_SUPPORT=0 -DTRUSTED_BOARD_BOOT=0 -DUSE_COHERENT_MEM=1 -DUSE_DEBUGFS=0 -DUSE_ROMLIB=0 -DUSE_SP804_TIMER=0 -DUSE_SPINLOCK_CAS=0 -DUSE_TBBR_DEFS=1 -DWARMBOOT_ENABLE_DCACHE_EARLY=0 -Iinclude -Iinclude/arch/aarch64 -Iinclude/lib/cpus/aarch64 -Iinclude/lib/el3_runtime/aarch64 -Iplat/hisilicon/hikey/include  -Iinclude/lib/libc -Iinclude/lib/libc/aarch64   -nostdinc -Werror -Wall -Wmissing-include-dirs -Wunused -Wdisabled-optimization -Wvla -Wshadow -Wno-unused-parameter -Wredundant-decls -Wunused-but-set-variable -Wmaybe-uninitialized -Wpacked-bitfield-compat -Wshift-overflow=2 -Wlogical-op -Wno-error=deprecated-declarations -Wno-error=cpp -march=armv8-a -ffreestanding -Wa,--fatal-warnings -DIMAGE_AT_EL3 -DIMAGE_BL2  -Wp,-MD,/home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/hikey/debug/bl2/platform_helpers.d -MT /home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/hikey/debug/bl2/platform_helpers.o -MP -c plat/common/aarch64/platform_helpers.S -o /home/abuild/rpmbuild/BUILD/trusted-firmware-a-2.6/build/hikey/debug/bl2/platform_helpers.o
[   28s] In file included from plat/hisilicon/hikey/hikey_ddr.c:13:
[   28s] In function 'mmio_write_32',
[   28s]     inlined from 'hikey_ddr_init' at plat/hisilicon/hikey/hikey_ddr.c:1448:2:
[   28s] include/lib/mmio.h:41:35: error: array subscript 0 is outside array bounds of 'volatile uint32_t[0]' {aka 'volatile unsigned int[]'} [-Werror=array-bounds]
[   28s]    41 |         *(volatile uint32_t*)addr = value;
[   28s]       |         ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
[   28s] In function 'mmio_read_32',
[   28s]     inlined from 'hikey_ddr_init' at plat/hisilicon/hikey/hikey_ddr.c:1449:2:
[   28s] include/lib/mmio.h:46:16: error: array subscript 0 is outside array bounds of 'volatile uint32_t[0]' {aka 'volatile unsigned int[]'} [-Werror=array-bounds]
[   28s]    46 |         return *(volatile uint32_t*)addr;
[   28s]       |                ^~~~~~~~~~~~~~~~~~~~~~~~~
ssg-bot commented 2 years ago

Hello @ggardet!

Thank you for raising an issue for Trusted Firmware-A.

The TF-A project has now migrated to www.trustedfirmware.org. This issue tracker will still remain accessible for some time, but only for historical reasons. From now on you should raise new issues on trustedfirmware.org.

If it is a query or a design discussion it is better discussed via the mailing list. If it is issue/bug which need to be tracked, raise an issue in the issue tracking board and also send an email to the mailing list to notify the TF-A community.

How do I raise issues for TF-A?

Please use our new issue tracking board. For this you just need to login with your existing GitHub account. We also have a guide to help you raise the issue with the appropriate labels and tags. This way it will be easier for both you and us to track and address the issue most effectively.

We are looking forward to seeing you in trustedfirmware.org!

The Trusted Firmware-A team

ggardet commented 2 years ago

It seems to be covered by https://developer.trustedfirmware.org/T991