u-boot/arch
Andre Przywara d660a82934 arm: smh: Make semihosting trap calls more robust
Commit f4b540e25c5c("arm: smh: Fix uninitialized parameters with newer
GCCs") added a memory clobber to the semihosting inline assembly trap
calls, to avoid too eager GCC optimisation: when passing a pointer, newer
compilers couldn't be bothered to actually fill in the structure that it
pointed to, as this data would seemingly never be used (at least from the
compiler's point of view).
But instead of the memory clobber we need to tell the compiler that we are
passing an *array* instead of some generic pointer, this forces the
compiler to actually populate the data structure.
This involves some rather hideous cast, which is best hidden in a macro.

But regardless of that, we actually need the memory clobber, but for two
different reasons: explain them in comments.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-11-02 13:31:40 -04:00
..
arc Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE 2022-10-31 11:01:31 -04:00
arm arm: smh: Make semihosting trap calls more robust 2022-11-02 13:31:40 -04:00
m68k Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE 2022-10-31 11:01:31 -04:00
microblaze Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE 2022-10-31 11:01:31 -04:00
mips Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE 2022-10-31 11:01:31 -04:00
nios2 treewide: Drop bootm_headers_t typedef 2022-09-29 16:07:57 -04:00
powerpc Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE 2022-10-31 11:01:31 -04:00
riscv Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE 2022-10-31 11:01:31 -04:00
sandbox test: dm: Add test cases for FWU Metadata uclass 2022-10-31 14:47:33 -04:00
sh Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE 2022-10-31 11:01:31 -04:00
x86 Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE 2022-10-31 11:01:31 -04:00
xtensa treewide: Drop bootm_headers_t typedef 2022-09-29 16:07:57 -04:00
.gitignore
Kconfig video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEO 2022-10-30 20:07:17 +01:00
Kconfig.nxp Convert CONFIG_SYS_FSL_NUM_CC_PLLS to Kconfig 2022-08-12 16:10:49 -04:00
u-boot-elf.lds