88
99init_ cpu :
1010
11- ; Disable Cache
11+ ; Disable Cache
1212 mov rax , cr0
1313 btr rax , 29 ; Clear No Write Thru (Bit 29)
1414 bts rax , 30 ; Set Cache Disable (Bit 30)
1515 mov cr0 , rax
1616
17- ; Flush Cache
17+ ; Flush Cache
1818 wbinvd
1919
20- ; Flush TLB
20+ ; Flush TLB
2121 mov rax , cr3
2222 mov cr3 , rax
2323
@@ -108,35 +108,35 @@ init_cpu:
108108; bts eax, 11 ; Set MTRR Enable (Bit 11), Only enables Variable Range MTRR's
109109; wrmsr
110110
111- ; Flush TLB
111+ ; Flush TLB
112112 mov rax , cr3
113113 mov cr3 , rax
114114
115- ; Flush Cache
115+ ; Flush Cache
116116 wbinvd
117117
118- ; Enable Cache
118+ ; Enable Cache
119119 mov rax , cr0
120120 btr rax , 29 ; Clear No Write Thru (Bit 29)
121121 btr rax , 30 ; Clear CD (Bit 30)
122122 mov cr0 , rax
123123
124- ; Enable Floating Point
124+ ; Enable Floating Point
125125 mov rax , cr0
126126 bts rax , 1 ; Set Monitor co-processor (Bit 1)
127127 btr rax , 2 ; Clear Emulation (Bit 2)
128128 mov cr0 , rax
129129
130- ; Enable SSE
130+ ; Enable SSE
131131 mov rax , cr4
132132 bts rax , 9 ; Set Operating System Support for FXSAVE and FXSTOR instructions (Bit 9)
133133 bts rax , 10 ; Set Operating System Support for Unmasked SIMD Floating-Point Exceptions (Bit 10)
134134 mov cr4 , rax
135135
136- ; Enable Math Co-processor
136+ ; Enable Math Co-processor
137137 finit
138138
139- ; Enable AVX-1 and AVX-2
139+ ; Enable AVX-1 and AVX-2
140140 mov eax , 1 ; CPUID Feature information 1
141141 cpuid ; Sets info in ECX and EDX
142142 bt ecx , 28 ; AVX-1 is supported if bit 28 is set in ECX
@@ -154,7 +154,7 @@ avx_supported:
154154 xsetbv ; Save XCR0 register
155155avx_not_supported:
156156
157- ; Enable AVX-512
157+ ; Enable AVX-512
158158 mov eax , 7 ; CPUID Feature information 7
159159 xor ecx , ecx ; Extended Features 0
160160 cpuid ; Sets info in EBX, ECX, and EDX
0 commit comments