diff options
author | jkim <jkim@FreeBSD.org> | 2010-08-30 21:19:42 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-08-30 21:19:42 +0000 |
commit | 4c2b72a3c08750e3315eb7ff87458700e757b7dd (patch) | |
tree | 2f2c5b9e82e7737b24d1f8da4061066bc8161e16 /sys/amd64/amd64/cpu_switch.S | |
parent | bab48ae23a4c49f2df3097e9c0e2cca68d8ebe0b (diff) | |
download | FreeBSD-src-4c2b72a3c08750e3315eb7ff87458700e757b7dd.zip FreeBSD-src-4c2b72a3c08750e3315eb7ff87458700e757b7dd.tar.gz |
Save MSR_FSBASE, MSR_GSBASE and MSR_KGSBASE directly to PCB as we do not use
these values in the function.
Diffstat (limited to 'sys/amd64/amd64/cpu_switch.S')
-rw-r--r-- | sys/amd64/amd64/cpu_switch.S | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index b294864..952a70b 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -338,19 +338,16 @@ ENTRY(savectx) movl $MSR_FSBASE,%ecx rdmsr - shlq $32,%rdx - leaq (%rax,%rdx),%rax - movq %rax,PCB_FSBASE(%rdi) + movl %eax,PCB_FSBASE(%rdi) + movl %edx,PCB_FSBASE+4(%rdi) movl $MSR_GSBASE,%ecx rdmsr - shlq $32,%rdx - leaq (%rax,%rdx),%rax - movq %rax,PCB_GSBASE(%rdi) + movl %eax,PCB_GSBASE(%rdi) + movl %edx,PCB_GSBASE+4(%rdi) movl $MSR_KGSBASE,%ecx rdmsr - shlq $32,%rdx - leaq (%rax,%rdx),%rax - movq %rax,PCB_KGSBASE(%rdi) + movl %eax,PCB_KGSBASE(%rdi) + movl %edx,PCB_KGSBASE+4(%rdi) sgdt PCB_GDT(%rdi) sidt PCB_IDT(%rdi) |