lwp_arch.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. */
  9. #ifndef LWP_ARCH_H__
  10. #define LWP_ARCH_H__
  11. #include <lwp.h>
  12. #include <lwp_arch_comm.h>
  13. #ifdef ARCH_MM_MMU
  14. #define USER_VADDR_TOP 0xC0000000UL
  15. #define USER_HEAP_VEND 0xB0000000UL
  16. #define USER_HEAP_VADDR 0x80000000UL
  17. #define USER_STACK_VSTART 0x70000000UL
  18. #define USER_STACK_VEND USER_HEAP_VADDR
  19. #define LDSO_LOAD_VADDR 0x60000000UL
  20. #define USER_VADDR_START 0x00100000UL
  21. #define USER_LOAD_VADDR USER_VADDR_START
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. rt_inline unsigned long rt_hw_ffz(unsigned long x)
  26. {
  27. return __builtin_ffsl(~x) - 1;
  28. }
  29. rt_inline void icache_invalid_all(void)
  30. {
  31. asm volatile ("mcr p15, 0, r0, c7, c5, 0\ndsb\nisb":::"memory");//iciallu
  32. }
  33. unsigned int arch_get_asid(struct rt_lwp *lwp);
  34. struct signal_regs;
  35. void *arch_signal_ucontext_restore(rt_base_t user_sp);
  36. void *arch_signal_ucontext_save(rt_base_t lr, siginfo_t *psiginfo,
  37. struct signal_regs *exp_frame, rt_base_t user_sp,
  38. lwp_sigset_t *save_sig_mask);
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif
  43. #endif /*LWP_ARCH_H__*/