hypercall.h 638 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-02-24 GuEe-GUI first version
  9. */
  10. #ifndef __HYPERCALL_H__
  11. #define __HYPERCALL_H__
  12. #include <rtdef.h>
  13. rt_inline rt_uint32_t rt_hw_hypercall(rt_uint32_t w0, rt_uint64_t x1, rt_uint64_t x2,
  14. rt_uint64_t x3, rt_uint64_t x4, rt_uint64_t x5, rt_uint64_t x6, rt_uint32_t w7)
  15. {
  16. register rt_uint64_t ret __asm__ ("x0");
  17. __asm__ volatile ("hvc #0");
  18. return (rt_uint32_t)ret;
  19. }
  20. rt_err_t rt_hv_stage2_map(unsigned long paddr, unsigned long size);
  21. #endif