| /libcpu/arm/cortex-m7/ |
| A D | mpu.c | 19 #define MEM_REGION_TO_MPU_INDEX(thread, region) ((((rt_size_t)region - (rt_size_t)(thread->mem_regi… argument 143 if (thread == RT_NULL) in rt_hw_mpu_add_region() 148 free_region = rt_mprotect_find_free_region(thread); in rt_hw_mpu_add_region() 156 if (thread == rt_thread_self()) in rt_hw_mpu_add_region() 177 if (thread == rt_thread_self()) in rt_hw_mpu_delete_region() 203 if (thread == rt_thread_self()) in rt_hw_mpu_update_region() 205 index = MEM_REGION_TO_MPU_INDEX(thread, old_region); in rt_hw_mpu_update_region() 218 void rt_hw_mpu_table_switch(rt_thread_t thread) in rt_hw_mpu_table_switch() argument 223 if (thread->mem_regions != RT_NULL) in rt_hw_mpu_table_switch() 255 info.thread = rt_thread_self(); in MemManage_Handler() [all …]
|
| A D | mpu.h | 70 rt_thread_t thread; /* Thread that triggered exception */ member 97 rt_err_t rt_hw_mpu_add_region(rt_thread_t thread, rt_mem_region_t *region); 98 rt_err_t rt_hw_mpu_delete_region(rt_thread_t thread, rt_mem_region_t *region); 99 rt_err_t rt_hw_mpu_update_region(rt_thread_t thread, rt_mem_region_t *region);
|
| A D | cpuport.c | 182 void rt_hw_stack_guard_init(rt_thread_t thread) in rt_hw_stack_guard_init() argument 185 rt_ubase_t stack_bottom = (rt_ubase_t)thread->stack_addr; in rt_hw_stack_guard_init() 186 rt_ubase_t stack_top = (rt_ubase_t)((rt_uint8_t *)thread->stack_addr + thread->stack_size); in rt_hw_stack_guard_init() 195 rt_mprotect_add_region(thread, &stack_top_region); in rt_hw_stack_guard_init() 196 rt_mprotect_add_region(thread, &stack_bottom_region); in rt_hw_stack_guard_init() 197 thread->stack_buf = thread->stack_addr; in rt_hw_stack_guard_init() 198 thread->stack_addr = (void *)(stack_bottom_region_start + MPU_MIN_REGION_SIZE); in rt_hw_stack_guard_init() 199 …thread->stack_size = (rt_uint32_t)(stack_top_region_start - stack_bottom_region_start - MPU_MIN_RE… in rt_hw_stack_guard_init()
|
| A D | context_rvds.S | 85 ; r0 --> switch from thread stack 86 ; r1 --> switch to thread stack 108 MRS r1, psp ; get from thread stack pointer 127 STR r1, [r0] ; update from thread stack pointer 132 LDR r1, [r1] ; load thread stack pointer 168 ; set to thread 179 ; set from thread to 0 234 MRSNE r0, psp ; [2]=1 ==> Z=0, get fault context from thread.
|
| A D | context_iar.S | 82 ; r0 --> switch from thread stack 83 ; r1 --> switch to thread stack 105 MRS r1, psp ; get from thread stack pointer 128 STR r1, [r0] ; update from thread stack pointer 133 LDR r1, [r1] ; load thread stack pointer 179 ; set from thread to 0 230 MRS r0, psp ; get fault context from thread.
|
| /libcpu/arm/cortex-m33/ |
| A D | mpu.c | 19 #define MEM_REGION_TO_MPU_INDEX(thread, region) ((((rt_size_t)region - (rt_size_t)(thread->mem_regi… argument 194 if (thread == RT_NULL) in rt_hw_mpu_add_region() 199 free_region = rt_mprotect_find_free_region(thread); in rt_hw_mpu_add_region() 207 if (thread == rt_thread_self()) in rt_hw_mpu_add_region() 228 if (thread == rt_thread_self()) in rt_hw_mpu_delete_region() 259 if (thread == rt_thread_self()) in rt_hw_mpu_update_region() 261 index = MEM_REGION_TO_MPU_INDEX(thread, old_region); in rt_hw_mpu_update_region() 274 void rt_hw_mpu_table_switch(rt_thread_t thread) in rt_hw_mpu_table_switch() argument 279 if (thread->mem_regions != RT_NULL) in rt_hw_mpu_table_switch() 311 info.thread = rt_thread_self(); in MemManage_Handler() [all …]
|
| A D | cpuport.c | 240 void rt_hw_stack_guard_init(rt_thread_t thread) in rt_hw_stack_guard_init() argument 243 rt_ubase_t stack_bottom = (rt_ubase_t)thread->stack_addr; in rt_hw_stack_guard_init() 244 rt_ubase_t stack_top = (rt_ubase_t)((rt_uint8_t *)thread->stack_addr + thread->stack_size); in rt_hw_stack_guard_init() 253 rt_mprotect_add_region(thread, &stack_top_region); in rt_hw_stack_guard_init() 254 rt_mprotect_add_region(thread, &stack_bottom_region); in rt_hw_stack_guard_init() 255 thread->stack_buf = thread->stack_addr; in rt_hw_stack_guard_init() 256 thread->stack_addr = (void *)(stack_bottom_region_start + MPU_MIN_REGION_SIZE); in rt_hw_stack_guard_init() 257 thread->stack_size = (rt_uint32_t)(stack_top_region_start - (rt_ubase_t)thread->stack_addr); in rt_hw_stack_guard_init()
|
| A D | context_rvds.S | 88 ; r0 --> switch from thread stack 89 ; r1 --> switch to thread stack 118 ; Whether TrustZone thread stack exists 138 STMFD r5!, {r1-r4} ; push to thread stack 140 ; update from thread stack pointer 161 STMFD r1!, {r2-r5} ; push to thread stack 172 LDMFD r1!, {r2-r5} ; pop thread stack 180 ; Whether TrustZone thread stack exists 214 ; set to thread 225 ; set from thread to 0 [all …]
|
| A D | context_iar.S | 85 ; r0 --> switch from thread stack 86 ; r1 --> switch to thread stack 115 ; Whether TrustZone thread stack exists 135 STMFD r5!, {r1-r4} ; push to thread stack 137 ; update from thread stack pointer 160 STMFD r1!, {r2-r5} ; push to thread stack 169 LDR r1, [r1] ; load thread stack pointer 172 LDMFD r1!, {r2-r5} ; pop thread stack 180 ; Whether TrustZone thread stack exists 224 ; set from thread to 0 [all …]
|
| A D | syscall_rvds.S | 30 MOV R4, R1 ; copy thread SP to R4 36 BX LR ; return to thread 55 MRS R1, PSP ;get fault context from thread
|
| A D | mpu.h | 63 rt_thread_t thread; /* Thread that triggered exception */ member 92 rt_err_t rt_hw_mpu_add_region(rt_thread_t thread, rt_mem_region_t *region); 93 rt_err_t rt_hw_mpu_delete_region(rt_thread_t thread, rt_mem_region_t *region); 94 rt_err_t rt_hw_mpu_update_region(rt_thread_t thread, rt_mem_region_t *region);
|
| /libcpu/sim/posix/ |
| A D | cpu_port.c | 31 #define THREAD_T(thread) ((thread_t *)thread) argument 153 thread_t *thread; in thread_run() local 162 sem_wait(&thread->sem); in thread_run() 167 thread->rtthread = tid; in thread_run() 168 thread->task(thread->para); in thread_run() 171 thread->exit(); in thread_run() 188 thread->task = task; in thread_create() 190 thread->exit = pexit; in thread_create() 202 res = pthread_create(&thread->pthread, &attr, &thread_run, (void *)thread); in thread_create() 215 sem_post(& thread->sem); in thread_resume() [all …]
|
| /libcpu/aarch64/common/include/ |
| A D | cpuport.h | 59 struct rt_thread *thread; in rt_hw_thread_self() local 60 __asm__ volatile ("mrs %0, " RT_STRINGIFY(ARM64_THREAD_REG) :"=r"(thread)); in rt_hw_thread_self() 62 return thread; in rt_hw_thread_self() 65 rt_inline void rt_hw_thread_set_self(struct rt_thread *thread) in rt_hw_thread_set_self() argument 67 __asm__ volatile ("msr " RT_STRINGIFY(ARM64_THREAD_REG) ", %0"::"r"(thread)); in rt_hw_thread_set_self()
|
| /libcpu/aarch64/common/ |
| A D | backtrace.c | 80 rt_err_t rt_hw_backtrace_frame_unwind(rt_thread_t thread, struct rt_hw_backtrace_frame *frame) in rt_hw_backtrace_frame_unwind() argument 89 if (thread && thread->lwp && rt_scheduler_is_available()) in rt_hw_backtrace_frame_unwind() 91 rt_lwp_t lwp = thread->lwp; in rt_hw_backtrace_frame_unwind() 124 rt_err_t rt_hw_backtrace_frame_get(rt_thread_t thread, struct rt_hw_backtrace_frame *frame) in rt_hw_backtrace_frame_get() argument 127 if (!thread || !frame) in rt_hw_backtrace_frame_get() 133 frame->pc = ARCH_CONTEXT_FETCH(thread->sp, 0); in rt_hw_backtrace_frame_get() 134 frame->fp = ARCH_CONTEXT_FETCH(thread->sp, 4); in rt_hw_backtrace_frame_get()
|
| /libcpu/arm/cortex-m0/ |
| A D | context_iar.S | 80 ; r0 --> switch from thread stack 81 ; r1 --> switch to thread stack 105 MRS r1, psp ; get from thread stack pointer 111 STMIA r1!, {r4 - r7} ; push thread {r4 - r7} register to thread stack 117 STMIA r1!, {r4 - r7} ; push thread {r8 - r11} high register to thread stack 122 LDR r1, [r1] ; load thread stack pointer 124 LDMIA r1!, {r4 - r7} ; pop thread {r4 - r7} register from thread stack 127 …LDMIA r1!, {r4 - r7} ; pop thread {r8 - r11} high register from thread stack to {r4 - r… 152 ; set to thread 156 ; set from thread to 0 [all …]
|
| A D | context_rvds.S | 84 ; r0 --> switch from thread stack 85 ; r1 --> switch to thread stack 109 MRS r1, psp ; get from thread stack pointer 115 STMIA r1!, {r4 - r7} ; push thread {r4 - r7} register to thread stack 121 STMIA r1!, {r4 - r7} ; push thread {r8 - r11} high register to thread stack 126 LDR r1, [r1] ; load thread stack pointer 128 LDMIA r1!, {r4 - r7} ; pop thread {r4 - r7} register from thread stack 131 …LDMIA r1!, {r4 - r7} ; pop thread {r8 - r11} high register from thread stack to {r4 - r… 157 ; set to thread 161 ; set from thread to 0 [all …]
|
| /libcpu/arm/cortex-m23/ |
| A D | context_iar.S | 81 ; r0 --> switch from thread stack 82 ; r1 --> switch to thread stack 106 MRS r1, psp ; get from thread stack pointer 112 STMIA r1!, {r4 - r7} ; push thread {r4 - r7} register to thread stack 118 STMIA r1!, {r4 - r7} ; push thread {r8 - r11} high register to thread stack 123 LDR r1, [r1] ; load thread stack pointer 125 LDMIA r1!, {r4 - r7} ; pop thread {r4 - r7} register from thread stack 128 …LDMIA r1!, {r4 - r7} ; pop thread {r8 - r11} high register from thread stack to {r4 - r… 153 ; set to thread 157 ; set from thread to 0 [all …]
|
| A D | context_rvds.S | 85 ; r0 --> switch from thread stack 86 ; r1 --> switch to thread stack 110 MRS r1, psp ; get from thread stack pointer 116 STMIA r1!, {r4 - r7} ; push thread {r4 - r7} register to thread stack 122 STMIA r1!, {r4 - r7} ; push thread {r8 - r11} high register to thread stack 127 LDR r1, [r1] ; load thread stack pointer 129 LDMIA r1!, {r4 - r7} ; pop thread {r4 - r7} register from thread stack 132 …LDMIA r1!, {r4 - r7} ; pop thread {r8 - r11} high register from thread stack to {r4 - r… 158 ; set to thread 162 ; set from thread to 0 [all …]
|
| /libcpu/risc-v/common64/ |
| A D | backtrace.c | 68 rt_err_t rt_hw_backtrace_frame_unwind(rt_thread_t thread, struct rt_hw_backtrace_frame *frame) in rt_hw_backtrace_frame_unwind() argument 76 if (thread->lwp) in rt_hw_backtrace_frame_unwind() 78 void *lwp = thread->lwp; in rt_hw_backtrace_frame_unwind() 111 rt_err_t rt_hw_backtrace_frame_get(rt_thread_t thread, struct rt_hw_backtrace_frame *frame) in rt_hw_backtrace_frame_get() argument 115 if (!thread || !frame) in rt_hw_backtrace_frame_get() 121 rt_hw_switch_frame_t sframe = thread->sp; in rt_hw_backtrace_frame_get()
|
| /libcpu/arm/cortex-m3/ |
| A D | context_rvds.S | 83 ; r0 --> switch from thread stack 84 ; r1 --> switch to thread stack 106 MRS r1, psp ; get from thread stack pointer 109 STR r1, [r0] ; update from thread stack pointer 114 LDR r1, [r1] ; load thread stack pointer 134 ; set to thread 138 ; set from thread to 0 191 MRSNE r0, psp ; [2]=1 ==> Z=0, get fault context from thread.
|
| A D | context_iar.S | 80 ; r0 --> switch from thread stack 81 ; r1 --> switch to thread stack 103 MRS r1, psp ; get from thread stack pointer 106 STR r1, [r0] ; update from thread stack pointer 111 LDR r1, [r1] ; load thread stack pointer 132 ; set from thread to 0 183 MRS r0, psp ; get fault context from thread.
|
| /libcpu/arm/cortex-m4/ |
| A D | context_rvds.S | 86 ; r0 --> switch from thread stack 87 ; r1 --> switch to thread stack 109 MRS r1, psp ; get from thread stack pointer 128 STR r1, [r0] ; update from thread stack pointer 133 LDR r1, [r1] ; load thread stack pointer 169 ; set to thread 180 ; set from thread to 0 237 MRSNE r0, psp ; [2]=1 ==> Z=0, get fault context from thread.
|
| A D | context_iar.S | 85 ; r0 --> switch from thread stack 86 ; r1 --> switch to thread stack 108 MRS r1, psp ; get from thread stack pointer 131 STR r1, [r0] ; update from thread stack pointer 136 LDR r1, [r1] ; load thread stack pointer 182 ; set from thread to 0 237 MRS r0, psp ; get fault context from thread.
|
| A D | README.md | 4 Calling `rt_hw_interrupt_disable` in multiple places on `rt-thread` may cause interruption delays w… 6 …ys caused by calling `rt_hw_interrupt_disable` in multiple places on `rt-thread`. The module is im…
|
| /libcpu/rx/ |
| A D | context_iar.S | 31 ; r0 --> switch from thread stack 32 ; r1 --> switch to thread stack
|