version 1.48.8.3, 2007/10/26 15:42:35 |
version 1.48.8.4, 2007/11/11 16:46:31 |
Line 755 ENTRY(cpu_switchto) |
|
Line 755 ENTRY(cpu_switchto) |
|
/* Switch TSS. Reset "task busy" flag before loading. */ |
/* Switch TSS. Reset "task busy" flag before loading. */ |
movl %cr3,%eax |
movl %cr3,%eax |
movl %eax,PCB_CR3(%ebx) # for TSS gates |
movl %eax,PCB_CR3(%ebx) # for TSS gates |
movl CPUVAR(GDT),%eax |
movl CPUVAR(GDT),%ecx |
movl L_MD_TSS_SEL(%edi),%edx |
movl L_MD_TSS_SEL(%edi),%edx |
andl $~0x0200,4(%eax,%edx, 1) |
andl $~0x0200,4(%ecx,%edx, 1) |
ltr %dx |
ltr %dx |
|
|
/* Set curlwp. */ |
/* Set curlwp. */ |
Line 772 ENTRY(cpu_switchto) |
|
Line 772 ENTRY(cpu_switchto) |
|
cmpl $0,P_RASLIST(%eax) |
cmpl $0,P_RASLIST(%eax) |
jne 5f |
jne 5f |
|
|
|
/* Restore thread-private %fs/%gs descriptors. */ |
|
movl PCB_FSD(%ebx), %eax |
|
movl PCB_FSD+4(%ebx), %edx |
|
movl %eax, (GUFS_SEL*8)(%ecx) |
|
movl %edx, (GUFS_SEL*8+4)(%ecx) |
|
movl PCB_GSD(%ebx), %eax |
|
movl PCB_GSD+4(%ebx), %edx |
|
movl %eax, (GUGS_SEL*8)(%ecx) |
|
movl %edx, (GUGS_SEL*8+4)(%ecx) |
|
|
/* |
/* |
* Restore cr0 (including FPU state). Raise the IPL to IPL_IPI. |
* Restore cr0 (including FPU state). Raise the IPL to IPL_IPI. |
* FPU IPIs can alter the LWP's saved cr0. Dropping the priority |
* FPU IPIs can alter the LWP's saved cr0. Dropping the priority |