* [PATCH 0/3] ARM: socfpga: shrink socfpga-xload configs in size
@ 2026-01-20 12:24 Ahmad Fatoum
2026-01-20 12:24 ` [PATCH master 1/3] include: asm-generic/bug.h: allow disabling CONFIG_DEBUG_BUGVERBOSE Ahmad Fatoum
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2026-01-20 12:24 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Just shaves off 1 kilobyte (out of 60K), but it gets CI green again for
now.
Ahmad Fatoum (3):
include: asm-generic/bug.h: allow disabling CONFIG_DEBUG_BUGVERBOSE
ARMv7: hyp: allow disabling support for invoking barebox in HYP mode
ARM: socfpga: shrink socfpga-xload configs in size
arch/arm/configs/socfpga-xload_defconfig | 5 ++++-
arch/arm/cpu/Kconfig | 10 ++++++++++
arch/arm/cpu/lowlevel_32.S | 2 +-
arch/arm/cpu/start.c | 2 +-
arch/arm/cpu/uncompress.c | 2 +-
include/asm-generic/bug.h | 2 +-
6 files changed, 18 insertions(+), 5 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH master 1/3] include: asm-generic/bug.h: allow disabling CONFIG_DEBUG_BUGVERBOSE 2026-01-20 12:24 [PATCH 0/3] ARM: socfpga: shrink socfpga-xload configs in size Ahmad Fatoum @ 2026-01-20 12:24 ` Ahmad Fatoum 2026-01-20 12:24 ` [PATCH master 2/3] ARMv7: hyp: allow disabling support for invoking barebox in HYP mode Ahmad Fatoum 2026-01-20 12:24 ` [PATCH master 3/3] ARM: socfpga: shrink socfpga-xload configs in size Ahmad Fatoum 2 siblings, 0 replies; 4+ messages in thread From: Ahmad Fatoum @ 2026-01-20 12:24 UTC (permalink / raw) To: barebox; +Cc: Ahmad Fatoum __bug_dump_stack is used as if it's a function, but (void)0 is not callable. Turn it into a function-like macro to allow CONFIG_DEBUG_BUGVERBOSE to be disabled. This option save about 500 bytes for minimal configurations like socfpga-xload_defconfig and more for more extensive configs. Fixes: 32755105119e ("bug: add support for CONFIG_DEBUG_BUGVERBOSE") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- include/asm-generic/bug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index ca75b1c7646e..514801dab10e 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -13,7 +13,7 @@ #else #define __bug_printf no_printf #define __bug_panic panic_no_stacktrace -#define __bug_dump_stack (void)0 +#define __bug_dump_stack() (void)0 #endif #define BUG() do { \ -- 2.47.3 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH master 2/3] ARMv7: hyp: allow disabling support for invoking barebox in HYP mode 2026-01-20 12:24 [PATCH 0/3] ARM: socfpga: shrink socfpga-xload configs in size Ahmad Fatoum 2026-01-20 12:24 ` [PATCH master 1/3] include: asm-generic/bug.h: allow disabling CONFIG_DEBUG_BUGVERBOSE Ahmad Fatoum @ 2026-01-20 12:24 ` Ahmad Fatoum 2026-01-20 12:24 ` [PATCH master 3/3] ARM: socfpga: shrink socfpga-xload configs in size Ahmad Fatoum 2 siblings, 0 replies; 4+ messages in thread From: Ahmad Fatoum @ 2026-01-20 12:24 UTC (permalink / raw) To: barebox; +Cc: Ahmad Fatoum Older SoCs like the Cortex-A9 don't need this handling and disabling it allows us to save about 500 bytes. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- arch/arm/cpu/Kconfig | 10 ++++++++++ arch/arm/cpu/lowlevel_32.S | 2 +- arch/arm/cpu/start.c | 2 +- arch/arm/cpu/uncompress.c | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig index 04b1585679f3..47c116ea98c5 100644 --- a/arch/arm/cpu/Kconfig +++ b/arch/arm/cpu/Kconfig @@ -83,6 +83,16 @@ config CPU_V7 depends on 32BIT select CPU_32v7 +config CPU_V7VE + bool "ARMv7 Virtualization Extensions Support" + depends on CPU_V7 + default y + help + Say y here if it's possible for your CPU to be in HYP (hypervisor) + mode when entering barebox. + + If unsure, say y. + # ARMv8 config CPU_V8 bool "Generic ARMv8 support" diff --git a/arch/arm/cpu/lowlevel_32.S b/arch/arm/cpu/lowlevel_32.S index 5d524faf9cff..3b1dea5c67c0 100644 --- a/arch/arm/cpu/lowlevel_32.S +++ b/arch/arm/cpu/lowlevel_32.S @@ -12,7 +12,7 @@ ENTRY(arm_cpu_lowlevel_init) /* save sp, because possible HYP -> SVC transition below clobbers it */ mov r3, sp -#ifdef CONFIG_CPU_32v7 +#ifdef CONFIG_CPU_V7VE /* careful: the hyp install corrupts r0 and r1 */ bl __hyp_install #endif diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c index c2f14736dac5..bbcf465be4db 100644 --- a/arch/arm/cpu/start.c +++ b/arch/arm/cpu/start.c @@ -137,7 +137,7 @@ __noreturn void barebox_non_pbl_start(unsigned long membase, barebox_image_size, hd); - if (IS_ENABLED(CONFIG_CPU_V7)) + if (IS_ENABLED(CONFIG_CPU_V7VE)) armv7_hyp_install(); pbl_barebox_break(); diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c index 9a9f391022c1..dffdd2c81232 100644 --- a/arch/arm/cpu/uncompress.c +++ b/arch/arm/cpu/uncompress.c @@ -121,7 +121,7 @@ void __noreturn barebox_pbl_start(unsigned long membase, unsigned long memsize, pr_debug("jumping to ELF entry point at 0x%p\n", barebox); - if (IS_ENABLED(CONFIG_CPU_V7) && boot_cpu_mode() == HYP_MODE) + if (IS_ENABLED(CONFIG_CPU_V7VE) && boot_cpu_mode() == HYP_MODE) armv7_switch_to_hyp(); barebox(membase, memsize, handoff_data); -- 2.47.3 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH master 3/3] ARM: socfpga: shrink socfpga-xload configs in size 2026-01-20 12:24 [PATCH 0/3] ARM: socfpga: shrink socfpga-xload configs in size Ahmad Fatoum 2026-01-20 12:24 ` [PATCH master 1/3] include: asm-generic/bug.h: allow disabling CONFIG_DEBUG_BUGVERBOSE Ahmad Fatoum 2026-01-20 12:24 ` [PATCH master 2/3] ARMv7: hyp: allow disabling support for invoking barebox in HYP mode Ahmad Fatoum @ 2026-01-20 12:24 ` Ahmad Fatoum 2 siblings, 0 replies; 4+ messages in thread From: Ahmad Fatoum @ 2026-01-20 12:24 UTC (permalink / raw) To: barebox; +Cc: Ahmad Fatoum CI is straddling the size limit if 61436 bytes. Dissable some options to reclaim 1K on the image size for now... Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> --- arch/arm/configs/socfpga-xload_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/configs/socfpga-xload_defconfig b/arch/arm/configs/socfpga-xload_defconfig index 00841b8530de..22bab8d6073c 100644 --- a/arch/arm/configs/socfpga-xload_defconfig +++ b/arch/arm/configs/socfpga-xload_defconfig @@ -1,4 +1,5 @@ CONFIG_ARCH_SOCFPGA=y +# CONFIG_CPU_V7VE is not set CONFIG_ARCH_SOCFPGA_XLOAD=y CONFIG_MACH_SOCFPGA_ALTERA_SOCDK=y CONFIG_MACH_SOCFPGA_EBV_SOCRATES=y @@ -9,13 +10,15 @@ CONFIG_MACH_SOCFPGA_TERASIC_SOCKIT=y CONFIG_THUMB2_BAREBOX=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y # CONFIG_ARM_EXCEPTIONS is not set -# CONFIG_MEMINFO is not set CONFIG_NAME="socfpga-xload_defconfig" +# CONFIG_MEMINFO is not set CONFIG_MMU=y CONFIG_MALLOC_SIZE=0x0 CONFIG_MALLOC_DUMMY=y CONFIG_SHELL_NONE=y # CONFIG_ERRNO_MESSAGES is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_FILETYPE_STRINGS is not set CONFIG_DRIVER_SERIAL_NS16550=y # CONFIG_SPI is not set CONFIG_MCI=y -- 2.47.3 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-20 12:25 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-01-20 12:24 [PATCH 0/3] ARM: socfpga: shrink socfpga-xload configs in size Ahmad Fatoum 2026-01-20 12:24 ` [PATCH master 1/3] include: asm-generic/bug.h: allow disabling CONFIG_DEBUG_BUGVERBOSE Ahmad Fatoum 2026-01-20 12:24 ` [PATCH master 2/3] ARMv7: hyp: allow disabling support for invoking barebox in HYP mode Ahmad Fatoum 2026-01-20 12:24 ` [PATCH master 3/3] ARM: socfpga: shrink socfpga-xload configs in size Ahmad Fatoum
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox