Rev 3535 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3535 | Rev 4343 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | #include <cpu.h> |
36 | #include <cpu.h> |
37 | #include <proc/task.h> |
37 | #include <proc/task.h> |
38 | #include <proc/thread.h> |
38 | #include <proc/thread.h> |
39 | #include <arch.h> |
39 | #include <arch.h> |
40 | #include <arch/context.h> /* SP_DELTA */ |
40 | #include <arch/context.h> /* SP_DELTA */ |
41 | #include <arch/debugger.h> |
- | |
42 | #include <arch/pm.h> |
41 | #include <arch/pm.h> |
43 | #include <arch/asm.h> |
42 | #include <arch/asm.h> |
44 | #include <arch/ddi/ddi.h> |
43 | #include <arch/ddi/ddi.h> |
45 | 44 | ||
46 | /** Perform ia32 specific tasks needed before the new task is run. |
45 | /** Perform ia32 specific tasks needed before the new task is run. |
Line 68... | Line 67... | ||
68 | CPU->arch.tss->esp0 = kstk; |
67 | CPU->arch.tss->esp0 = kstk; |
69 | CPU->arch.tss->ss0 = selector(KDATA_DES); |
68 | CPU->arch.tss->ss0 = selector(KDATA_DES); |
70 | 69 | ||
71 | /* Set up TLS in GS register */ |
70 | /* Set up TLS in GS register */ |
72 | set_tls_desc(THREAD->arch.tls); |
71 | set_tls_desc(THREAD->arch.tls); |
73 | - | ||
74 | #ifdef CONFIG_DEBUG_AS_WATCHPOINT |
- | |
75 | /* Set watchpoint on AS to ensure that nobody sets it to zero */ |
- | |
76 | if (CPU->id < BKPOINTS_MAX) { |
- | |
77 | the_t *the = THE; |
- | |
78 | breakpoint_add(&((the_t *) the->thread->kstack)->as, |
- | |
79 | BKPOINT_WRITE | BKPOINT_CHECK_ZERO, the->cpu->id); |
- | |
80 | } |
- | |
81 | #endif |
- | |
82 | } |
72 | } |
83 | 73 | ||
84 | void after_thread_ran_arch(void) |
74 | void after_thread_ran_arch(void) |
85 | { |
75 | { |
86 | } |
76 | } |