diff options
| author | Shell <[email protected]> | 2024-06-28 00:23:09 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-28 00:23:09 +0800 |
| commit | 90917cc75af9406834c14fd25140405ba6f72d6d (patch) | |
| tree | e5ac39bbcb922d380a272c4d80ed439ad316604b /libcpu/aarch64/common/include/hypercall.h | |
| parent | 3d8c27bcc998c0a43aedc069a4a826e349b85485 (diff) | |
[format] cleanup libcpu/aarch64 (#8950)
* [dfs] fixup compiler warning
Signed-off-by: Shell <[email protected]>
* [format] libcpu/arm64: separate context switching codes
Signed-off-by: Shell <[email protected]>
* [format] libcpu/arm64: separate vector
Signed-off-by: Shell <[email protected]>
* [format] libcpu/arm64: separate context_gcc.S
Signed-off-by: Shell <[email protected]>
* [format] libcpu/arm64: moving headers to include directory
Signed-off-by: Shell <[email protected]>
* style: replace tab with space
---------
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'libcpu/aarch64/common/include/hypercall.h')
| -rw-r--r-- | libcpu/aarch64/common/include/hypercall.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libcpu/aarch64/common/include/hypercall.h b/libcpu/aarch64/common/include/hypercall.h new file mode 100644 index 0000000000..e9599d7f78 --- /dev/null +++ b/libcpu/aarch64/common/include/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 |
