version 1.25, 2004/03/26 19:05:33 |
version 1.26, 2004/04/12 13:17:46 |
Line 1775 ENTRY(cpu_switch) |
|
Line 1775 ENTRY(cpu_switch) |
|
movl PCB_EBP(%edi),%ebp |
movl PCB_EBP(%edi),%ebp |
|
|
/* Switch TSS. Reset "task busy" flag before loading. */ |
/* Switch TSS. Reset "task busy" flag before loading. */ |
|
movl %cr3,%eax |
|
movl %eax,PCB_CR3(%edi) |
#ifdef MULTIPROCESSOR |
#ifdef MULTIPROCESSOR |
movl CPUVAR(GDT),%eax |
movl CPUVAR(GDT),%eax |
#else |
#else |
|
|
jnz switch_restored |
jnz switch_restored |
#endif |
#endif |
|
|
|
/* Switch TSS. Reset "task busy" flag before loading. */ |
|
movl %cr3,%eax |
|
movl %eax,PCB_CR3(%esi) /* XXX should be done by pmap_activate? */ |
#ifdef MULTIPROCESSOR |
#ifdef MULTIPROCESSOR |
movl CPUVAR(GDT),%eax |
movl CPUVAR(GDT),%eax |
#else |
#else |
|
|
#endif |
#endif |
movl L_MD_TSS_SEL(%edi),%edx |
movl L_MD_TSS_SEL(%edi),%edx |
|
|
/* Switch TSS. Reset "task busy" flag before loading. */ |
|
andl $~0x0200,4(%eax,%edx, 1) |
andl $~0x0200,4(%eax,%edx, 1) |
ltr %dx |
ltr %dx |
|
|
Line 2078 ENTRY(cpu_exit) |
|
Line 2082 ENTRY(cpu_exit) |
|
movl PCB_ESP(%esi),%esp |
movl PCB_ESP(%esi),%esp |
movl PCB_EBP(%esi),%ebp |
movl PCB_EBP(%esi),%ebp |
|
|
/* Load TSS info. */ |
/* Switch TSS. Reset "task busy" flag before loading. */ |
|
movl %cr3,%eax |
|
movl %eax,PCB_CR3(%esi) |
#ifdef MULTIPROCESSOR |
#ifdef MULTIPROCESSOR |
movl CPUVAR(GDT),%eax |
movl CPUVAR(GDT),%eax |
#else |
#else |
Line 2086 ENTRY(cpu_exit) |
|
Line 2092 ENTRY(cpu_exit) |
|
movl _C_LABEL(gdt),%eax |
movl _C_LABEL(gdt),%eax |
#endif |
#endif |
|
|
/* Switch TSS. */ |
|
andl $~0x0200,4-SEL_KPL(%eax,%edx,1) |
andl $~0x0200,4-SEL_KPL(%eax,%edx,1) |
ltr %dx |
ltr %dx |
|
|