Skip to contentSkip to conversation

Kconfig: select SPL_USE_TINY_PRINTF_POINTER_SUPPORT for K3

PATCH In review Anshul Dalal 2 participants 3 messages Jan 20 – Jan 28 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 Kconfig: select SPL_USE_TINY_PRINTF_POINTER_SUPPORT for K3

Since the commit 1e24e84db41a ("tiny-printf: Handle formatting of %p with an extra Kconfig"), SPL_USE_TINY_PRINTF_POINTER_SUPPORT has been made mandatory in order to use %p which would earlier have defaulted to a 'long' print.

Without this config symbol, k3_sysfw_dfu_download fails to set the correct value for the DFU string with:

sprintf(dfu_str, "sysfw.itb ram 0x%p 0x%x", addr,
CONFIG_K3_SYSFW_IMAGE_SIZE_MAX);

The value we get "sysfw.itb ram 0x? 0x41c29d40" causes a boot failure.

Therefore this patch sets SPL_USE_TINY_PRINTF_POINTER_SUPPORT for all K3 devices since the size impact is less than 100 bytes.

---
Changes in v4:
- Enable pointer support for only DFU configs on ARMv7 cores
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Handle setting the config in Kconfig instead of the defconfig
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Remove unrelated changes
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 arch/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
index 0485fe78e10..2df28d71d75 100644
@@ -836,6 +836,7 @@ config ARCH_K3
 	select DMA_ADDR_T_64BIT
 	select LTO
 	select SPL_LOAD_FIT if SPL
+	select SPL_USE_TINY_PRINTF_POINTER_SUPPORT if SPL_USE_TINY_PRINTF && DFU && CPU_V7R
 	imply TI_SECURE_DEVICE
 	imply DM_RNG if ARM64
 	imply TEE if ARM64

---
base-commit: cde150b5e15f291618c120e047fd85393123c091
change-id: 20251105-am65_dfu_fix-1144eec06b19

Best regards,

Signature · 1 line
Anshul Dalal <[email protected]>
Reviewed-by on v4 1/1
#1 lore raw
Quoted 11 lines · Anshul Dalal

Since the commit 1e24e84db41a ("tiny-printf: Handle formatting of %p with an extra Kconfig"), SPL_USE_TINY_PRINTF_POINTER_SUPPORT has been made mandatory in order to use %p which would earlier have defaulted to a 'long' print.

Without this config symbol, k3_sysfw_dfu_download fails to set the correct value for the DFU string with:

sprintf(dfu_str, "sysfw.itb ram 0x%p 0x%x", addr,
CONFIG_K3_SYSFW_IMAGE_SIZE_MAX);

Quoted 6 lines

The value we get "sysfw.itb ram 0x? 0x41c29d40" causes a boot failure.

Therefore this patch sets SPL_USE_TINY_PRINTF_POINTER_SUPPORT for all K3 devices since the size impact is less than 100 bytes.

Signature · 1 line
Tom
#2 lore raw
In reply to Anshul Dalal
Quoted 9 lines · Anshul Dalal

Since the commit 1e24e84db41a ("tiny-printf: Handle formatting of %p with an extra Kconfig"), SPL_USE_TINY_PRINTF_POINTER_SUPPORT has been made mandatory in order to use %p which would earlier have defaulted to a 'long' print.

Without this config symbol, k3_sysfw_dfu_download fails to set the correct value for the DFU string with:

[...]

Applied to u-boot/master, thanks!

[1/1] Kconfig: select SPL_USE_TINY_PRINTF_POINTER_SUPPORT for K3

      commit: cfce859b16ffc43c6eb0afb6c49c95e1ec25f5f1
Signature · 1 line
Tom