arch/or1k: Remove FAR from chip folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
0bd9a66305
commit
3c82094156
@ -106,12 +106,12 @@ struct group_addrenv_s
|
||||
{
|
||||
/* Level 1 page table entries for each group section */
|
||||
|
||||
FAR uintptr_t *text[ARCH_TEXT_NSECTS];
|
||||
FAR uintptr_t *data[ARCH_DATA_NSECTS];
|
||||
uintptr_t *text[ARCH_TEXT_NSECTS];
|
||||
uintptr_t *data[ARCH_DATA_NSECTS];
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
FAR uintptr_t *heap[ARCH_HEAP_NSECTS];
|
||||
uintptr_t *heap[ARCH_HEAP_NSECTS];
|
||||
#ifdef CONFIG_MM_SHM
|
||||
FAR uintptr_t *shm[ARCH_SHM_NSECTS];
|
||||
uintptr_t *shm[ARCH_SHM_NSECTS];
|
||||
#endif
|
||||
|
||||
/* Initial heap allocation (in bytes). This exists only provide an
|
||||
@ -137,12 +137,12 @@ typedef struct group_addrenv_s group_addrenv_t;
|
||||
|
||||
struct save_addrenv_s
|
||||
{
|
||||
FAR uint32_t text[ARCH_TEXT_NSECTS];
|
||||
FAR uint32_t data[ARCH_DATA_NSECTS];
|
||||
uint32_t text[ARCH_TEXT_NSECTS];
|
||||
uint32_t data[ARCH_DATA_NSECTS];
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
FAR uint32_t heap[ARCH_HEAP_NSECTS];
|
||||
uint32_t heap[ARCH_HEAP_NSECTS];
|
||||
#ifdef CONFIG_MM_SHM
|
||||
FAR uint32_t shm[ARCH_SHM_NSECTS];
|
||||
uint32_t shm[ARCH_SHM_NSECTS];
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
@ -97,9 +97,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
|
||||
void up_allocate_kheap(void **heap_start, size_t *heap_size)
|
||||
#else
|
||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||
void up_allocate_heap(void **heap_start, size_t *heap_size)
|
||||
#endif
|
||||
{
|
||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_MM_KERNEL_HEAP)
|
||||
@ -117,13 +117,13 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||
/* Return the user-space heap settings */
|
||||
|
||||
board_autoled_on(LED_HEAPALLOCATE);
|
||||
*heap_start = (FAR void *)ubase;
|
||||
*heap_start = (void *)ubase;
|
||||
*heap_size = usize;
|
||||
#else
|
||||
|
||||
/* Return the heap settings */
|
||||
|
||||
*heap_start = (FAR void *)g_idle_topstack;
|
||||
*heap_start = (void *)g_idle_topstack;
|
||||
*heap_size = CONFIG_RAM_END - *(uint32_t *)heap_start;
|
||||
|
||||
board_autoled_on(LED_HEAPALLOCATE);
|
||||
@ -142,7 +142,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_MM_KERNEL_HEAP)
|
||||
void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
|
||||
void up_allocate_kheap(void **heap_start, size_t *heap_size)
|
||||
{
|
||||
/* Get the unaligned size and position of the user-space heap.
|
||||
* This heap begins after the user-space .bss section at an offset
|
||||
@ -157,7 +157,7 @@ void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
|
||||
* that was not dedicated to the user heap).
|
||||
*/
|
||||
|
||||
*heap_start = (FAR void *)USERSPACE->us_bssend;
|
||||
*heap_start = (void *)USERSPACE->us_bssend;
|
||||
*heap_size = ubase - (uintptr_t)USERSPACE->us_bssend;
|
||||
}
|
||||
#endif
|
||||
|
@ -94,7 +94,7 @@ static void or1k_stackdump(uint32_t sp, uint32_t stack_top)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
static void up_taskdump(struct tcb_s *tcb, void *arg)
|
||||
{
|
||||
/* Dump interesting properties of this task */
|
||||
|
||||
@ -167,7 +167,7 @@ static inline void or1k_registerdump(void)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_USBDUMP
|
||||
static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
static int usbtrace_syslog(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
@ -180,7 +180,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
|
||||
{
|
||||
usbtrace_trprintf(usbtrace_syslog, trace->event, trace->value);
|
||||
return 0;
|
||||
@ -194,7 +194,7 @@ static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
|
||||
#ifdef CONFIG_ARCH_STACKDUMP
|
||||
static void up_dumpstate(void)
|
||||
{
|
||||
FAR struct tcb_s *rtcb = running_task();
|
||||
struct tcb_s *rtcb = running_task();
|
||||
uint32_t sp = up_getsp();
|
||||
uint32_t ustackbase;
|
||||
uint32_t ustacksize;
|
||||
|
@ -67,9 +67,9 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size);
|
||||
|
||||
static size_t do_stackcheck(uintptr_t alloc, size_t size)
|
||||
{
|
||||
FAR uintptr_t start;
|
||||
FAR uintptr_t end;
|
||||
FAR uint32_t *ptr;
|
||||
uintptr_t start;
|
||||
uintptr_t end;
|
||||
uint32_t *ptr;
|
||||
size_t mark;
|
||||
|
||||
if (size == 0)
|
||||
@ -86,7 +86,7 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size)
|
||||
|
||||
size = end - start;
|
||||
|
||||
for (ptr = (FAR uint32_t *)start, mark = (size >> 2);
|
||||
for (ptr = (uint32_t *)start, mark = (size >> 2);
|
||||
*ptr == STACK_COLOR && mark > 0;
|
||||
ptr++, mark--);
|
||||
|
||||
@ -115,12 +115,12 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
size_t up_check_tcbstack(FAR struct tcb_s *tcb)
|
||||
size_t up_check_tcbstack(struct tcb_s *tcb)
|
||||
{
|
||||
return do_stackcheck((uintptr_t)tcb->stack_base_ptr, tcb->adj_stack_size);
|
||||
}
|
||||
|
||||
ssize_t up_check_tcbstack_remain(FAR struct tcb_s *tcb)
|
||||
ssize_t up_check_tcbstack_remain(struct tcb_s *tcb)
|
||||
{
|
||||
return tcb->adj_stack_size - up_check_tcbstack(tcb);
|
||||
}
|
||||
|
@ -81,7 +81,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
{
|
||||
#ifdef CONFIG_TLS_ALIGNED
|
||||
/* The allocated stack size must not exceed the maximum possible for the
|
||||
@ -201,7 +201,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
void up_stack_color(FAR void *stackbase, size_t nbytes)
|
||||
void up_stack_color(void *stackbase, size_t nbytes)
|
||||
{
|
||||
uint32_t *stkptr;
|
||||
uintptr_t stkend;
|
||||
|
@ -62,9 +62,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DUMP_ON_EXIT
|
||||
static void _up_dumponexit(FAR struct tcb_s *tcb, FAR void *arg)
|
||||
static void _up_dumponexit(struct tcb_s *tcb, void *arg)
|
||||
{
|
||||
FAR struct filelist *filelist;
|
||||
struct filelist *filelist;
|
||||
int i;
|
||||
int j;
|
||||
|
||||
|
@ -267,8 +267,8 @@ uint32_t *up_doirq(int irq, uint32_t *regs);
|
||||
|
||||
/* Exception Handlers */
|
||||
|
||||
int up_hardfault(int irq, FAR void *context, FAR void *arg);
|
||||
int up_memfault(int irq, FAR void *context, FAR void *arg);
|
||||
int up_hardfault(int irq, void *context, void *arg);
|
||||
int up_memfault(int irq, void *context, void *arg);
|
||||
|
||||
/* Interrupt acknowledge and dispatch */
|
||||
|
||||
@ -343,7 +343,7 @@ void up_usbuninitialize(void);
|
||||
|
||||
/* Debug ********************************************************************/
|
||||
#ifdef CONFIG_STACK_COLORATION
|
||||
void up_stack_color(FAR void *stackbase, size_t nbytes);
|
||||
void up_stack_color(void *stackbase, size_t nbytes);
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
|
@ -71,7 +71,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_release_stack(FAR struct tcb_s *dtcb, uint8_t ttype)
|
||||
void up_release_stack(struct tcb_s *dtcb, uint8_t ttype)
|
||||
{
|
||||
/* Is there a stack allocated? */
|
||||
|
||||
|
@ -69,9 +69,9 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
|
||||
void *up_stack_frame(struct tcb_s *tcb, size_t frame_size)
|
||||
{
|
||||
FAR void *ret;
|
||||
void *ret;
|
||||
|
||||
/* Align the frame_size */
|
||||
|
||||
@ -89,7 +89,7 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
|
||||
|
||||
/* Save the adjusted stack values in the struct tcb_s */
|
||||
|
||||
tcb->stack_base_ptr = (FAR uint8_t *)tcb->stack_base_ptr + frame_size;
|
||||
tcb->stack_base_ptr = (uint8_t *)tcb->stack_base_ptr + frame_size;
|
||||
tcb->adj_stack_size -= frame_size;
|
||||
|
||||
/* And return the pointer to the allocated region */
|
||||
|
@ -61,7 +61,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void up_task_start(main_t taskentry, int argc, FAR char *argv[])
|
||||
void up_task_start(main_t taskentry, int argc, char *argv[])
|
||||
{
|
||||
/* Let sys_call3() do all of the work */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user