u-boot-brain/arch/arm/include/asm/semihosting.h
Darwin Rambo 261d27605c arm: Add support for semihosting for armv8 fastmodel targets.
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
2014-07-03 08:35:45 +02:00

22 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__ */