Skip to contentSkip to conversation

imx8m: implement armv8_el2_to_aarch32

PATCH New peng.fan at nxp.com 1 participant 2 messages Jul 10, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 imx8m: implement armv8_el2_to_aarch32

From: Peng Fan <[email protected]>

Add iMX8M specific armv8_el2_to_aarch32 to let AArch64 mode U-Boot could boot aarch32 mode linux with FIT image as below:

/dts-v1/;

/ {
        description = "Configuration to load ARM32 Linux";

        images {
                kernel at 1 {
                        description = "ARM32 Linux kernel";
                        data = /incbin/("./Image");
                        type = "kernel";
                        arch = "arm";
                        os = "linux";
                        compression = "none";
                        load = <0x40008000>;
                        entry = <0x40008000>;
                        hash at 1 {
                                algo = "md5";
                        };
                };
                fdt at 1 {
                        description = "Flattened Device Tree blob";
                        data = /incbin/("./imx8mm-evk.dtb");
                        type = "flat_dt";
                        arch = "arm";
                        compression = "none";
                        load = <0x43000000>;
                        hash at 1 {
                                algo = "md5";
                        };
                };
        };
        configurations {
                default = "config at 1";

                config at 1 {
                        description = "fsl-imx8mm-evk";
                        kernel = "kernel at 1";
                        fdt = "fdt at 1";
                };
        };
};
---
 arch/arm/mach-imx/imx8m/lowlevel_init.S | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm/mach-imx/imx8m/lowlevel_init.S +12 -0
index a4c6466ca9..a49a9cdb35 100644
@@ -60,3 +60,15 @@ restore_boot_params:
 	ldr	x0, [x0]
 	mov	sp, x0
 	ret
+
+.global armv8_el2_to_aarch32
+armv8_el2_to_aarch32:
+	cmp     x0, #0
+	bne     0f
+	mov     x3, x2
+	mov     x2, x1
+	mov     x1, x4
+	ldr x0, =0xc20000fd
+0:
+	smc #0
+	ret
Signature · 1 line
2.16.4
#1 lore raw

PATCH 2/2 imx8mm_evk: enlarge CONFIG_SYS_BOOTM_LEN

From: Peng Fan <[email protected]>

Enlarge CONFIG_SYS_BOOTM_LEN when booting FIT image with kernel.

---
 include/configs/imx8mm_evk.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/imx8mm_evk.h +1 -0
index 382ba620cc..d1c0e0ec2e 100644
@@ -10,6 +10,7 @@
 #include <linux/stringify.h>
 #include <asm/arch/imx-regs.h>
 
+#define CONFIG_SYS_BOOTM_LEN		(32 * SZ_1M)
 #define CONFIG_SPL_MAX_SIZE		(148 * 1024)
 #define CONFIG_SYS_MONITOR_LEN		SZ_512K
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
Signature · 1 line
2.16.4