Commit 15ff24b14220b98637c95684268994c5cec95995
Committed by
Ye Li
1 parent
11c9620cd6
Exists in
smarc-imx_v2018.03_4.14.78_1.0.0_ga
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 Side-by-side Diff
arch/arm/include/asm/arch-imx8/sys_proto.h
arch/arm/mach-imx/imx8/Makefile
arch/arm/mach-imx/imx8/lowlevel_init.S
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 |