Changeset e11ae91 in mainline for kernel/arch/sparc64/src/proc/scheduler.c
- Timestamp:
- 2006-08-30T11:31:25Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ee454eb
- Parents:
- 0fa6044
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/src/proc/scheduler.c
r0fa6044 re11ae91 37 37 #include <arch.h> 38 38 #include <arch/asm.h> 39 #include <arch/regdef.h> 40 #include <arch/stack.h> 39 41 #include <arch/mm/tlb.h> 40 42 #include <arch/mm/page.h> … … 52 54 * Ensure that thread's kernel stack, as well as userspace window 53 55 * buffer for userspace threads, are locked in DTLB. 56 * For userspace threads, initialize reserved global registers 57 * in the alternate and interrupt sets. 54 58 */ 55 59 void before_thread_runs_arch(void) … … 83 87 dtlb_insert_mapping(uw_buf, KA2PA(uw_buf), PAGESIZE_8K, true, true); 84 88 } 89 90 /* 91 * Write kernel stack address to %g6 and a pointer to the last item 92 * in the userspace window buffer to %g7 in the alternate and interrupt sets. 93 */ 94 write_to_ig_g6((uintptr_t) THREAD->kstack + STACK_SIZE - STACK_BIAS); 95 write_to_ag_g6((uintptr_t) THREAD->kstack + STACK_SIZE - STACK_BIAS); 96 write_to_ag_g7((uintptr_t) THREAD->arch.uspace_window_buffer); 85 97 } 86 98 } … … 124 136 dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_NUCLEUS, (uintptr_t) uw_buf); 125 137 } 138 139 /* sample the state of the userspace window buffer */ 140 THREAD->arch.uspace_window_buffer = (uint8_t *) read_from_ag_g7(); 126 141 } 127 142 }
Note:
See TracChangeset
for help on using the changeset viewer.