summaryrefslogtreecommitdiff
path: root/libcpu/aarch64/common/hypercall.h
diff options
context:
space:
mode:
authorShell <[email protected]>2022-12-20 17:49:37 +0800
committerGitHub <[email protected]>2022-12-20 17:49:37 +0800
commite8504c7cf1d03c07608e2197eaef728a6aecde7a (patch)
tree744bbacef2efbd8afbf04cc63e4d287b38ebcc65 /libcpu/aarch64/common/hypercall.h
parentf0ef8ada33833942684a6280314160de8c355302 (diff)
[smart/aarch64] code sync (#6750)
* [smart/aarch64] sync aarch64
Diffstat (limited to 'libcpu/aarch64/common/hypercall.h')
-rw-r--r--libcpu/aarch64/common/hypercall.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/libcpu/aarch64/common/hypercall.h b/libcpu/aarch64/common/hypercall.h
new file mode 100644
index 0000000000..e9599d7f78
--- /dev/null
+++ b/libcpu/aarch64/common/hypercall.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2006-2020, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
+ * Date Author Notes
+ * 2022-02-24 GuEe-GUI first version
+ */
+
+#ifndef __HYPERCALL_H__
+#define __HYPERCALL_H__
+
+#include <rtdef.h>
+
+rt_inline rt_uint32_t rt_hw_hypercall(rt_uint32_t w0, rt_uint64_t x1, rt_uint64_t x2,
+ rt_uint64_t x3, rt_uint64_t x4, rt_uint64_t x5, rt_uint64_t x6, rt_uint32_t w7)
+{
+ register rt_uint64_t ret __asm__ ("x0");
+ __asm__ volatile ("hvc #0");
+
+ return (rt_uint32_t)ret;
+}
+
+rt_err_t rt_hv_stage2_map(unsigned long paddr, unsigned long size);
+
+#endif