guo ecf2d82159
sync branch rt-smart. (#6641)
* Synchronize the code of the rt mart branch to the master branch.
  * TTY device
  * Add lwP code from rt-smart
  * Add vnode in DFS, but DFS will be re-write for rt-smart
  * There are three libcpu for rt-smart:
    * arm/cortex-a, arm/aarch64
    * riscv64

Co-authored-by: Rbb666 <zhangbingru@rt-thread.com>
Co-authored-by: zhkag <zhkag@foxmail.com>
2022-12-03 12:07:44 +08:00

50 lines
1.0 KiB
C

/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-07-18 JasonHu first version
*/
#ifndef LWP_ARCH_H__
#define LWP_ARCH_H__
#include <lwp.h>
#include <lwp_arch_comm.h>
#include <stackframe.h>
#ifdef RT_USING_USERSPACE
#define USER_VADDR_TOP 0xFFFFF000UL
#define USER_HEAP_VEND 0xE0000000UL
#define USER_HEAP_VADDR 0x90000000UL
#define USER_STACK_VSTART 0x80000000UL
#define USER_STACK_VEND USER_HEAP_VADDR
#define LDSO_LOAD_VADDR 0x70000000UL
#define USER_VADDR_START 0x40000000UL
#define USER_LOAD_VADDR USER_VADDR_START
#define SIGNAL_RETURN_SYSCAL_ID 0xe000
#ifdef __cplusplus
extern "C" {
#endif
rt_thread_t rt_thread_sp_to_thread(void *spmember_addr);
void lwp_signal_do_return(rt_hw_stack_frame_t *frame);
rt_inline unsigned long rt_hw_ffz(unsigned long x)
{
return __builtin_ffsl(~x) - 1;
}
#ifdef __cplusplus
}
#endif
#endif /* RT_USING_USERSPACE */
#endif /*LWP_ARCH_H__*/