Commit 15ff24b14220b98637c95684268994c5cec95995

Authored by Silvano di Ninno
Committed by Ye Li
1 parent 11c9620cd6

TEE-329-1: OP-TEE: Allow ATF to pass boot arg to u-boot

u-boot currently needs information from ATF to know if
OP-TEE os has been loaded.
this information is transmitted via bootargs.
this patch enables saving those bootargs into a structure.

Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
(cherry picked from commit 697cfe9dbdc079b68d8b5685b728a7283c837607)

Showing 3 changed files with 35 additions and 1 deletions Inline Diff

arch/arm/include/asm/arch-imx8/sys_proto.h
1 /* 1 /*
2 * Copyright (C) 2017 NXP 2 * Copyright (C) 2017 NXP
3 * 3 *
4 * SPDX-License-Identifier: GPL-2.0+ 4 * SPDX-License-Identifier: GPL-2.0+
5 */ 5 */
6 6
7 #include <asm/mach-imx/sys_proto.h> 7 #include <asm/mach-imx/sys_proto.h>
8 #include <linux/types.h> 8 #include <linux/types.h>
9 9
10 struct pass_over_info_t { 10 struct pass_over_info_t {
11 uint16_t barker; 11 uint16_t barker;
12 uint16_t len; 12 uint16_t len;
13 uint32_t g_bt_cfg_shadow; 13 uint32_t g_bt_cfg_shadow;
14 uint32_t card_address_mode; 14 uint32_t card_address_mode;
15 uint32_t bad_block_count_met; 15 uint32_t bad_block_count_met;
16 uint32_t g_ap_mu; 16 uint32_t g_ap_mu;
17 }; 17 };
18 18
19 int print_bootinfo(void); 19 int print_bootinfo(void);
20 int init_otg_power(void); 20 int init_otg_power(void);
21 void power_off_pd_devices(const char* permanent_on_devices[], int size); 21 void power_off_pd_devices(const char* permanent_on_devices[], int size);
22 extern unsigned long rom_pointer[];
22 enum boot_device get_boot_device(void); 23 enum boot_device get_boot_device(void);
23 24
arch/arm/mach-imx/imx8/Makefile
1 # 1 #
2 # Copyright 2017 NXP 2 # Copyright 2017 NXP
3 # 3 #
4 # SPDX-License-Identifier: GPL-2.0+ 4 # SPDX-License-Identifier: GPL-2.0+
5 # 5 #
6 6 obj-y += lowlevel_init.o
7 obj-y += cpu.o 7 obj-y += cpu.o
8 obj-y += clock.o 8 obj-y += clock.o
9 obj-y += fsl_mu_hal.o 9 obj-y += fsl_mu_hal.o
10 obj-y += fuse.o 10 obj-y += fuse.o
11 obj-y += iomux.o 11 obj-y += iomux.o
12 obj-y += image.o 12 obj-y += image.o
13 obj-$(CONFIG_SPL_BUILD) += parser.o 13 obj-$(CONFIG_SPL_BUILD) += parser.o
14 ifneq ($(CONFIG_SPL_BUILD),y) 14 ifneq ($(CONFIG_SPL_BUILD),y)
15 obj-y += partition.o 15 obj-y += partition.o
16 endif 16 endif
17 obj-$(CONFIG_AHAB_BOOT) += ahab.o 17 obj-$(CONFIG_AHAB_BOOT) += ahab.o
18 obj-$(CONFIG_VIDEO_IMXDPUV1) += video_common.o 18 obj-$(CONFIG_VIDEO_IMXDPUV1) += video_common.o
19 19
arch/arm/mach-imx/imx8/lowlevel_init.S
File was created 1 /*
2 * Copyright 2017 NXP
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7 #include <config.h>
8
9 .align 8
10 .global rom_pointer
11 rom_pointer:
12 .space 32
13
14 /*
15 * Routine: save_boot_params (called after reset from start.S)
16 */
17
18 .global save_boot_params
19 save_boot_params:
20 /* The firmware provided ATAG/FDT address can be found in r2/x0 */
21 adr x0, rom_pointer
22 stp x1, x2, [x0], #16
23 stp x3, x4, [x0], #16
24
25 /* Returns */
26 b save_boot_params_ret
27
28 .global restore_boot_params
29 restore_boot_params:
30 adr x0, rom_pointer
31 ldp x1, x2, [x0], #16
32 ldp x3, x4, [x0], #16
33 ret
34