X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fspl.h;h=9a439f468b9b0ad876b7e2677ccd1dd4467fcc2f;hb=19ca29f3ff5811e058360aa275208d219b3078c2;hp=308ce7b563bf94ad11e4e4dcc3b1752d063a8dd6;hpb=6e6cf015e7cdd7ca83a933320a81201972bd5e5e;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/spl.h b/include/spl.h index 308ce7b..9a439f4 100644 --- a/include/spl.h +++ b/include/spl.h @@ -1,12 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2012 * Texas Instruments, - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef _SPL_H_ #define _SPL_H_ +#include + /* Platform-specific defines */ #include #include @@ -28,6 +29,7 @@ struct spl_image_info { #if CONFIG_IS_ENABLED(LOAD_FIT) void *fdt_addr; #endif + u32 boot_device; u32 size; u32 flags; void *arg; @@ -51,6 +53,15 @@ struct spl_load_info { void *buf); }; +/* + * We need to know the position of U-Boot in memory so we can jump to it. We + * allow any U-Boot binary to be used (u-boot.bin, u-boot-nodtb.bin, + * u-boot.img), hence the '_any'. These is no checking here that the correct + * image is found. For * example if u-boot.img is used we don't check that + * spl_parse_image_header() can parse a valid header. + */ +binman_sym_extern(ulong, u_boot_any, image_pos); + /** * spl_load_simple_fit() - Loads a fit image from a device. * @spl_image: Image description to set up @@ -71,6 +82,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, void preloader_console_init(void); u32 spl_boot_device(void); u32 spl_boot_mode(const u32 boot_device); +int spl_boot_partition(const u32 boot_device); void spl_set_bd(void); /** @@ -277,6 +289,19 @@ int spl_mmc_load_image(struct spl_image_info *spl_image, void spl_invoke_atf(struct spl_image_info *spl_image); /** + * spl_optee_entry - entry function for optee + * + * args defind in op-tee project + * https://github.com/OP-TEE/optee_os/ + * core/arch/arm/kernel/generic_entry_a32.S + * @arg0: pagestore + * @arg1: (ARMv7 standard bootarg #1) + * @arg2: device tree address, (ARMv7 standard bootarg #2) + * @arg3: non-secure entry address (ARMv7 bootarg #0) + */ +void spl_optee_entry(void *arg0, void *arg1, void *arg2, void *arg3); + +/** * board_return_to_bootrom - allow for boards to continue with the boot ROM * * If a board (e.g. the Rockchip RK3368 boards) provide some @@ -285,4 +310,19 @@ void spl_invoke_atf(struct spl_image_info *spl_image); * can implement 'board_return_to_bootrom'. */ void board_return_to_bootrom(void); + +/** + * spl_perform_fixups() - arch/board-specific callback before processing + * the boot-payload + */ +void spl_perform_fixups(struct spl_image_info *spl_image); + +/* + * spl_get_load_buffer() - get buffer for loading partial image data + * + * Returns memory area which can be populated by partial image data, + * ie. uImage or fitImage header. + */ +struct image_header *spl_get_load_buffer(ssize_t offset, size_t size); + #endif