booti/bootm: riscv: Verify image arch type
authorMayuresh Chitale <mchitale@ventanamicro.com>
Fri, 4 Apr 2025 14:48:57 +0000 (14:48 +0000)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Wed, 21 May 2025 08:45:56 +0000 (16:45 +0800)
commit37b0b22d8b7bbed6aa95b6daed06dcbf4a66f211
treec86ce56dafebd4bd4cba2624945c6d6ee5baf491
parent027a316828528da95a77d20632370b1bc2823f0b
booti/bootm: riscv: Verify image arch type

Unlike ARM and X86, booting 32-bit images on 64-bit CPUs is currently
not supported for Risc-V. Hence, for bootm, disallow booting a FIT
or a legacy image that was built for an arch type which is different
than the current arch and for booti, set the arch type to be the
same as the current arch.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
arch/riscv/lib/bootm.c
cmd/booti.c