Changeset 281b607 in mainline for arch/amd64
- Timestamp:
- 2006-03-23T10:29:39Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a0bb10ef
- Parents:
- 9aa72b4
- Location:
- arch/amd64
- Files:
-
- 4 edited
-
include/cpu.h (modified) (1 diff)
-
include/thread.h (modified) (1 diff)
-
src/amd64.c (modified) (3 diffs)
-
src/proc/scheduler.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/cpu.h
r9aa72b4 r281b607 43 43 #define AMD_MSR_LSTAR 0xc0000082 44 44 #define AMD_MSR_SFMASK 0xc0000084 45 #define AMD_MSR_FS 0xc0000100 45 46 #define AMD_MSR_GS 0xc0000101 46 47 -
arch/amd64/include/thread.h
r9aa72b4 r281b607 30 30 #define __amd64_THREAD_H__ 31 31 32 #define ARCH_THREAD_DATA 32 #define ARCH_THREAD_DATA __native tls; 33 33 34 34 #endif -
arch/amd64/src/amd64.c
r9aa72b4 r281b607 33 33 #include <config.h> 34 34 35 #include <proc/thread.h> 35 36 #include <arch/ega.h> 36 37 #include <genarch/i8042/i8042.h> … … 48 49 #include <arch/syscall.h> 49 50 #include <arch/debugger.h> 51 #include <syscall/syscall.h> 52 50 53 51 54 /** Disable I/O on non-privileged levels … … 160 163 i8254_normal_operation(); 161 164 } 165 166 /** Set Thread-local-storeage pointer 167 * 168 * TLS pointer is set in FS register. Unfortunately the 64-bit 169 * part can be set only in CPL0 mode. 170 * 171 * The specs says, that on %fs:0 there is stored contents of %fs register, 172 * we need not to go to CPL0 to read it. 173 */ 174 __native sys_tls_set(__native addr) 175 { 176 THREAD->tls = addr; 177 write_msr(AMD_MSR_FS, addr); 178 return 0; 179 } -
arch/amd64/src/proc/scheduler.c
r9aa72b4 r281b607 46 46 swapgs(); 47 47 48 /* TLS support - set FS to thread local storage */ 49 write_msr(AMD_MSR_FS, THREAD->tls); 50 48 51 #ifdef CONFIG_DEBUG_AS_WATCHPOINT 49 52 /* Set watchpoint on AS to ensure that nobody sets it to zero */
Note:
See TracChangeset
for help on using the changeset viewer.
