All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] configs: clearfog,helios4: disable sdhci sdma
@ 2025-02-08 12:22 Josua Mayer
  2025-02-27  9:28 ` Stefan Roese
  2025-04-16 13:32 ` Stefan Roese
  0 siblings, 2 replies; 4+ messages in thread
From: Josua Mayer @ 2025-02-08 12:22 UTC (permalink / raw)
  To: Stefan Roese, Tom Rini, Dennis Gilmore; +Cc: u-boot, Josua Mayer

Testing has shown that loading large initramfs causes data corruption
where the kernel image had been loaded to.
Debian 12 installation using a 17M initramfs boots fine, but the final
system with an initramfs of 27M obscurely fails to boot with bootz
reporting "Bad magic!".
Inspecting kernel_addr_r after this failed boot attempt does show
garbage in place of the expected zimage header.

The problem seems to occur on armada 388 only when sdhci sdma is enabled
in defconfig. Other armada boards such as turris omnia did not enable
the option.

Remove sdhci sdma from defconfig for now as a workaround.

Signed-off-by: Josua Mayer <josua@solid-run.com>
---
Changes in v2:
- changed *all* a388 clearfog_* defconfig files
- Link to v1: https://lore.kernel.org/r/20250208-a388-kerneladdr-v1-1-1ed91f642c2d@solid-run.com
---
 configs/clearfog_defconfig      | 1 -
 configs/clearfog_sata_defconfig | 1 -
 configs/clearfog_spi_defconfig  | 1 -
 configs/helios4_defconfig       | 1 -
 4 files changed, 4 deletions(-)

diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
index 6f6597c5331f4aadf827b40a8f2864722585fda9..a139d7cb463167f59931fd4a151a309c29ba3a44 100644
--- a/configs/clearfog_defconfig
+++ b/configs/clearfog_defconfig
@@ -60,7 +60,6 @@ CONFIG_SYS_I2C_MVTWSI=y
 CONFIG_I2C_EEPROM=y
 CONFIG_SPL_I2C_EEPROM=y
 CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_MV=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/clearfog_sata_defconfig b/configs/clearfog_sata_defconfig
index 491a27321f9c52af3bd28da546b7065b0aaf38e0..b927532a8c7e99632aa7c45cb809115be9524e04 100644
--- a/configs/clearfog_sata_defconfig
+++ b/configs/clearfog_sata_defconfig
@@ -61,7 +61,6 @@ CONFIG_I2C_EEPROM=y
 CONFIG_SPL_I2C_EEPROM=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_MV=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/clearfog_spi_defconfig b/configs/clearfog_spi_defconfig
index d3de1657c09ac8afb7655094d88b649f711e36b7..85be40db48536ca153d0dae8eda69532745b5526 100644
--- a/configs/clearfog_spi_defconfig
+++ b/configs/clearfog_spi_defconfig
@@ -61,7 +61,6 @@ CONFIG_I2C_EEPROM=y
 CONFIG_SPL_I2C_EEPROM=y
 CONFIG_SUPPORT_EMMC_BOOT=y
 CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_MV=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig
index 2778cb7dc8680191155582da14a21b6a521fdef1..baf7c9396362fd9f6a8e527e27e8ad75a1fe643e 100644
--- a/configs/helios4_defconfig
+++ b/configs/helios4_defconfig
@@ -60,7 +60,6 @@ CONFIG_SYS_I2C_MVTWSI=y
 CONFIG_I2C_EEPROM=y
 CONFIG_SPL_I2C_EEPROM=y
 CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_MV=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_MTD=y

---
base-commit: ac3dcb0c2710c4917d93d6d2eb34dbfb00516bc2
change-id: 20250207-a388-kerneladdr-23438bb34215

Best regards,
-- 
Josua Mayer <josua@solid-run.com>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] configs: clearfog,helios4: disable sdhci sdma
  2025-02-08 12:22 [PATCH v2] configs: clearfog,helios4: disable sdhci sdma Josua Mayer
@ 2025-02-27  9:28 ` Stefan Roese
  2025-02-27  9:43   ` Josua Mayer
  2025-04-16 13:32 ` Stefan Roese
  1 sibling, 1 reply; 4+ messages in thread
From: Stefan Roese @ 2025-02-27  9:28 UTC (permalink / raw)
  To: Josua Mayer, Tom Rini, Dennis Gilmore; +Cc: u-boot

On 08.02.25 13:22, Josua Mayer wrote:
> Testing has shown that loading large initramfs causes data corruption
> where the kernel image had been loaded to.
> Debian 12 installation using a 17M initramfs boots fine, but the final
> system with an initramfs of 27M obscurely fails to boot with bootz
> reporting "Bad magic!".
> Inspecting kernel_addr_r after this failed boot attempt does show
> garbage in place of the expected zimage header.
> 
> The problem seems to occur on armada 388 only when sdhci sdma is enabled
> in defconfig. Other armada boards such as turris omnia did not enable
> the option.
> 
> Remove sdhci sdma from defconfig for now as a workaround.
> 
> Signed-off-by: Josua Mayer <josua@solid-run.com>
> ---
> Changes in v2:
> - changed *all* a388 clearfog_* defconfig files
> - Link to v1: https://lore.kernel.org/r/20250208-a388-kerneladdr-v1-1-1ed91f642c2d@solid-run.com

Josua, do you plan to look into this issue to perhaps fix the
root cause at some point?

For now:

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   configs/clearfog_defconfig      | 1 -
>   configs/clearfog_sata_defconfig | 1 -
>   configs/clearfog_spi_defconfig  | 1 -
>   configs/helios4_defconfig       | 1 -
>   4 files changed, 4 deletions(-)
> 
> diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
> index 6f6597c5331f4aadf827b40a8f2864722585fda9..a139d7cb463167f59931fd4a151a309c29ba3a44 100644
> --- a/configs/clearfog_defconfig
> +++ b/configs/clearfog_defconfig
> @@ -60,7 +60,6 @@ CONFIG_SYS_I2C_MVTWSI=y
>   CONFIG_I2C_EEPROM=y
>   CONFIG_SPL_I2C_EEPROM=y
>   CONFIG_MMC_SDHCI=y
> -CONFIG_MMC_SDHCI_SDMA=y
>   CONFIG_MMC_SDHCI_MV=y
>   CONFIG_SPI_FLASH_WINBOND=y
>   CONFIG_SPI_FLASH_MTD=y
> diff --git a/configs/clearfog_sata_defconfig b/configs/clearfog_sata_defconfig
> index 491a27321f9c52af3bd28da546b7065b0aaf38e0..b927532a8c7e99632aa7c45cb809115be9524e04 100644
> --- a/configs/clearfog_sata_defconfig
> +++ b/configs/clearfog_sata_defconfig
> @@ -61,7 +61,6 @@ CONFIG_I2C_EEPROM=y
>   CONFIG_SPL_I2C_EEPROM=y
>   CONFIG_SUPPORT_EMMC_BOOT=y
>   CONFIG_MMC_SDHCI=y
> -CONFIG_MMC_SDHCI_SDMA=y
>   CONFIG_MMC_SDHCI_MV=y
>   CONFIG_SPI_FLASH_WINBOND=y
>   CONFIG_SPI_FLASH_MTD=y
> diff --git a/configs/clearfog_spi_defconfig b/configs/clearfog_spi_defconfig
> index d3de1657c09ac8afb7655094d88b649f711e36b7..85be40db48536ca153d0dae8eda69532745b5526 100644
> --- a/configs/clearfog_spi_defconfig
> +++ b/configs/clearfog_spi_defconfig
> @@ -61,7 +61,6 @@ CONFIG_I2C_EEPROM=y
>   CONFIG_SPL_I2C_EEPROM=y
>   CONFIG_SUPPORT_EMMC_BOOT=y
>   CONFIG_MMC_SDHCI=y
> -CONFIG_MMC_SDHCI_SDMA=y
>   CONFIG_MMC_SDHCI_MV=y
>   CONFIG_SPI_FLASH_WINBOND=y
>   CONFIG_SPI_FLASH_MTD=y
> diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig
> index 2778cb7dc8680191155582da14a21b6a521fdef1..baf7c9396362fd9f6a8e527e27e8ad75a1fe643e 100644
> --- a/configs/helios4_defconfig
> +++ b/configs/helios4_defconfig
> @@ -60,7 +60,6 @@ CONFIG_SYS_I2C_MVTWSI=y
>   CONFIG_I2C_EEPROM=y
>   CONFIG_SPL_I2C_EEPROM=y
>   CONFIG_MMC_SDHCI=y
> -CONFIG_MMC_SDHCI_SDMA=y
>   CONFIG_MMC_SDHCI_MV=y
>   CONFIG_SPI_FLASH_WINBOND=y
>   CONFIG_SPI_FLASH_MTD=y
> 
> ---
> base-commit: ac3dcb0c2710c4917d93d6d2eb34dbfb00516bc2
> change-id: 20250207-a388-kerneladdr-23438bb34215
> 
> Best regards,

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] configs: clearfog,helios4: disable sdhci sdma
  2025-02-27  9:28 ` Stefan Roese
@ 2025-02-27  9:43   ` Josua Mayer
  0 siblings, 0 replies; 4+ messages in thread
From: Josua Mayer @ 2025-02-27  9:43 UTC (permalink / raw)
  To: Stefan Roese, Tom Rini, Dennis Gilmore; +Cc: u-boot@lists.denx.de

Am 27.02.25 um 10:28 schrieb Stefan Roese:
> On 08.02.25 13:22, Josua Mayer wrote:
>> Testing has shown that loading large initramfs causes data corruption
>> where the kernel image had been loaded to.
>> Debian 12 installation using a 17M initramfs boots fine, but the final
>> system with an initramfs of 27M obscurely fails to boot with bootz
>> reporting "Bad magic!".
>> Inspecting kernel_addr_r after this failed boot attempt does show
>> garbage in place of the expected zimage header.
>>
>> The problem seems to occur on armada 388 only when sdhci sdma is enabled
>> in defconfig. Other armada boards such as turris omnia did not enable
>> the option.
>>
>> Remove sdhci sdma from defconfig for now as a workaround.
>>
>> Signed-off-by: Josua Mayer <josua@solid-run.com>
>> ---
>> Changes in v2:
>> - changed *all* a388 clearfog_* defconfig files
>> - Link to v1: 
>> https://lore.kernel.org/r/20250208-a388-kerneladdr-v1-1-1ed91f642c2d@solid-run.com
>
> Josua, do you plan to look into this issue to perhaps fix the
> root cause at some point?
Unfortunately I won't have time to focus on this platform in depth,
with the Armada 388 soon reaching its end of life per Marvell.

Sales and management want to focus on new opportunities.

My only guess so far is the observation that environment
"loadaddr" was equal to the memory buffer address used by
CONFIG_MMC_SDHCI_SDMA

Changing it however didn't seem to resolve the issue.

I am also wondering if SPL may have the same issue,
though it never loads anything as big as kernel or ramdisk.

Anyone interested in working on this by themselves may
reach out to me with questions.

>
> For now:
>
> Reviewed-by: Stefan Roese <sr@denx.de>
Thanks!
>
> Thanks,
> Stefan
>
>> ---
>>   configs/clearfog_defconfig      | 1 -
>>   configs/clearfog_sata_defconfig | 1 -
>>   configs/clearfog_spi_defconfig  | 1 -
>>   configs/helios4_defconfig       | 1 -
>>   4 files changed, 4 deletions(-)
>>
>> diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
>> index 
>> 6f6597c5331f4aadf827b40a8f2864722585fda9..a139d7cb463167f59931fd4a151a309c29ba3a44 
>> 100644
>> --- a/configs/clearfog_defconfig
>> +++ b/configs/clearfog_defconfig
>> @@ -60,7 +60,6 @@ CONFIG_SYS_I2C_MVTWSI=y
>>   CONFIG_I2C_EEPROM=y
>>   CONFIG_SPL_I2C_EEPROM=y
>>   CONFIG_MMC_SDHCI=y
>> -CONFIG_MMC_SDHCI_SDMA=y
>>   CONFIG_MMC_SDHCI_MV=y
>>   CONFIG_SPI_FLASH_WINBOND=y
>>   CONFIG_SPI_FLASH_MTD=y
>> diff --git a/configs/clearfog_sata_defconfig 
>> b/configs/clearfog_sata_defconfig
>> index 
>> 491a27321f9c52af3bd28da546b7065b0aaf38e0..b927532a8c7e99632aa7c45cb809115be9524e04 
>> 100644
>> --- a/configs/clearfog_sata_defconfig
>> +++ b/configs/clearfog_sata_defconfig
>> @@ -61,7 +61,6 @@ CONFIG_I2C_EEPROM=y
>>   CONFIG_SPL_I2C_EEPROM=y
>>   CONFIG_SUPPORT_EMMC_BOOT=y
>>   CONFIG_MMC_SDHCI=y
>> -CONFIG_MMC_SDHCI_SDMA=y
>>   CONFIG_MMC_SDHCI_MV=y
>>   CONFIG_SPI_FLASH_WINBOND=y
>>   CONFIG_SPI_FLASH_MTD=y
>> diff --git a/configs/clearfog_spi_defconfig 
>> b/configs/clearfog_spi_defconfig
>> index 
>> d3de1657c09ac8afb7655094d88b649f711e36b7..85be40db48536ca153d0dae8eda69532745b5526 
>> 100644
>> --- a/configs/clearfog_spi_defconfig
>> +++ b/configs/clearfog_spi_defconfig
>> @@ -61,7 +61,6 @@ CONFIG_I2C_EEPROM=y
>>   CONFIG_SPL_I2C_EEPROM=y
>>   CONFIG_SUPPORT_EMMC_BOOT=y
>>   CONFIG_MMC_SDHCI=y
>> -CONFIG_MMC_SDHCI_SDMA=y
>>   CONFIG_MMC_SDHCI_MV=y
>>   CONFIG_SPI_FLASH_WINBOND=y
>>   CONFIG_SPI_FLASH_MTD=y
>> diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig
>> index 
>> 2778cb7dc8680191155582da14a21b6a521fdef1..baf7c9396362fd9f6a8e527e27e8ad75a1fe643e 
>> 100644
>> --- a/configs/helios4_defconfig
>> +++ b/configs/helios4_defconfig
>> @@ -60,7 +60,6 @@ CONFIG_SYS_I2C_MVTWSI=y
>>   CONFIG_I2C_EEPROM=y
>>   CONFIG_SPL_I2C_EEPROM=y
>>   CONFIG_MMC_SDHCI=y
>> -CONFIG_MMC_SDHCI_SDMA=y
>>   CONFIG_MMC_SDHCI_MV=y
>>   CONFIG_SPI_FLASH_WINBOND=y
>>   CONFIG_SPI_FLASH_MTD=y
>>
>> ---
>> base-commit: ac3dcb0c2710c4917d93d6d2eb34dbfb00516bc2
>> change-id: 20250207-a388-kerneladdr-23438bb34215
>>
>> Best regards,
>
> Viele Grüße,
> Stefan Roese
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] configs: clearfog,helios4: disable sdhci sdma
  2025-02-08 12:22 [PATCH v2] configs: clearfog,helios4: disable sdhci sdma Josua Mayer
  2025-02-27  9:28 ` Stefan Roese
@ 2025-04-16 13:32 ` Stefan Roese
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2025-04-16 13:32 UTC (permalink / raw)
  To: Josua Mayer, Tom Rini, Dennis Gilmore; +Cc: u-boot

On 08.02.25 13:22, Josua Mayer wrote:
> Testing has shown that loading large initramfs causes data corruption
> where the kernel image had been loaded to.
> Debian 12 installation using a 17M initramfs boots fine, but the final
> system with an initramfs of 27M obscurely fails to boot with bootz
> reporting "Bad magic!".
> Inspecting kernel_addr_r after this failed boot attempt does show
> garbage in place of the expected zimage header.
> 
> The problem seems to occur on armada 388 only when sdhci sdma is enabled
> in defconfig. Other armada boards such as turris omnia did not enable
> the option.
> 
> Remove sdhci sdma from defconfig for now as a workaround.
> 
> Signed-off-by: Josua Mayer <josua@solid-run.com>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
> Changes in v2:
> - changed *all* a388 clearfog_* defconfig files
> - Link to v1: https://lore.kernel.org/r/20250208-a388-kerneladdr-v1-1-1ed91f642c2d@solid-run.com
> ---
>   configs/clearfog_defconfig      | 1 -
>   configs/clearfog_sata_defconfig | 1 -
>   configs/clearfog_spi_defconfig  | 1 -
>   configs/helios4_defconfig       | 1 -
>   4 files changed, 4 deletions(-)
> 
> diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
> index 6f6597c5331f4aadf827b40a8f2864722585fda9..a139d7cb463167f59931fd4a151a309c29ba3a44 100644
> --- a/configs/clearfog_defconfig
> +++ b/configs/clearfog_defconfig
> @@ -60,7 +60,6 @@ CONFIG_SYS_I2C_MVTWSI=y
>   CONFIG_I2C_EEPROM=y
>   CONFIG_SPL_I2C_EEPROM=y
>   CONFIG_MMC_SDHCI=y
> -CONFIG_MMC_SDHCI_SDMA=y
>   CONFIG_MMC_SDHCI_MV=y
>   CONFIG_SPI_FLASH_WINBOND=y
>   CONFIG_SPI_FLASH_MTD=y
> diff --git a/configs/clearfog_sata_defconfig b/configs/clearfog_sata_defconfig
> index 491a27321f9c52af3bd28da546b7065b0aaf38e0..b927532a8c7e99632aa7c45cb809115be9524e04 100644
> --- a/configs/clearfog_sata_defconfig
> +++ b/configs/clearfog_sata_defconfig
> @@ -61,7 +61,6 @@ CONFIG_I2C_EEPROM=y
>   CONFIG_SPL_I2C_EEPROM=y
>   CONFIG_SUPPORT_EMMC_BOOT=y
>   CONFIG_MMC_SDHCI=y
> -CONFIG_MMC_SDHCI_SDMA=y
>   CONFIG_MMC_SDHCI_MV=y
>   CONFIG_SPI_FLASH_WINBOND=y
>   CONFIG_SPI_FLASH_MTD=y
> diff --git a/configs/clearfog_spi_defconfig b/configs/clearfog_spi_defconfig
> index d3de1657c09ac8afb7655094d88b649f711e36b7..85be40db48536ca153d0dae8eda69532745b5526 100644
> --- a/configs/clearfog_spi_defconfig
> +++ b/configs/clearfog_spi_defconfig
> @@ -61,7 +61,6 @@ CONFIG_I2C_EEPROM=y
>   CONFIG_SPL_I2C_EEPROM=y
>   CONFIG_SUPPORT_EMMC_BOOT=y
>   CONFIG_MMC_SDHCI=y
> -CONFIG_MMC_SDHCI_SDMA=y
>   CONFIG_MMC_SDHCI_MV=y
>   CONFIG_SPI_FLASH_WINBOND=y
>   CONFIG_SPI_FLASH_MTD=y
> diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig
> index 2778cb7dc8680191155582da14a21b6a521fdef1..baf7c9396362fd9f6a8e527e27e8ad75a1fe643e 100644
> --- a/configs/helios4_defconfig
> +++ b/configs/helios4_defconfig
> @@ -60,7 +60,6 @@ CONFIG_SYS_I2C_MVTWSI=y
>   CONFIG_I2C_EEPROM=y
>   CONFIG_SPL_I2C_EEPROM=y
>   CONFIG_MMC_SDHCI=y
> -CONFIG_MMC_SDHCI_SDMA=y
>   CONFIG_MMC_SDHCI_MV=y
>   CONFIG_SPI_FLASH_WINBOND=y
>   CONFIG_SPI_FLASH_MTD=y
> 
> ---
> base-commit: ac3dcb0c2710c4917d93d6d2eb34dbfb00516bc2
> change-id: 20250207-a388-kerneladdr-23438bb34215
> 
> Best regards,

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-16 13:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-08 12:22 [PATCH v2] configs: clearfog,helios4: disable sdhci sdma Josua Mayer
2025-02-27  9:28 ` Stefan Roese
2025-02-27  9:43   ` Josua Mayer
2025-04-16 13:32 ` Stefan Roese

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.