mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 05:42:58 +00:00
261d27605c
The armv8 ARM Trusted Firmware (ATF) can be used to load various ATF images and u-boot, and does this for virtual platforms by using semihosting. This commit extends this idea by allowing u-boot to also use semihosting to load the kernel/ramdisk/dtb. This eliminates the need for a bootwrapper and produces a more realistic boot sequence with virtual models. Though the semihosting code is quite generic, support for armv7 in fastmodel is less useful due to the wide range of available silicon and the lack of a free armv7 fastmodel, so this change contains an untested armv7 placeholder for the service trap opcode. Please refer to doc/README.semihosting for a more detailed description of semihosting and how it is used with the armv8 virtual platforms. Signed-off-by: Darwin Rambo <drambo@broadcom.com> Cc: trini@ti.com Cc: fenghua@phytium.com.cn Cc: bhupesh.sharma@freescale.com
21 lines
522 B
C
21 lines
522 B
C
/*
|
|
* Copyright 2014 Broadcom Corporation
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#ifndef __SEMIHOSTING_H__
|
|
#define __SEMIHOSTING_H__
|
|
|
|
/*
|
|
* ARM semihosting functions for loading images to memory. See the source
|
|
* code for more information.
|
|
*/
|
|
int smh_load(const char *fname, void *memp, int avail, int verbose);
|
|
int smh_read(int fd, void *memp, int len);
|
|
int smh_open(const char *fname, char *modestr);
|
|
int smh_close(int fd);
|
|
int smh_len_fd(int fd);
|
|
int smh_len(const char *fname);
|
|
|
|
#endif /* __SEMIHOSTING_H__ */
|