diff mbox series

[v5,6/6] hw/arm/aspeed_ast27x0.c Fix boot issue for AST2700

Message ID 20250304064710.2128993-7-jamin_lin@aspeedtech.com (mailing list archive)
State New
Headers show
Series Fix hw-strap for AST2700 | expand

Commit Message

Jamin Lin March 4, 2025, 6:47 a.m. UTC
Currently, ASPEED_DEV_SPI_BOOT is set to "0x400000000", which is the DRAM start
address, and the QEMU loader is used to load the U-Boot binary into this address.

However, if users want to install FMC flash contents as a boot ROM, the DRAM
address 0x400000000 would be overwritten with Boot ROM data. This causes the
AST2700 to fail to boot because the U-Boot data becomes incorrect.

To fix this, change the ASPEED_DEV_SPI_BOOT address to "0x100000000", which is
the FMC0 memory-mapped start address in the AST2700.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
---
 hw/arm/aspeed_ast27x0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nabih Estefan March 6, 2025, 12:08 a.m. UTC | #1
> Currently, ASPEED_DEV_SPI_BOOT is set to "0x400000000", which is the DRAM start
> address, and the QEMU loader is used to load the U-Boot binary into this address.
> 
> However, if users want to install FMC flash contents as a boot ROM, the DRAM
> address 0x400000000 would be overwritten with Boot ROM data. This causes the
> AST2700 to fail to boot because the U-Boot data becomes incorrect.
> 
> To fix this, change the ASPEED_DEV_SPI_BOOT address to "0x100000000", which is
> the FMC0 memory-mapped start address in the AST2700.
> 
> Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
> Reviewed-by: Cédric Le Goater <clg@redhat.com>

Tested-by: Nabih Estefan <nabihestefan@google.com>

Thanks,
Nabih

> ---
>  hw/arm/aspeed_ast27x0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c
> index 92487bf229..10e1358166 100644
> --- a/hw/arm/aspeed_ast27x0.c
> +++ b/hw/arm/aspeed_ast27x0.c
> @@ -24,7 +24,7 @@
>  #include "qemu/log.h"
>  
>  static const hwaddr aspeed_soc_ast2700_memmap[] = {
> -    [ASPEED_DEV_SPI_BOOT]  =  0x400000000,
> +    [ASPEED_DEV_SPI_BOOT]  =  0x100000000,
>      [ASPEED_DEV_SRAM]      =  0x10000000,
>      [ASPEED_DEV_SDMC]      =  0x12C00000,
>      [ASPEED_DEV_SCU]       =  0x12C02000,
>
diff mbox series

Patch

diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c
index 92487bf229..10e1358166 100644
--- a/hw/arm/aspeed_ast27x0.c
+++ b/hw/arm/aspeed_ast27x0.c
@@ -24,7 +24,7 @@ 
 #include "qemu/log.h"
 
 static const hwaddr aspeed_soc_ast2700_memmap[] = {
-    [ASPEED_DEV_SPI_BOOT]  =  0x400000000,
+    [ASPEED_DEV_SPI_BOOT]  =  0x100000000,
     [ASPEED_DEV_SRAM]      =  0x10000000,
     [ASPEED_DEV_SDMC]      =  0x12C00000,
     [ASPEED_DEV_SCU]       =  0x12C02000,