version 1.15.10.4, 2011/08/27 15:37:22 |
version 1.16, 2009/10/01 09:13:54 |
|
|
*/ |
*/ |
|
|
#include <machine/asm.h> |
#include <machine/asm.h> |
#include <machine/frameasm.h> |
|
#include <machine/specialreg.h> |
#include <machine/specialreg.h> |
#include <machine/segments.h> |
#include <machine/segments.h> |
|
|
|
|
* modify the PSE, PGE, or PAE flag." |
* modify the PSE, PGE, or PAE flag." |
* |
* |
* (the alternatives not quoted above are not an option here.) |
* (the alternatives not quoted above are not an option here.) |
* |
|
* If PGE is not in use, we reload CR3. |
|
*/ |
*/ |
#ifndef XEN |
#ifndef XEN |
ENTRY(tlbflushg) |
ENTRY(tlbflushg) |
movq %cr4, %rax |
movq %cr4, %rax |
testq $CR4_PGE, %rax |
|
jz 1f |
|
movq %rax, %rdx |
movq %rax, %rdx |
andq $~CR4_PGE, %rdx |
andq $~CR4_PGE, %rdx |
movq %rdx, %cr4 |
movq %rdx, %cr4 |
Line 151 ENTRY(tlbflushg) |
|
Line 146 ENTRY(tlbflushg) |
|
ret |
ret |
|
|
ENTRY(tlbflush) |
ENTRY(tlbflush) |
1: |
|
movq %cr3, %rax |
movq %cr3, %rax |
movq %rax, %cr3 |
movq %rax, %cr3 |
ret |
ret |
|
|
|
|
ENTRY(fldummy) |
ENTRY(fldummy) |
ffree %st(7) |
ffree %st(7) |
flds (%rdi) |
fld (%rdi) |
ret |
ret |
|
|
ENTRY(x86_ldmxcsr) |
ENTRY(x86_ldmxcsr) |
|
|
rep |
rep |
outsl |
outsl |
ret |
ret |
|
|
ENTRY(setfs) |
|
movw %di, %fs |
|
ret |
|
|
|
ENTRY(setusergs) |
|
CLI(ax) |
|
swapgs |
|
movw %di, %gs |
|
swapgs |
|
STI(ax) |
|
ret |
|