diff --git a/headers/private/kernel/arch/sparc/arch_thread.h b/headers/private/kernel/arch/sparc/arch_thread.h index bf98ef6687..89b09c4643 100644 --- a/headers/private/kernel/arch/sparc/arch_thread.h +++ b/headers/private/kernel/arch/sparc/arch_thread.h @@ -16,17 +16,11 @@ extern "C" { #endif -void ppc_push_iframe(struct iframe_stack *stack, struct iframe *frame); -void ppc_pop_iframe(struct iframe_stack *stack); -struct iframe *ppc_get_user_iframe(void); - - static inline Thread * arch_thread_get_current_thread(void) { Thread *t; - //asm volatile("mfsprg2 %0" : "=r"(t)); - t = NULL; + asm volatile("mov %%g7, %0" : "=r"(t)); return t; } @@ -34,7 +28,7 @@ arch_thread_get_current_thread(void) static inline void arch_thread_set_current_thread(Thread *t) { - //asm volatile("mtsprg2 %0" : : "r"(t)); + asm volatile("mov %0,%%g7" : : "r"(t)); } diff --git a/src/system/kernel/arch/sparc/arch_debug.cpp b/src/system/kernel/arch/sparc/arch_debug.cpp index 495c9abf0e..5b393406a8 100644 --- a/src/system/kernel/arch/sparc/arch_debug.cpp +++ b/src/system/kernel/arch/sparc/arch_debug.cpp @@ -44,6 +44,13 @@ arch_debug_call_with_fault_handler(cpu_ent* cpu, jmp_buf jumpBuffer, } +void +arch_debug_unset_current_thread(void) +{ + asm volatile("mov %g0, %g7"); +} + + bool arch_is_debug_variable_defined(const char* variableName) {