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>
diff --git a/cmd/booti.c b/cmd/booti.c
index 1a57fe9..ced2c10 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -130,8 +130,11 @@
 	bootm_disable_interrupts();
 
 	images.os.os = IH_OS_LINUX;
-	if (IS_ENABLED(CONFIG_RISCV_SMODE))
-		images.os.arch = IH_ARCH_RISCV;
+	if (IS_ENABLED(CONFIG_RISCV))
+		if (IS_ENABLED(CONFIG_64BIT))
+			images.os.arch = IH_ARCH_RISCV64;
+		else
+			images.os.arch = IH_ARCH_RISCV;
 	else if (IS_ENABLED(CONFIG_ARM64))
 		images.os.arch = IH_ARCH_ARM64;