32,6 → 32,7 |
#include <arch.h> |
#include <arch/context.h> /* SP_DELTA */ |
#include <arch/asm.h> |
#include <arch/debugger.h> |
|
void before_thread_runs_arch(void) |
{ |
42,6 → 43,16 |
write_msr(AMD_MSR_GS, |
(__u64)&THREAD->kstack); |
swapgs(); |
|
|
#ifdef CONFIG_DEBUG_AS_WATCHPOINT |
/* Set watchpoint on AS to ensure that nobody sets it to zero */ |
static int old_slot = -1; |
if (old_slot >=0) |
breakpoint_del(old_slot); |
old_slot = breakpoint_add(&((the_t *) THREAD->kstack)->as, |
BKPOINT_WRITE | BKPOINT_CHECK_ZERO); |
#endif |
} |
|
void after_thread_ran_arch(void) |