From b10f724807312a996100c7c4b779d320ed40d573 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Tue, 22 Mar 2022 16:59:14 -0400 Subject: arm: smh: Export semihosting functions This exports semihosting functions for use in other files. The header is in include/ and not arm/include/asm because I anticipate that RISC-V may want to add their own implementation at some point. smh_len_fd has been renamed to smh_flen to more closely match the semihosting spec. Signed-off-by: Sean Anderson --- include/semihosting.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 include/semihosting.h (limited to 'include/semihosting.h') diff --git a/include/semihosting.h b/include/semihosting.h new file mode 100644 index 00000000000..38438630465 --- /dev/null +++ b/include/semihosting.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2022 Sean Anderson + */ + +#ifndef _SEMIHOSTING_H +#define _SEMIHOSTING_H + +long smh_open(const char *fname, char *modestr); +long smh_read(long fd, void *memp, size_t len); +long smh_close(long fd); +long smh_flen(long fd); + +#endif /* _SEMIHOSTING_H */ -- cgit v1.2.3