Changeset 166 for trunk/hal/x86_64/core/hal_cpu.S
- Timestamp:
- Jul 10, 2017, 10:14:27 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_cpu.S
r145 r166 23 23 #include <hal_boot.h> 24 24 #include <hal_segmentation.h> 25 #include <hal_register.h> 25 26 26 27 ASM_ENTRY(lgdt) … … 99 100 ret 100 101 102 ASM_ENTRY(rcr4) 103 movq %cr4,%rax 104 ret 105 106 ASM_ENTRY(lcr4) 107 movq %rdi,%cr4 108 ret 109 110 ASM_ENTRY(cpuid) 111 movq %rbx,%r8 112 movq %rdi,%rax 113 movq %rsi,%rcx 114 movq %rdx,%rsi 115 cpuid 116 movl %eax,0(%rsi) 117 movl %ebx,4(%rsi) 118 movl %ecx,8(%rsi) 119 movl %edx,12(%rsi) 120 movq %r8,%rbx 121 ret 122 123 /* 124 * To flush all TLB entries, we must re-set the CR4_PGE flag in %cr4. 125 */ 126 ASM_ENTRY(tlbflushg) 127 movq %cr4,%rax 128 movq %rax,%rdx 129 andq $~CR4_PGE,%rdx 130 movq %rdx,%cr4 131 movq %rax,%cr4 132 ret 133 134 ASM_ENTRY(tlbflush) 135 movq %cr3,%rax 136 movq %rax,%cr3 137 ret 138 101 139 ASM_ENTRY(x86_stop) /* debug only */ 102 140 int $0x0b
Note: See TracChangeset
for help on using the changeset viewer.