diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/arch-imx8/sys_proto.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx8/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-imx/imx8/lowlevel_init.S | 33 |
3 files changed, 35 insertions, 1 deletions
diff --git a/arch/arm/include/asm/arch-imx8/sys_proto.h b/arch/arm/include/asm/arch-imx8/sys_proto.h index 26078fcfc14..c2641513054 100644 --- a/arch/arm/include/asm/arch-imx8/sys_proto.h +++ b/arch/arm/include/asm/arch-imx8/sys_proto.h @@ -19,4 +19,5 @@ struct pass_over_info_t { int print_bootinfo(void); int init_otg_power(void); void power_off_pd_devices(const char* permanent_on_devices[], int size); +extern unsigned long rom_pointer[]; enum boot_device get_boot_device(void); diff --git a/arch/arm/mach-imx/imx8/Makefile b/arch/arm/mach-imx/imx8/Makefile index fff241ebf7d..e3be955b2db 100644 --- a/arch/arm/mach-imx/imx8/Makefile +++ b/arch/arm/mach-imx/imx8/Makefile @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: GPL-2.0+ # - +obj-y += lowlevel_init.o obj-y += cpu.o obj-y += clock.o obj-y += fsl_mu_hal.o diff --git a/arch/arm/mach-imx/imx8/lowlevel_init.S b/arch/arm/mach-imx/imx8/lowlevel_init.S new file mode 100644 index 00000000000..141b82dcb90 --- /dev/null +++ b/arch/arm/mach-imx/imx8/lowlevel_init.S @@ -0,0 +1,33 @@ +/* + * Copyright 2017 NXP + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <config.h> + +.align 8 +.global rom_pointer +rom_pointer: + .space 32 + +/* + * Routine: save_boot_params (called after reset from start.S) + */ + +.global save_boot_params +save_boot_params: + /* The firmware provided ATAG/FDT address can be found in r2/x0 */ + adr x0, rom_pointer + stp x1, x2, [x0], #16 + stp x3, x4, [x0], #16 + + /* Returns */ + b save_boot_params_ret + +.global restore_boot_params +restore_boot_params: + adr x0, rom_pointer + ldp x1, x2, [x0], #16 + ldp x3, x4, [x0], #16 + ret |