Skip to content

Commit 4e80deb

Browse files
committed
debug: thread_info: Store thread stack pointer offset for OpenRISC
In OpenRISC 1000, the stack pointer is stored in the r1 register. This patch stores the offset of this value within in the thread structure into the thread info offsets. Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
1 parent abdeee5 commit 4e80deb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

subsys/debug/thread_info.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ const size_t _kernel_thread_info_offsets[] = {
7474
#elif defined(CONFIG_MIPS)
7575
[THREAD_INFO_OFFSET_T_STACK_PTR] = offsetof(struct k_thread,
7676
callee_saved.sp),
77+
#elif defined(CONFIG_OPENRISC)
78+
[THREAD_INFO_OFFSET_T_STACK_PTR] = offsetof(struct k_thread,
79+
callee_saved.r1),
7780
#elif defined(CONFIG_NIOS2)
7881
[THREAD_INFO_OFFSET_T_STACK_PTR] = offsetof(struct k_thread,
7982
callee_saved.sp),

0 commit comments

Comments
 (0)