Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/cpu_switch.S
Show First 20 Lines • Show All 376 Lines • ▼ Show 20 Lines | ENTRY(savectx) | ||||
ret | ret | ||||
END(savectx) | END(savectx) | ||||
/* | /* | ||||
* resumectx(pcb) | * resumectx(pcb) | ||||
* Resuming processor state from pcb. | * Resuming processor state from pcb. | ||||
*/ | */ | ||||
ENTRY(resumectx) | ENTRY(resumectx) | ||||
/* Switch to KPML4phys. */ | /* Switch to KPML5/4phys. */ | ||||
movq KPML4phys,%rax | movq KPML4phys,%rax | ||||
movq KPML5phys,%rcx | |||||
cmpl $0, la57 | |||||
cmovne %rcx, %rax | |||||
movq %rax,%cr3 | movq %rax,%cr3 | ||||
/* Force kernel segment registers. */ | /* Force kernel segment registers. */ | ||||
movl $KDSEL,%eax | movl $KDSEL,%eax | ||||
movw %ax,%ds | movw %ax,%ds | ||||
movw %ax,%es | movw %ax,%es | ||||
movw %ax,%ss | movw %ax,%ss | ||||
movl $KUF32SEL,%eax | movl $KUF32SEL,%eax | ||||
▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines |